Hello guys,
Those are the steps I am using to instantiate an OntClass object:
// modelMem is an OntModel object.
1 - Reasoner reasoner = ReasonerRegistry.getOWLReasoner();
2 - reasoner = reasoner.bindSchema(modelMem);
3 - OntModelSpec ontModelSpec = OntModelSpec.OWL_DL_MEM_RULE_INF;
4 - ontModelSpec.setReasoner(reasoner);
5 - OntModel ontModel = ModelFactory.createOntologyModel(ontModelSpec,
modelMem);
6 - OntClass stage3Hypertension = ontModel.getOntClass("
http://www.semanticweb.org/ontologies/2013/1/Ontology1361391792831.owl#Stage3Hypertension
");
After line 2, the console prompt shows a lot of warning messages, like this:
Fev 19, 2014 12:15:56 AM
org.mindswap.pellet.jena.graph.query.GraphQueryHandler findTriple
Warning: No query handler found for
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/1999/02/22-rdf-syntax-ns#type
http://www.w3.org/1999/02/22-rdf-syntax-ns#Property
After line 6, again a lot of warning messages are shown, like this:
Fev 19, 2014 12:18:12 AM
org.mindswap.pellet.jena.graph.query.GraphQueryHandler findTriple
Warning: No query handler found for
http://www.w3.org/2000/01/rdf-schema#Class urn:x-hp-jena:rubrik/xsdRange *
And then, stage3Hypertension isn't instantiated, keeping null.
What am I missing?
Is there anything to do with the reasoner engine I am using, that maybe
does not support the ontology's properties?
Or the fact that the URI
http://www.semanticweb.org/ontologies/2013/1/Ontology1361391792831.owl#Stage3Hypertension
returns
404 Error? Should I use the local path to refer to the ontology class?
Any hint?
Thanks,
Guilherme