我正在使用带有 OWL-API 5 的 Hermit Reasoner,如下所示:
OWLOntologyManager manager= OWLManager.createOWLOntologyManager(); //create the manager
OWLOntology ontology=manager.loadOntologyFromOntologyDocument(new File("ontologies/E1G1.owl"));
OWLDataFactory datafact=manager.getOWLDataFactory();
Configuration config= new Configuration();
Reasoner reasoner= new Reasoner(config, ontology);
reasoner.classifyClasses();
reasoner.classifyDataProperties();
reasoner.classifyObjectProperties();
System.out.println(reasoner.isConsistent());
现在我想在推断的本体上以类似于 Protégé SPARQL 插件的方式执行 SPARQL 查询。我正在试验 JENA ARQ,但我不清楚如何整合它们。有什么建议么?