I want to create new reasoner (HermiT).
What is the difference between following two approaches :-
1) Using Factory : [org.semanticweb.HermiT.ReasonerFactory]
ReasonerFactory factory = new ReasonerFactory();
OWLReasoner reasoner = factory.createReasoner(ontology, configuration);
2) Using constructor : [org.semanticweb.HermiT.Reasoner]
Reasoner reasoner = new Reasoner(configuration, ontology);
The factory might carry out more initialization steps - depends on the reasoner.
In HermiT's case there is no difference. However, the constructor might change between versions; the factory is an owlapi interface and therefore it will give you a seamless interface if you move to a different HermiT version.