public class ReasonOperation extends Object
Constructor and Description |
---|
ReasonOperation() |
Modifier and Type | Method and Description |
---|---|
static Map<String,String> |
getDefaultOptions()
Return a map from option name to default option value, for all the available reasoner options.
|
static org.semanticweb.owlapi.reasoner.OWLReasoner |
getTautologyChecker(boolean structural)
Create a tautology checker.
|
static boolean |
isTautological(org.semanticweb.owlapi.model.OWLAxiom axiom,
org.semanticweb.owlapi.reasoner.OWLReasoner tautologyChecker,
boolean structural)
Given an OWLAxiom, a tautology checker reasoner, and a boolean, determine if the axiom is a
tautology.
|
static void |
reason(org.semanticweb.owlapi.model.OWLOntology ontology,
org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory)
Given an ontology and a reasoner factory, return the ontology with inferred axioms added after
reasoning.
|
static void |
reason(org.semanticweb.owlapi.model.OWLOntology ontology,
org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory,
Map<String,String> options)
Given an ontology, a reasoner factory, and a map of options, return the ontology with inferred
axioms added after reasoning.
|
static void |
removeRedundantSubClassAxioms(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
Remove subClassAxioms where there is a more direct axiom, and the subClassAxiom does not have
any annotations.
|
static void |
removeRedundantSubClassAxioms(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner,
Map<String,String> options)
Remove subClassAxioms where there is a more direct axiom, and the subClassAxiom does not have
any annotations.
|
public static Map<String,String> getDefaultOptions()
public static void reason(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory) throws OntologyLogicException, org.semanticweb.owlapi.model.OWLOntologyCreationException, InvalidReferenceException
ontology
- the ontology to reason overreasonerFactory
- the factory to create a reasoner instance fromOntologyLogicException
- if the ontology contains unsatisfiable classes, properties or
inconsistenciesorg.semanticweb.owlapi.model.OWLOntologyCreationException
- if ontology cannot be createdInvalidReferenceException
- if the reference checker failspublic static void reason(org.semanticweb.owlapi.model.OWLOntology ontology, org.semanticweb.owlapi.reasoner.OWLReasonerFactory reasonerFactory, Map<String,String> options) throws OntologyLogicException, org.semanticweb.owlapi.model.OWLOntologyCreationException, InvalidReferenceException
ontology
- the ontology to reason overreasonerFactory
- the factory to create a reasoner instance fromoptions
- a map of option strings, or nullOntologyLogicException
- if the ontology contains unsatisfiable classes, properties or
inconsistenciesorg.semanticweb.owlapi.model.OWLOntologyCreationException
- if ontology cannot be createdInvalidReferenceException
- if the reference checker failspublic static org.semanticweb.owlapi.reasoner.OWLReasoner getTautologyChecker(boolean structural) throws org.semanticweb.owlapi.model.OWLOntologyCreationException
structural
- if true, return null - we do not need a checker for the structural patternsorg.semanticweb.owlapi.model.OWLOntologyCreationException
- on issue creating empty ontologypublic static boolean isTautological(org.semanticweb.owlapi.model.OWLAxiom axiom, org.semanticweb.owlapi.reasoner.OWLReasoner tautologyChecker, boolean structural)
axiom
- OWLAxiom to checktautologyChecker
- OWLReasoner for empty ontologystructural
- if true, only check for hard-coded structural patterns (checker can be null)public static void removeRedundantSubClassAxioms(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner)
Example: genotyping assay - asserted in dev: assay - inferred by reasoner: analyte assay - asserted after fill: assay, analyte assay - asserted after removeRedundantSubClassAxioms: analyte assay
reasoner
- an OWL reasoner, initialized with a root ontology; the ontology will be
modifiedpublic static void removeRedundantSubClassAxioms(org.semanticweb.owlapi.reasoner.OWLReasoner reasoner, Map<String,String> options)
Example: genotyping assay - asserted in dev: assay - inferred by reasoner: analyte assay - asserted after fill: assay, analyte assay - asserted after removeRedundantSubClassAxioms: analyte assay
reasoner
- an OWL reasoner, initialized with a root ontology; the ontology will be
modifiedoptions
- map of options for reasoningCopyright © 2015–2020. All rights reserved.