M - the metric typepublic abstract class AbstractOWLMetric<M> extends Object implements OWLMetric<M>, org.semanticweb.owlapi.model.OWLOntologyChangeListener
| Constructor and Description |
|---|
AbstractOWLMetric(org.semanticweb.owlapi.model.OWLOntologyManager owlOntologyManager) |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Diposes of the metric.
|
protected abstract void |
disposeMetric() |
org.semanticweb.owlapi.model.OWLOntologyManager |
getManager()
Gets the ontology manager which, amongst other things can
be used to obtain the imports closure of the current ontology.
|
Set<org.semanticweb.owlapi.model.OWLOntology> |
getOntologies() |
org.semanticweb.owlapi.model.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.
|
protected abstract boolean |
isMetricInvalidated(List<? extends org.semanticweb.owlapi.model.OWLOntologyChange> changes)
Determines if the specified list of changes will cause the value of this
metric to be invalid.
|
void |
ontologiesChanged(List<? extends org.semanticweb.owlapi.model.OWLOntologyChange> changes) |
protected abstract M |
recomputeMetric() |
void |
setImportsClosureUsed(boolean b)
Sets whether this metric uses the imports closure of the
current ontology
|
void |
setOntology(org.semanticweb.owlapi.model.OWLOntology ontology)
Sets the "root" ontology.
|
String |
toString() |
public AbstractOWLMetric(org.semanticweb.owlapi.model.OWLOntologyManager owlOntologyManager)
owlOntologyManager - the manager to usepublic org.semanticweb.owlapi.model.OWLOntology getOntology()
OWLMetricgetOntology in interface OWLMetric<M>public final void setOntology(org.semanticweb.owlapi.model.OWLOntology ontology)
OWLMetricsetOntology in interface OWLMetric<M>ontology - The ontology for which the metric should
be computed.protected abstract M recomputeMetric()
public final M getValue()
OWLMetricpublic Set<org.semanticweb.owlapi.model.OWLOntology> getOntologies()
public void ontologiesChanged(List<? extends org.semanticweb.owlapi.model.OWLOntologyChange> changes) throws org.semanticweb.owlapi.model.OWLException
ontologiesChanged in interface org.semanticweb.owlapi.model.OWLOntologyChangeListenerorg.semanticweb.owlapi.model.OWLExceptionpublic org.semanticweb.owlapi.model.OWLOntologyManager getManager()
OWLMetricgetManager in interface OWLMetric<M>OWLOntologyManager.public void dispose()
OWLMetricpublic final boolean isImportsClosureUsed()
OWLMetricisImportsClosureUsed in interface OWLMetric<M>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.public void setImportsClosureUsed(boolean b)
OWLMetricsetImportsClosureUsed in interface OWLMetric<M>b - true if this metric uses the imports
closure of the current ontology, otherwise false.protected abstract boolean isMetricInvalidated(List<? extends org.semanticweb.owlapi.model.OWLOntologyChange> changes)
changes - The list of changes which will be examined to determine if the
metric is now invalid.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.protected abstract void disposeMetric()
Copyright © 2013 The University of Manchester. All Rights Reserved.