Class OWLAPILiteReasoner
java.lang.Object
io.github.kodymoodley.owlapilite.OWLAPILiteReasoner
Class for OWLAPI-Lite which provides access to methods for reasoning with OWL
ontologies.
- Version:
- 1.0.1
- Author:
- Kody Moodley, https://kodymoodley.github.io
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.semanticweb.owlapi.model.OWLDataFactoryOWLDataFactory instancecom.clarkparsia.owlapi.explanation.DefaultExplanationGeneratorAn instance of a default explanation generator for computing justifications for entailmentsorg.semanticweb.owl.explanation.impl.blackbox.checker.InconsistentOntologyExplanationGeneratorFactoryAn instance of Matthew Horridge's explanation generator factory for inconsistent ontologiesorg.semanticweb.owl.explanation.api.ExplanationGenerator<org.semanticweb.owlapi.model.OWLAxiom> An instance of Matthew Horridge's explanation generator for inconsistent ontologiesorg.semanticweb.owlapi.model.OWLOntologythe OWLOntology object being reasoned withorg.semanticweb.owlapi.model.IRIthe IRI of the ontology being reasoned withParser instanceorg.semanticweb.owlapi.reasoner.OWLReasonerthe OWLReasoner object which is responsible for reasoningorg.semanticweb.owlapi.reasoner.OWLReasonerFactoryOWLReasonerFactory instanceSelectedReasoner instance -
Constructor Summary
ConstructorsConstructorDescriptionOWLAPILiteReasoner(org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory, org.semanticweb.owlapi.model.OWLOntology ontology, Parser parser, SelectedReasoner selectedReasoner) OWLAPILiteReasoner constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidexplainEntailment(String axiomStr) prints to console output the explanations (justifications) for the entailment of the axiom (represented by the given string in Manchester OWL Syntax)voidprints to console output the explanations (justifications) for the inconsistency of the ontology.voidexplainUnsatisfiability(String clsStr) prints to console output the explanations (justifications) for the unsatisfiability of a class expression (represented by the given string in Manchester OWL Syntax).voidfor each object property in the ontology, print all object property assertions they are involved in to console outputvoidAlias for getAllObjectPropertyAssertions method.voidfor each individual in the ontology, prints all atomic classes to console output, such that the individual is an instance of these classesvoidgetEquivalentClasses(String classEx) prints all atomic equivalent classes of a given class expression string to console outputvoidgetInstances(String clsStr) for a given class expression, print all its instances to console outputvoidgetName()print the name of the selected OWL reasoner to console outputvoidgetObjectPropertyAssertions(String opropStr) for a given object property, print all object property assertions it is involved in, to console outputvoidgetOPropertyAssertions(String opropStr) Alias for getObjectPropertyAssertions method.voidprint the name of the OWL 2 profile that this reasoner supports to console outputvoidgetSubClasses(String classEx) prints all atomic subclasses (both direct and indirect) of a given class expression string to console outputvoidgetSuperClasses(String classEx) prints all atomic superclasses (both direct and indirect) of a given class expression string to console outputvoidprints all atomic classes to console output, such that the individual (represented by the given string) is an instance of these classesvoidprints all unsatisfiable class names in the ontology associated with this OWLAPILiteReasoner instance to console outputbooleanprints Yes to console output if the ontology associated with this OWLAPILiteReasoner instance is consistent, prints No otherwisevoidisEntailed(String axiomStr) prints Yes to console output if the given string represents an OWLAxiom in Manchester OWL Syntax that is entailed by the ontology.voidisSatisfiable(String clsStr) prints Yes to console output if the given string represents an OWLClassExpression in Manchester OWL Syntax that is satisfiable w.r.t.voidprintExplanation(Set<org.semanticweb.owlapi.model.OWLAxiom> explanation, int idx) prints a single explanation with a given integer idvoidprintExplanation(org.semanticweb.owl.explanation.api.Explanation<org.semanticweb.owlapi.model.OWLAxiom> explanation, int idx) prints a single explanation with a given integer id
-
Field Details
-
ontology
public org.semanticweb.owlapi.model.OWLOntology ontologythe OWLOntology object being reasoned with -
ontologyIRI
public org.semanticweb.owlapi.model.IRI ontologyIRIthe IRI of the ontology being reasoned with -
reasoner
public org.semanticweb.owlapi.reasoner.OWLReasoner reasonerthe OWLReasoner object which is responsible for reasoning -
parser
Parser instance -
dataFactory
public static org.semanticweb.owlapi.model.OWLDataFactory dataFactoryOWLDataFactory instance -
selectedReasoner
SelectedReasoner instance -
reasonerFactory
public org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactoryOWLReasonerFactory instance -
explanationGenerator
public com.clarkparsia.owlapi.explanation.DefaultExplanationGenerator explanationGeneratorAn instance of a default explanation generator for computing justifications for entailments -
inconsistencyExpFac
public org.semanticweb.owl.explanation.impl.blackbox.checker.InconsistentOntologyExplanationGeneratorFactory inconsistencyExpFacAn instance of Matthew Horridge's explanation generator factory for inconsistent ontologies -
inconsistencyExplanationGenerator
public org.semanticweb.owl.explanation.api.ExplanationGenerator<org.semanticweb.owlapi.model.OWLAxiom> inconsistencyExplanationGeneratorAn instance of Matthew Horridge's explanation generator for inconsistent ontologies
-
-
Constructor Details
-
OWLAPILiteReasoner
public OWLAPILiteReasoner(org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory, org.semanticweb.owlapi.model.OWLOntology ontology, Parser parser, SelectedReasoner selectedReasoner) OWLAPILiteReasoner constructor- Parameters:
reasonerFactory- reference to a specific OWLReasonerFactory implementationontology- an OWLOntology object representing the ontology to be reasoned withparser- a Parser instance (Manchester OWL Syntax)selectedReasoner- a SelectedReasoner instance holding metadata about the selected OWL reasoner
-
-
Method Details
-
getEquivalentClasses
prints all atomic equivalent classes of a given class expression string to console output- Parameters:
classEx- a class expression string in Manchester OWL Syntax
-
getSubClasses
prints all atomic subclasses (both direct and indirect) of a given class expression string to console output- Parameters:
classEx- a class expression string in Manchester OWL Syntax
-
getSuperClasses
prints all atomic superclasses (both direct and indirect) of a given class expression string to console output- Parameters:
classEx- a class expression string in Manchester OWL Syntax
-
getUnsatisfiableClasses
public void getUnsatisfiableClasses()prints all unsatisfiable class names in the ontology associated with this OWLAPILiteReasoner instance to console output -
isConsistent
public boolean isConsistent()prints Yes to console output if the ontology associated with this OWLAPILiteReasoner instance is consistent, prints No otherwise- Returns:
- true if ontology is consistent, false otherwise
-
getTypes
prints all atomic classes to console output, such that the individual (represented by the given string) is an instance of these classes- Parameters:
ind- string representation of an individual name in the ontology
-
getAllTypes
public void getAllTypes()for each individual in the ontology, prints all atomic classes to console output, such that the individual is an instance of these classes -
getObjectPropertyAssertions
for a given object property, print all object property assertions it is involved in, to console output- Parameters:
opropStr- string representing an object property
-
getOPropertyAssertions
Alias for getObjectPropertyAssertions method. for a given object property, print all object property assertions it is involved in, to console output- Parameters:
opropStr- string representing an object property
-
getInstances
for a given class expression, print all its instances to console output- Parameters:
clsStr- a class expression string in Manchester OWL Syntax
-
getAllObjectPropertyAssertions
public void getAllObjectPropertyAssertions()for each object property in the ontology, print all object property assertions they are involved in to console output -
getAllOPropertyAssertions
public void getAllOPropertyAssertions()Alias for getAllObjectPropertyAssertions method. for each object property in the ontology, print all object property assertions they are involved in to console output -
getName
public void getName()print the name of the selected OWL reasoner to console output -
getOWLProfile
public void getOWLProfile()print the name of the OWL 2 profile that this reasoner supports to console output -
isEntailed
prints Yes to console output if the given string represents an OWLAxiom in Manchester OWL Syntax that is entailed by the ontology. Prints No, otherwise- Parameters:
axiomStr- a string representation of an OWLAxiom in Manchester OWL Syntax
-
isSatisfiable
prints Yes to console output if the given string represents an OWLClassExpression in Manchester OWL Syntax that is satisfiable w.r.t. the ontology. Prints No, otherwise- Parameters:
clsStr- a string representation of an OWLClassExpression in Manchester OWL Syntax
-
explainUnsatisfiability
prints to console output the explanations (justifications) for the unsatisfiability of a class expression (represented by the given string in Manchester OWL Syntax). Prints 'NOT unsatisfiable' if the class expression is satisfiable.- Parameters:
clsStr- a string representation of an OWLClassExpression in Manchester OWL Syntax
-
explainInconsistency
public void explainInconsistency()prints to console output the explanations (justifications) for the inconsistency of the ontology. Prints 'NOT inconsistent' if the ontology is consistent -
explainEntailment
prints to console output the explanations (justifications) for the entailment of the axiom (represented by the given string in Manchester OWL Syntax)- Parameters:
axiomStr- a string representation of an OWLAxiom in Manchester OWL Syntax
-
printExplanation
prints a single explanation with a given integer id- Parameters:
explanation- a set of OWLAxiom objectsidx- an integer representing an ID or number for this explanation in a sequence
-
printExplanation
public void printExplanation(org.semanticweb.owl.explanation.api.Explanation<org.semanticweb.owlapi.model.OWLAxiom> explanation, int idx) prints a single explanation with a given integer id- Parameters:
explanation- an Explanation object which contains a set of OWLAxiom objectsidx- an integer representing an ID or number for this explanation in a sequence
-