Search Mailing List Archives


Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-owl] Creating a SPARQL query to list all the datatype properties (including the inherited ones)

Gustavo Felhberg gustavo.felhberg at gmail.com
Mon Aug 13 15:26:00 PDT 2007


Hi guys,

I need to make a SPARQL query to get all the datatype properties of a 
class. Until now I just got the direct datatype properties but I also 
need the inherited ones. For example, I have a class Producer with a 
datatype property called "name" and a specialized class Team 
(specialization of Producer) with a datatype property "numberOfElements".

I need to make a query that if I ask the class Team, it shows me the 
properties "name" and "numberOfElements".

The query I made to get the direct properties are:

SELECT DISTINCT ?x ?z

WHERE {

            ?x rdfs:subClassOf ?y.

            ?y owl:onProperty ?z.

            ?z ?a owl:DatatypeProperty.  # this ?a means nothing

 } ORDER BY ?x


Thanks a lot.

Gustavo Felhberg



More information about the protege-owl mailing list