M
- the metric typepublic abstract class AbstractOWLMetric<M extends Serializable> extends Object implements OWLMetric<M>, OWLOntologyChangeListener
Constructor and Description |
---|
AbstractOWLMetric(OWLOntology o)
Instantiates a new abstract owl metric.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes 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.
|
Set<OWLOntology> |
getOntologies()
Gets the ontologies.
|
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 |
ontologiesChanged(List<? extends OWLOntologyChange> changes)
Called when some changes have been applied to various ontologies.
|
void |
setImportsClosureUsed(boolean b)
Sets whether this metric uses the imports closure of the current ontology.
|
void |
setOntology(OWLOntology ontology)
Sets the "root" ontology.
|
String |
toString() |
public AbstractOWLMetric(@Nonnull OWLOntology o)
o
- the ontology to usepublic OWLOntology getOntology()
OWLMetric
getOntology
in interface OWLMetric<M extends Serializable>
public void setOntology(OWLOntology ontology)
OWLMetric
setOntology
in interface OWLMetric<M extends Serializable>
ontology
- The ontology for which the metric should be computed.public M getValue()
OWLMetric
getValue
in interface OWLMetric<M extends Serializable>
toString
method of the object returned by this method will result in a human readable string
that displays the value of the metric.@Nonnull public Set<OWLOntology> getOntologies()
public void ontologiesChanged(List<? extends OWLOntologyChange> changes)
OWLOntologyChangeListener
ontologiesChanged
in interface OWLOntologyChangeListener
changes
- A list of changes that have occurred. Each change may be examined
to determine which ontology it was applied to.public OWLOntologyManager getManager()
OWLMetric
getManager
in interface OWLMetric<M extends Serializable>
OWLOntologyManager
.public void dispose()
OWLMetric
dispose
in interface OWLMetric<M extends Serializable>
public boolean isImportsClosureUsed()
OWLMetric
isImportsClosureUsed
in interface OWLMetric<M extends Serializable>
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)
OWLMetric
setImportsClosureUsed
in interface OWLMetric<M extends Serializable>
b
- the new imports closure used true
if this metric uses the imports closure of
the current ontology, otherwise false.Copyright © 2020 The University of Manchester. All rights reserved.