Class OWLReasonerBase

java.lang.Object
org.semanticweb.owlapi.reasoner.impl.OWLReasonerBase
All Implemented Interfaces:
OWLReasoner
Direct Known Subclasses:
StructuralReasoner

public abstract class OWLReasonerBase extends Object implements OWLReasoner
Since:
3.0.0
Author:
Matthew Horridge, The University of Manchester, Information Management Group
  • Method Details

    • getReasonerConfiguration

      public OWLReasonerConfiguration getReasonerConfiguration()
      Returns:
      the configuration
    • getBufferingMode

      public BufferingMode getBufferingMode()
      Description copied from interface: OWLReasoner
      Gets the buffering mode of this reasoner.
      Specified by:
      getBufferingMode in interface OWLReasoner
      Returns:
      The buffering mode of this reasoner.
    • getTimeOut

      public long getTimeOut()
      Description copied from interface: OWLReasoner
      Gets the time out (in milliseconds) for the most basic reasoning operations. That is the maximum time for a satisfiability test, subsumption test etc. The time out should be set at reasoner creation time. During satisfiability (subsumption) checking the reasoner will check to see if the time it has spent doing the single check is longer than the value returned by this method. If this is the case, the reasoner will throw a TimeOutException in the thread that is executing the reasoning process.
      Note that clients that want a higher level timeout, at the level of classification for example, should start their own timers and request that the reasoner interrupts the current process using the OWLReasoner.interrupt() method.
      Specified by:
      getTimeOut in interface OWLReasoner
      Returns:
      The time out in milliseconds for basic reasoner operation. By default this is the value of Long.MAX_VALUE.
    • getRootOntology

      public OWLOntology getRootOntology()
      Description copied from interface: OWLReasoner
      Gets the "root" ontology that is loaded into this reasoner. The reasoner takes into account the axioms in this ontology and its imports closure, plus the axioms returned by OWLReasoner.getPendingAxiomRemovals(), minus the axioms returned by OWLReasoner.getPendingAxiomAdditions() when reasoning.
      Note that the root ontology is set at reasoner creation time and cannot be changed thereafter. Clients that want to add ontologies to and remove ontologies from the reasoner after creation time should create a "dummy" ontology that imports the "real" ontologies and then specify the dummy ontology as the root ontology at reasoner creation time.
      Specified by:
      getRootOntology in interface OWLReasoner
      Returns:
      The root ontology that is loaded into the reasoner.
    • getPendingChanges

      public List<OWLOntologyChange> getPendingChanges()
      Description copied from interface: OWLReasoner
      Gets the pending changes which need to be taken into consideration by the reasoner so that it is up to date with the root ontology imports closure. After the OWLReasoner.flush() method is called the set of pending changes will be empty.
      Specified by:
      getPendingChanges in interface OWLReasoner
      Returns:
      A set of changes. Note that the changes represent the raw changes as applied to the imports closure of the root ontology.
    • getPendingAxiomAdditions

      public Set<OWLAxiom> getPendingAxiomAdditions()
      Description copied from interface: OWLReasoner
      Gets the axioms that as a result of ontology changes need to be added to the reasoner to synchronise it with the root ontology imports closure. If the buffering mode is BufferingMode.NON_BUFFERING then there will be no pending axiom additions.
      Specified by:
      getPendingAxiomAdditions in interface OWLReasoner
      Returns:
      The set of axioms that need to added to the reasoner to the reasoner to synchronise it with the root ontology imports closure.
    • getPendingAxiomRemovals

      public Set<OWLAxiom> getPendingAxiomRemovals()
      Description copied from interface: OWLReasoner
      Gets the axioms that as a result of ontology changes need to removed to the reasoner to synchronise it with the root ontology imports closure. If the buffering mode is BufferingMode.NON_BUFFERING then there will be no pending axiom additions.
      Specified by:
      getPendingAxiomRemovals in interface OWLReasoner
      Returns:
      The set of axioms that need to added to the reasoner to the reasoner to synchronise it with the root ontology imports closure.
    • flush

      public void flush()
      Description copied from interface: OWLReasoner
      Flushes any changes stored in the buffer, which causes the reasoner to take into consideration the changes the current root ontology specified by the changes. If the reasoner buffering mode is BufferingMode.NON_BUFFERING then this method will have no effect.
      Specified by:
      flush in interface OWLReasoner
    • getReasonerAxioms

      public Collection<OWLAxiom> getReasonerAxioms()
      Gets the axioms that should be currently being reasoned over.
      Returns:
      A collections of axioms (not containing duplicates) that the reasoner should be taking into consideration when reasoning. This set of axioms many not correspond to the current state of the imports closure of the reasoner root ontology if the reasoner is buffered.
    • dispose

      public void dispose()
      Description copied from interface: OWLReasoner
      Disposes of this reasoner. This frees up any resources used by the reasoner and detaches the reasoner as an OWLOntologyChangeListener from the OWLOntologyManager that manages the ontologies contained within the reasoner.
      Specified by:
      dispose in interface OWLReasoner
    • getFreshEntityPolicy

      public FreshEntityPolicy getFreshEntityPolicy()
      Description copied from interface: OWLReasoner
      Gets the Fresh Entity Policy in use by this reasoner. The policy is set at reasoner creation time.
      Specified by:
      getFreshEntityPolicy in interface OWLReasoner
      Returns:
      The policy.
    • getIndividualNodeSetPolicy

      public IndividualNodeSetPolicy getIndividualNodeSetPolicy()
      Description copied from interface: OWLReasoner
      Gets the IndividualNodeSetPolicy in use by this reasoner. The policy is set at reasoner creation time.
      Specified by:
      getIndividualNodeSetPolicy in interface OWLReasoner
      Returns:
      The policy.
    • getOWLDataFactory

      public OWLDataFactory getOWLDataFactory()
      Returns:
      the data factory