Sparql query question
366556Aug 13 2012 — edited Aug 13 2012Hello,
I have an ontology with classes X subClassOf C, C subClassOf B, B subClassOf A. And I have an inidividual ind:123 rdf:type X. This ontology is inferenced.
How can I write a sparql query that would give me the type of ind:123 (i.e. X) and not the other types (i.e. C, B, A)?
In other words, is there a way to right a query that would only return the "immediate" type of the subject and not all its other superclasses? I'm running Jena 2.6.4, OracleJenaAdaptor 11.2.0.3
select *
where { ind:123 rdf:type ?x}
I just want to get one result
X.
Thanks,
A.