org.semanticweb.owlapi.metrics
Class ObjectCountMetric<E>

java.lang.Object
  extended by org.semanticweb.owlapi.metrics.AbstractOWLMetric<java.lang.Integer>
      extended by org.semanticweb.owlapi.metrics.IntegerValuedMetric
          extended by org.semanticweb.owlapi.metrics.ObjectCountMetric<E>
All Implemented Interfaces:
OWLMetric<java.lang.Integer>, OWLOntologyChangeListener
Direct Known Subclasses:
AxiomCountMetric, ReferencedClassCount, ReferencedDataPropertyCount, ReferencedIndividualCount, ReferencedObjectPropertyCount

public abstract class ObjectCountMetric<E>
extends IntegerValuedMetric

Author: Matthew Horridge
The University Of Manchester
Bio-Health Informatics Group
Date: 27-Jul-2007


Constructor Summary
ObjectCountMetric(OWLOntologyManager owlOntologyManager)
           
 
Method Summary
protected  void disposeMetric()
           
 java.lang.String getName()
          Gets the human readable name of this metic
protected  java.util.Set<? extends E> getObjects()
           
protected abstract  java.util.Set<? extends E> getObjects(OWLOntology ont)
           
protected abstract  java.lang.String getObjectTypeName()
           
protected  boolean isMetricInvalidated(java.util.List<? extends OWLOntologyChange> changes)
          Determines if the specified list of changes will cause the value of this metric to be invalid.
 java.lang.Integer recomputeMetric()
           
 
Methods inherited from class org.semanticweb.owlapi.metrics.AbstractOWLMetric
dispose, getManager, getOntologies, getOntology, getValue, isImportsClosureUsed, ontologiesChanged, setImportsClosureUsed, setOntology, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectCountMetric

public ObjectCountMetric(OWLOntologyManager owlOntologyManager)
Method Detail

getObjectTypeName

protected abstract java.lang.String getObjectTypeName()

getName

public java.lang.String getName()
Description copied from interface: OWLMetric
Gets the human readable name of this metic

Returns:
A label which represents the human readable name of this metric.

getObjects

protected abstract java.util.Set<? extends E> getObjects(OWLOntology ont)

recomputeMetric

public java.lang.Integer recomputeMetric()
Specified by:
recomputeMetric in class AbstractOWLMetric<java.lang.Integer>

getObjects

protected java.util.Set<? extends E> getObjects()

isMetricInvalidated

protected boolean isMetricInvalidated(java.util.List<? extends OWLOntologyChange> changes)
Description copied from class: AbstractOWLMetric
Determines if the specified list of changes will cause the value of this metric to be invalid.

Specified by:
isMetricInvalidated in class AbstractOWLMetric<java.lang.Integer>
Parameters:
changes - The list of changes which will be examined to determine if the metric is now invalid.
Returns:
true if the metric value is invalidated by the specified list of changes, or false if the list of changes do not cause the value of this metric to be invalidated.

disposeMetric

protected void disposeMetric()
Specified by:
disposeMetric in class AbstractOWLMetric<java.lang.Integer>