com.clarkparsia.owlapi.explanation.util
Class DefinitionTracker

java.lang.Object
  extended by com.clarkparsia.owlapi.explanation.util.DefinitionTracker
All Implemented Interfaces:
OWLOntologyChangeListener

public class DefinitionTracker
extends java.lang.Object
implements OWLOntologyChangeListener

Title:

Description: This class tracks the usage of named entities in the imports closure of a designated ontology. This class listens to the changes broadcasted by the ontology manager to update the usage statistics for entities automatically when a change occurs in one of the ontologies.

WARNING: This class is not appropriate for general use because it does not distinguish multiple occurrences of the same axiom in separate ontologies. If the exact same axiom exists in two separate ontologies of the imports closure, removing the axiom from one ontology would not remove the axiom from the imports closure. However, when such a change occurs the DefinitionTracker will treat as if the axiom is removed completely from the imports closure. This is not important for generating explanation because when we remove an axiom (during multiple explanation generation or blackbox explanation) we remove it from all the ontologies in the imports closure.

Copyright: Copyright (c) 2007

Company: Clark & Parsia, LLC.

Author:
Evren Sirin

Constructor Summary
DefinitionTracker(OWLOntology ontology)
           
 
Method Summary
 boolean isDefined(OWLClassExpression classExpression)
          Checks if all the entities referred in the given concept are also referred by a logical axiom in the imports closure of the designated ontology.
 boolean isDefined(OWLEntity entity)
          Checks if this entity is referred by a logical axiom in the imports closure of the designated ontology.
 void ontologiesChanged(java.util.List<? extends OWLOntologyChange> changes)
          Called when some changes have been applied to various ontologies.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefinitionTracker

public DefinitionTracker(OWLOntology ontology)
Method Detail

isDefined

public boolean isDefined(OWLEntity entity)
Checks if this entity is referred by a logical axiom in the imports closure of the designated ontology.

Parameters:
entity - entity we are searching for
Returns:
true if there is at least one logical axiom in the imports closure of the given ontology that refers the given entity

isDefined

public boolean isDefined(OWLClassExpression classExpression)
Checks if all the entities referred in the given concept are also referred by a logical axiom in the imports closure of the designated ontology.

Parameters:
classExpression - description that contains the entities we are searching for
Returns:
true if all the entities in the given description are referred by at least one logical axiom in the imports closure of the given ontology

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