Johann, if you are using Jena you could try the extensions described at http://jena.sourceforge.net/ARQ/property_paths.html regards, AndyL On Aug 31, 2009, at 12:05 PM, Lee Feigenbaum wrote: > Hi Johann, > > In current SPARQL, triple patterns can only query for fixed length > paths through the graph. There's no way to ask for arbitrary length > paths of owl:equivalentClass statements. If all owl:equivalentClass > statements are pairwise explicitly asserted in your store, then you > should be able to do: > > SELECT DISTINCT ?cl WHERE > { > { ?cl a owl:Class } > OPTIONAL { > { ?cl rdfs:subClassOf ?sc . } > UNION > { ?cl rdfs:subClassOf [ owl:equivalentClass ?sc ] } > FILTER (?cl != ?sc && ?sc != owl:Thing && ?sc != rdfs:Resource) > } > FILTER (!bound(?sc)) > } > > Lee > >> Since SERQL supports nested selects and the minus, any etc. >> operators, this can be done in one SERQL query. > http://www.langegger.at ---------------------------------------------------------------------- Dipl.-Ing.(FH) Andreas Langegger FAW - Institute for Application-oriented Knowledge Processing Johannes Kepler University Linz A-4040 Linz, Altenberger Straße 69Received on Monday, 31 August 2009 12:22:05 GMT
This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 31 August 2009 12:22:06 GMT