Search Mailing List Archives
[protege-owl] Creating a SPARQL query to list all the datatype properties (including the inherited ones)
gustavo.felhberg at gmail.com
Mon Aug 13 15:26:00 PDT 2007
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
?x rdfs:subClassOf ?y.
?y owl:onProperty ?z.
?z ?a owl:DatatypeProperty. # this ?a means nothing
} ORDER BY ?x
Thanks a lot.
More information about the protege-owl