org.semanticweb.owlapi.metrics
Interface OWLMetric<M>

All Known Implementing Classes:
AbstractOWLMetric, AverageAssertedNamedSuperclassCount, AxiomCount, AxiomCountMetric, AxiomTypeMetric, DLExpressivity, DoubleValuedMetric, GCICount, HiddenGCICount, ImportClosureSize, IntegerValuedMetric, LogicalAxiomCount, MaximumNumberOfNamedSuperclasses, NumberOfClassesWithMultipleInheritance, ObjectCountMetric, ReferencedClassCount, ReferencedDataPropertyCount, ReferencedIndividualCount, ReferencedObjectPropertyCount, UnsatisfiableClassCountMetric

public interface OWLMetric<M>

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

Represents a metric about some aspect of an ontology and possibly its imports closure.


Method Summary
 void dispose()
          Diposes of the metric.
 OWLOntologyManager getManager()
          Gets the ontology manager which, amongst other things can be used to obtain the imports closure of the current ontology.
 java.lang.String getName()
          Gets the human readable name of this metic
 OWLOntology getOntology()
          Gets the ontology which the value of the metric should be based on.
 M getValue()
          Gets the value of this metric.
 boolean isImportsClosureUsed()
          Determines if the computation of the metric should take into account the imports closure of the current ontology.
 void setImportsClosureUsed(boolean b)
          Sets whether this metric uses the imports closure of the current ontology
 void setOntology(OWLOntology ontology)
          Sets the "root" ontology.
 

Method Detail

getName

java.lang.String getName()
Gets the human readable name of this metic

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

getValue

M getValue()
Gets the value of this metric. This value is computed w.r.t. the current ontology and possibly the imports closure (if specified).

Returns:
An object which represents the value of this metric - calling the toString method of the object returned by this method will result in a human readable string that displays the value of the metric.

setOntology

void setOntology(OWLOntology ontology)
Sets the "root" ontology. The metric will be recomputed from this ontology (and potentially its imports closure if selected).

Parameters:
ontology - The ontology for which the metric should be computed.

getOntology

OWLOntology getOntology()
Gets the ontology which the value of the metric should be based on.

Returns:
The ontology.

isImportsClosureUsed

boolean isImportsClosureUsed()
Determines if the computation of the metric should take into account the imports closure of the current ontology.

Returns:
true if the imports closure of the current ontology is taken into account when computing the value of this metric, or false if the imports closure isn't taken into account when computing this metric.

setImportsClosureUsed

void setImportsClosureUsed(boolean b)
Sets whether this metric uses the imports closure of the current ontology

Parameters:
b - true if this metric uses the imports closure of the current ontology, otherwise false.

getManager

OWLOntologyManager getManager()
Gets the ontology manager which, amongst other things can be used to obtain the imports closure of the current ontology.

Returns:
An OWLOntologyManager.

dispose

void dispose()
Diposes of the metric. If the metric attaches itself as a listener to an ontology manager then this will cause the metric to detach itself and stop listening for ontology changes.