Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sparql query question

366556Aug 13 2012 — edited Aug 13 2012
Hello,

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.
This post has been answered by Matperry-Oracle on Aug 13 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 10 2012
Added on Aug 13 2012
1 comment
791 views