Hello I am using Jena API to load RDF/XML file from local directory. Below is the RDF/XML file:
@prefix : <http://www.semanticweb.org/sample#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@base <http://www.semanticweb.org/sample> .
<http://www.semanticweb.org/sample> rdf:type owl:Ontology .
#################################################################
#
# Classes
#
#################################################################
### http://www.semanticweb.org/sample#Child1
:Child1 rdf:type owl:Class ;
rdfs:subClassOf :SubClass2 .
### http://www.semanticweb.org/sample#Child2
:Child2 rdf:type owl:Class ;
rdfs:subClassOf :SubClass2 .
### http://www.semanticweb.org/sample#SubClass1
:SubClass1 rdf:type owl:Class .
### http://www.semanticweb.org/sample#SubClass2
:SubClass2 rdf:type owl:Class,
:SubClass1 .
object and property relations of the above RDF/XML is as follows:
- There are two classes under thing: SubClass1 and SubClass2.
- SubClass2 further has two children classes: Class1 and Class2
- Additionally SubClass2 is of type (i.e., rdf:type) SubClass1
So by inference, even Child1 & Child2 should be of type SubClass1. Right? Please let me know if I am wrong.
And I used several Reasoners with Jena API to extract all the classes of type "SubClass1", but everytime the output is only one entity (i.e., SubClass1)
I am using the sample code mentioned in this link (Section 2): http://opentox.org/data/documents/development/RDF%20files/JavaOnly/query-reasoning-with-jena-and-sparql
Please someone let me know what is the best reasoner to use for this use case? Appreciate your help.
