Class EquivalentClassReasoning


  • public class EquivalentClassReasoning
    extends Object
    Created by edouglass on 5/9/17.

    All the pieces that are needed to perform reasoning on equivalent classes in an OWLOntology

    • Constructor Detail

      • EquivalentClassReasoning

        public EquivalentClassReasoning​(org.semanticweb.owlapi.model.OWLOntology ontology,
                                        org.semanticweb.owlapi.reasoner.OWLReasoner reasoner,
                                        EquivalentClassReasoningMode mode)
        Creates a new instance that will reason over the given ontology with the strategy specified by the EquivalentClassReasoningMode.
        Parameters:
        ontology - OWLOntology to reason equivalence classes over
        reasoner - OWLReasoner that will reason over the ontology
        mode - One of ALL, NONE, or ASSERTED_ONLY, representing a strategy to deal with found equivalent classes
    • Method Detail

      • reason

        public boolean reason()
        Uses the reasoner to find all equivalent classes in the ontology, and then adds the axioms that are not allowed the the list of failed axioms. Once reasoning has occurred, a report can be logged with #logReport
        Returns:
        True if there were no failing equivalence axioms found, False if any failed the test
      • logReport

        public void logReport​(org.slf4j.Logger logger)
        Uses the provided logger to print out the results of the reasoning operation.
        Parameters:
        logger - an SLF4J logger instance