org.semanticweb.owl.inference
Class OWLReasonerAdapter

java.lang.Object
  extended by org.semanticweb.owl.inference.OWLReasonerAdapter
All Implemented Interfaces:
OWLClassReasoner, OWLConsistencyChecker, OWLIndividualReasoner, OWLPropertyReasoner, OWLReasoner, OWLReasonerBase, OWLSatisfiabilityChecker, OWLOntologyChangeListener
Direct Known Subclasses:
DIGReasoner, MonitorableOWLReasonerAdapter

public abstract class OWLReasonerAdapter
extends java.lang.Object
implements OWLReasoner, OWLOntologyChangeListener

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 18-Mar-2007


Method Summary
 void clearOntologies()
          Clears the reasoner.
static
<O> java.util.Set<java.util.Set<O>>
createSetOfSets(java.util.Collection<O> objs, java.util.Map<O,java.util.Collection<O>> equivalentsMap)
           
 void dispose()
          Disposes of and cleans up any resources used by this reasoner.
static
<E> java.util.Set<E>
flattenSetOfSets(java.util.Set<java.util.Set<E>> setOfSets)
          A utility method that will flatten a set of sets.
 java.util.Set<OWLOntology> getLoadedOntologies()
          Gets the ontologies that have been loaded into this reasoner.
 void loadOntologies(java.util.Set<OWLOntology> ontologies)
          Loads the specified ontologies.
 void ontologiesChanged(java.util.List<? extends OWLOntologyChange> changes)
          Called when some changes have been applied to various ontologies.
 void unloadOntologies(java.util.Set<OWLOntology> ontologies)
          Unloads the specified ontologies from this reasoner.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.semanticweb.owl.inference.OWLConsistencyChecker
isConsistent
 
Methods inherited from interface org.semanticweb.owl.inference.OWLClassReasoner
getAncestorClasses, getDescendantClasses, getEquivalentClasses, getInconsistentClasses, getSubClasses, getSuperClasses, isEquivalentClass, isSubClassOf
 
Methods inherited from interface org.semanticweb.owl.inference.OWLSatisfiabilityChecker
isSatisfiable
 
Methods inherited from interface org.semanticweb.owl.inference.OWLReasonerBase
classify, isClassified, isDefined, isDefined, isDefined, isDefined, isRealised, realise
 
Methods inherited from interface org.semanticweb.owl.inference.OWLIndividualReasoner
getDataPropertyRelationships, getIndividuals, getObjectPropertyRelationships, getRelatedIndividuals, getRelatedValues, getTypes, hasDataPropertyRelationship, hasObjectPropertyRelationship, hasType
 
Methods inherited from interface org.semanticweb.owl.inference.OWLPropertyReasoner
getAncestorProperties, getAncestorProperties, getDescendantProperties, getDescendantProperties, getDomains, getDomains, getEquivalentProperties, getEquivalentProperties, getInverseProperties, getRanges, getRanges, getSubProperties, getSubProperties, getSuperProperties, getSuperProperties, isAntiSymmetric, isFunctional, isFunctional, isInverseFunctional, isIrreflexive, isReflexive, isSymmetric, isTransitive
 

Method Detail

dispose

public final void dispose()
Description copied from interface: OWLReasonerBase
Disposes of and cleans up any resources used by this reasoner.

Specified by:
dispose in interface OWLReasonerBase

loadOntologies

public void loadOntologies(java.util.Set<OWLOntology> ontologies)
                    throws OWLReasonerException
Description copied from interface: OWLReasonerBase
Loads the specified ontologies. The reasoner will then take into consideration the logical axioms in each ontology. Note that this methods does not load any ontologies in the imports closure - all imports must be loaded explicitly.

Specified by:
loadOntologies in interface OWLReasonerBase
Parameters:
ontologies - The ontolgies to be loaded.
Throws:
OWLReasonerException

getLoadedOntologies

public java.util.Set<OWLOntology> getLoadedOntologies()
Description copied from interface: OWLReasonerBase
Gets the ontologies that have been loaded into this reasoner.

Specified by:
getLoadedOntologies in interface OWLReasonerBase

unloadOntologies

public void unloadOntologies(java.util.Set<OWLOntology> ontologies)
                      throws OWLReasonerException
Description copied from interface: OWLReasonerBase
Unloads the specified ontologies from this reasoner.

Specified by:
unloadOntologies in interface OWLReasonerBase
Parameters:
ontologies - The ontologies to be unloaded.
Throws:
OWLReasonerException

clearOntologies

public void clearOntologies()
                     throws OWLReasonerException
Description copied from interface: OWLReasonerBase
Clears the reasoner. All loaded ontologies will be unloaded.

Specified by:
clearOntologies in interface OWLReasonerBase
Throws:
OWLReasonerException

ontologiesChanged

public void ontologiesChanged(java.util.List<? extends OWLOntologyChange> changes)
                       throws OWLException
Description copied from interface: OWLOntologyChangeListener
Called when some changes have been applied to various ontologies. These may be an axiom added or an axiom removed changes.

Specified by:
ontologiesChanged in interface OWLOntologyChangeListener
Parameters:
changes - A list of changes that have occurred. Each change may be examined to determine which ontology it was applied to.
Throws:
OWLException

flattenSetOfSets

public static <E> java.util.Set<E> flattenSetOfSets(java.util.Set<java.util.Set<E>> setOfSets)
A utility method that will flatten a set of sets.

Parameters:
setOfSets - The set of sets to be flattened.

createSetOfSets

public static <O> java.util.Set<java.util.Set<O>> createSetOfSets(java.util.Collection<O> objs,
                                                                  java.util.Map<O,java.util.Collection<O>> equivalentsMap)