edu.unika.aifb.owltools.metrics
Class Metric

java.lang.Object
  extended by edu.unika.aifb.owltools.metrics.Metric
Direct Known Subclasses:
AbsoluteDepth, MaximalDepth

public abstract class Metric
extends java.lang.Object

Calculates a structural metric


Field Summary
protected  org.semanticweb.kaon2.api.Ontology context
          Measurement context
protected  java.lang.String error
          A possible error message when measuring failes
 java.lang.String metricsURIBase
          The base namesapce for the generated measurement URIs
protected  org.semanticweb.kaon2.api.Ontology ontology
          Measured ontology
protected  double result
          The measurement result
 
Method Summary
 org.semanticweb.kaon2.api.Ontology getContext()
          The context of the measurement
 java.lang.String getError()
          Contains the error message in case the measuring fails
 org.semanticweb.kaon2.api.Ontology getOntology()
          The ontology being measured
 double getResult()
          The result of the metric
 java.lang.String getURI()
          Returns the URI of the metric measurement
protected abstract  boolean measure()
          Implements the actual measurement
abstract  java.lang.String metricClassDescription()
          Human-readable description of what the metric is measuring.
abstract  java.lang.String metricClassName()
          Human-readable name of the Metric.
abstract  java.lang.String metricClassURI()
          URI for the metric class.
 boolean succesfulMeasurement()
          Has there been a succesful measurement?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

metricsURIBase

public java.lang.String metricsURIBase
The base namesapce for the generated measurement URIs


ontology

protected org.semanticweb.kaon2.api.Ontology ontology
Measured ontology


context

protected org.semanticweb.kaon2.api.Ontology context
Measurement context


result

protected double result
The measurement result


error

protected java.lang.String error
A possible error message when measuring failes

Method Detail

metricClassName

public abstract java.lang.String metricClassName()
Human-readable name of the Metric. Needs to be implemented by all metrics

Returns:
Name of the metric

metricClassURI

public abstract java.lang.String metricClassURI()
URI for the metric class. Needs to be implemented by all metrics

Returns:
URI of the metric

metricClassDescription

public abstract java.lang.String metricClassDescription()
Human-readable description of what the metric is measuring. Needs to be implemented by all metrics

Returns:
Description of the metric

getURI

public java.lang.String getURI()
Returns the URI of the metric measurement

Returns:
URI of the metric measurement

getResult

public double getResult()
The result of the metric

Returns:
Metric measurement

getOntology

public org.semanticweb.kaon2.api.Ontology getOntology()
The ontology being measured

Returns:
Measured ontology

getContext

public org.semanticweb.kaon2.api.Ontology getContext()
The context of the measurement

Returns:
Measurement context

succesfulMeasurement

public boolean succesfulMeasurement()
Has there been a succesful measurement?

Returns:
true if the measurement was succesful, else false

measure

protected abstract boolean measure()
Implements the actual measurement

Returns:
true if the evaluation was succesful, else false

getError

public java.lang.String getError()
Contains the error message in case the measuring fails

Returns:
Error message. If empty, no error message was saved.