Package it.poliba.sisinflab.tinyme
Class ReasonerFactory
java.lang.Object
it.poliba.sisinflab.tinyme.ReasonerFactory
- All Implemented Interfaces:
OWLReasonerFactory
public final class ReasonerFactory extends Object implements OWLReasonerFactory
Point to create reasoner instances.
- See Also:
Reasoner
-
Constructor Summary
Constructors Constructor Description ReasonerFactory()
-
Method Summary
Modifier and Type Method Description OWLReasoner
createNonBufferingReasoner(OWLOntology ontology)
Creates an OWLReasoner that reasons over the imports closure of the specified ontology.OWLReasoner
createNonBufferingReasoner(OWLOntology ontology, OWLReasonerConfiguration config)
Creates an OWLReasoner that reasons over the imports closure of the specified ontology.OWLReasoner
createReasoner(OWLOntology ontology)
Creates a buffering reasoner that reasons over the imports closure of the specified ontology.OWLReasoner
createReasoner(OWLOntology ontology, OWLReasonerConfiguration config)
Creates a buffering reasoner that reasons over the imports closure of the specified ontology.String
getReasonerName()
Gets the name of the reasoner created by this factory.static Reasoner
newReasoner(InputStream stream)
Convenience factory method.static Reasoner
newReasoner(String ontologyPath)
Convenience factory method.static Reasoner
newReasoner(OWLOntology ontology)
Instantiates a new reasoner that reasons over the specified ontology.
-
Constructor Details
-
ReasonerFactory
public ReasonerFactory()
-
-
Method Details
-
newReasoner
Instantiates a new reasoner that reasons over the specified ontology.- Parameters:
ontology
- Ontology to load into the reasoner.- Returns:
- New reasoner instance.
-
newReasoner
Convenience factory method. Refer tonewReasoner(OWLOntology)
.- Parameters:
stream
- Ontology to load into the reasoner as an input stream.- Returns:
- New reasoner instance.
- Throws:
OWLOntologyCreationException
- If the ontology cannot be created.
-
newReasoner
Convenience factory method. Refer tonewReasoner(OWLOntology)
.- Parameters:
ontologyPath
- Path of the ontology to load into the reasoner.- Returns:
- New reasoner instance.
- Throws:
OWLOntologyCreationException
- If the ontology cannot be created.
-
getReasonerName
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasonerFactory
Gets the name of the reasoner created by this factory.- Specified by:
getReasonerName
in interfaceOWLReasonerFactory
- Returns:
- A string that represents the name of the reasoner created by this factory.
-
createNonBufferingReasoner
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasonerFactory
Creates an OWLReasoner that reasons over the imports closure of the specified ontology. The reasoner will obtain the imports closure from the ontology manager associated withontology
. The reasoner will listen for ontology changes to the ontologies that it is reasoning over and will always answer queries with respect to the changed ontologies (seeOWLReasoner
for further details).- Specified by:
createNonBufferingReasoner
in interfaceOWLReasonerFactory
- Parameters:
ontology
- The ontology whose imports closure will be reasoned over by the reasoner that is created.- Returns:
- The reasoner that reasons over the imports closure of the specified ontology. Note that calling this method multiple times with the same manager and ontology will return fresh instances of OWLReasoner.
-
createReasoner
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasonerFactory
Creates a buffering reasoner that reasons over the imports closure of the specified ontology. The reasoner will obtain the imports closure from the ontology manager associated withontology
. The reasoner will listen for ontology changes to the ontologies it is reasoning over but will only answer queries with respect to the changed ontologies when theOWLReasoner.flush()
method is called (seeOWLReasoner
for further details).- Specified by:
createReasoner
in interfaceOWLReasonerFactory
- Parameters:
ontology
- The ontology whose imports closure will be reasoned over by the reasoner that is created.- Returns:
- The reasoner that reasons over the imports closure of the specified ontology. Note that calling this method multiple times with the same manager and ontology will return fresh instances of OWLReasoner.
-
createNonBufferingReasoner
public OWLReasoner createNonBufferingReasoner(OWLOntology ontology, OWLReasonerConfiguration config)Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasonerFactory
Creates an OWLReasoner that reasons over the imports closure of the specified ontology. The reasoner will obtain the imports closure from the ontology manager associated withontology
. The reasoner will listen for ontology changes to the ontologies that it is reasoning over and will always answer queries with respect to the changed ontologies (seeOWLReasoner
for further details).- Specified by:
createNonBufferingReasoner
in interfaceOWLReasonerFactory
- Parameters:
ontology
- The ontology whose imports closure will be reasoned over by the reasoner that is created.config
- A configuration object that can be used to customise the setup of the reasoner that will be created by calling this method.- Returns:
- The reasoner that reasons over the imports closure of the specified ontology. Note that calling this method multiple times with the same manager and ontology will return fresh instances of OWLReasoner.
-
createReasoner
Description copied from interface:org.semanticweb.owlapi.reasoner.OWLReasonerFactory
Creates a buffering reasoner that reasons over the imports closure of the specified ontology. The reasoner will obtain the imports closure from the ontology manager associated withontology
. The reasoner will listen for ontology changes to the ontologies it is reasoning over but will only answer queries with respect to the changed ontologies when theOWLReasoner.flush()
method is called (seeOWLReasoner
for further details).- Specified by:
createReasoner
in interfaceOWLReasonerFactory
- Parameters:
ontology
- The ontology whose imports closure will be reasoned over by the reasoner that is created.config
- A configuration object that can be used to customise the setup of the reasoner that will be created by calling this method.- Returns:
- The reasoner that reasons over the imports closure of the specified ontology. Note that calling this method multiple times with the same manager and ontology will return fresh instances of OWLReasoner.
-