2
votes

I'm using Hermit Reasoner with OWL-API 5 as follows:

  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());  

Now I would like to execute SPARQL Query in analogous way as Protégé SPARQL Plugin over the inferred ontology. I'm experimenting JENA ARQ, but it is not clear to me how to integrate them. Any suggestions?

1

1 Answers

1
votes

I do not think there is existing integration between Jena and HermiT. OpenPellet, a reasoner built on top of Pellet has Jena integration.

The question is whether you indeed need an external reasoner. If not you can use the OWL reasoners provided as part of Jena. See Jena OWL Reasoners.