Package org.obolibrary.robot
Class ReasonerHelper
- java.lang.Object
-
- org.obolibrary.robot.ReasonerHelper
-
public class ReasonerHelper extends Object
Provides convenience methods for working with OWL reasoning.- Author:
- cjm
-
-
Constructor Summary
Constructors Constructor Description ReasonerHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.semanticweb.owlapi.model.OWLOntology
createIncoherentModule(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, org.semanticweb.owlapi.model.IRI outputIRI)
static org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>
getInferredAxiomGenerator(String axGenerator)
Given an axiom generator as a string, return the InferredAxiomGenerator object.static org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>
getInferredAxiomGenerator(String axGenerator, boolean direct)
Given an axiom generator as a string, return the InferredAxiomGenerator object.static List<org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>>
getInferredAxiomGenerators(List<String> axGenerators)
Given a list of axiom generator strings, return a list of InferredAxiomGenerator objects.static List<org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>>
getInferredAxiomGenerators(List<String> axGenerators, boolean direct)
Given a list of axiom generator strings, return a list of InferredAxiomGenerator objects.static void
validate(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
Validates ontology.static void
validate(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, String unsatisfiableModulePath)
Validates ontology.static void
validate(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, String unsatisfiableModulePath, IOHelper ioHelper)
Validates ontology, writes unsatisfiable module.
-
-
-
Method Detail
-
validate
public static void validate(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner) throws IncoherentTBoxException, InconsistentOntologyException, IncoherentRBoxException
Validates ontology.- Parameters:
reasoner
- OWLReasoner being used.- Throws:
IncoherentTBoxException
- on unsatisfiable classesInconsistentOntologyException
- on logical inconsistenciesIncoherentRBoxException
- on unsatisfiable properties
-
validate
public static void validate(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, String unsatisfiableModulePath) throws InconsistentOntologyException, IncoherentRBoxException, IncoherentTBoxException
Validates ontology.- Parameters:
reasoner
- OWLReasoner being used.unsatisfiableModulePath
- path to unsatisfiable module as string- Throws:
IncoherentTBoxException
- on unsatisfiable classesInconsistentOntologyException
- on logical inconsistenciesIncoherentRBoxException
- on unsatisfiable properties
-
validate
public static void validate(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, String unsatisfiableModulePath, IOHelper ioHelper) throws IncoherentTBoxException, InconsistentOntologyException, IncoherentRBoxException
Validates ontology, writes unsatisfiable module.- Parameters:
reasoner
- OWLReasoner being usedunsatisfiableModulePath
- path to unsatisfiable module as stringioHelper
- IOHelper to use- Throws:
IncoherentTBoxException
- on unsatisfiable classesInconsistentOntologyException
- on logical inconsistenciesIncoherentRBoxException
- on unsatisfiable properties
-
createIncoherentModule
public static org.semanticweb.owlapi.model.OWLOntology createIncoherentModule(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, org.semanticweb.owlapi.model.IRI outputIRI) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
- Parameters:
reasoner
- OWLReasoner being usedoutputIRI
- IRI of output- Returns:
- minimal incoherent module
- Throws:
org.semanticweb.owlapi.model.OWLOntologyCreationException
- on issue creating incoherent module
-
getInferredAxiomGenerators
public static List<org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>> getInferredAxiomGenerators(List<String> axGenerators, boolean direct)
Given a list of axiom generator strings, return a list of InferredAxiomGenerator objects.- Parameters:
axGenerators
- list of strings to get InferredAxiomGeneratorsdirect
- return axiom generators which include only direct superclass/superproperties/types- Returns:
- list of InferredAxiomGenerators
-
getInferredAxiomGenerators
public static List<org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom>> getInferredAxiomGenerators(List<String> axGenerators)
Given a list of axiom generator strings, return a list of InferredAxiomGenerator objects.- Parameters:
axGenerators
- list of strings to get InferredAxiomGenerators- Returns:
- list of InferredAxiomGenerators
-
getInferredAxiomGenerator
public static org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom> getInferredAxiomGenerator(String axGenerator)
Given an axiom generator as a string, return the InferredAxiomGenerator object.- Parameters:
axGenerator
- name of InferredAxiomGenerator- Returns:
- InferredAxiomGenerator
-
getInferredAxiomGenerator
public static org.semanticweb.owlapi.util.InferredAxiomGenerator<? extends org.semanticweb.owlapi.model.OWLAxiom> getInferredAxiomGenerator(String axGenerator, boolean direct)
Given an axiom generator as a string, return the InferredAxiomGenerator object.- Parameters:
axGenerator
- name of InferredAxiomGeneratordirect
- return axiom generators which include only direct superclass/superproperties/types- Returns:
- InferredAxiomGenerator
-
-