edu.unika.aifb.owltools.evaluation
Class Evaluation

java.lang.Object
  extended by edu.unika.aifb.owltools.evaluation.Evaluation
Direct Known Subclasses:
AllLabeled, AllLabelled

public abstract class Evaluation
extends java.lang.Object

Performs an ontology evaluation. This is an abstract superclass that implements several common tasks for different evaluations.


Field Summary
protected  org.semanticweb.kaon2.api.Ontology context
          Evaluation context
protected  java.lang.String description
          Describes the evaluation result in a human readable form
 java.lang.String evaluationURIBase
          The base namesapce for the generated evaluation URIs
protected  org.semanticweb.kaon2.api.Ontology ontology
          Evaluated ontology
protected  java.util.Map<java.lang.String,Problem> problems
          The problems and their URIs
 
Method Summary
protected  java.util.Map<java.lang.String,Problem> addProblem(Problem problem)
          Adds a problem to the set of problems about the ontology
protected abstract  boolean evaluate()
          Implements the actual evaluation
abstract  java.lang.String evaluationClassDescription()
          Human-readable description of what this evaluation is doing.
abstract  java.lang.String evaluationClassName()
          Human-readable name of the Evaluation.
abstract  java.lang.String evaluationClassURI()
          URI for the class of evaluations.
 org.semanticweb.kaon2.api.Ontology getContext()
          The context of the evaluation
 java.lang.String getDescription()
          Human readable description of how the evaluation fared
 double getEvaluation()
          An evaluation always return a value in [0,1]
 org.semanticweb.kaon2.api.Ontology getOntology()
          The ontology being evaluated
 java.util.Map<java.lang.String,Problem> getProblemMap()
          Returns all the identified problems of the Evaluation
 java.util.Collection<Problem> getProblems()
          Returns all the identified problems of the Evaluation
protected  java.lang.String getRandomURIProblem()
          Creates a new random URI for a problem
protected  java.lang.String getRandomURISolution()
          Creates a new random URI for a solution
 java.lang.String getURI()
          Returns the URI of the evaluation
protected  void setEvaluation(double evaluation)
          Sets the evaluation grade.
 boolean succesfulEvaluation()
          Has there been a succesful evaluation?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

evaluationURIBase

public java.lang.String evaluationURIBase
The base namesapce for the generated evaluation URIs


ontology

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


context

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


description

protected java.lang.String description
Describes the evaluation result in a human readable form


problems

protected java.util.Map<java.lang.String,Problem> problems
The problems and their URIs

Method Detail

evaluationClassName

public abstract java.lang.String evaluationClassName()
Human-readable name of the Evaluation. Needs to be implemented by all evaluations

Returns:
Name of the evaluation

evaluationClassURI

public abstract java.lang.String evaluationClassURI()
URI for the class of evaluations. Needs to be implemented by all evaluations

Returns:
URI of the evaluation

evaluationClassDescription

public abstract java.lang.String evaluationClassDescription()
Human-readable description of what this evaluation is doing. Needs to be implemented by all evaluations

Returns:
Description of the evaluation type

getURI

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

Returns:
URI of the evaluation

getEvaluation

public double getEvaluation()
An evaluation always return a value in [0,1]

Returns:
Evaluation measure

getProblemMap

public java.util.Map<java.lang.String,Problem> getProblemMap()
Returns all the identified problems of the Evaluation

Returns:
A map of problem URIs and the respective problems.

getProblems

public java.util.Collection<Problem> getProblems()
Returns all the identified problems of the Evaluation

Returns:
The set of problems

getDescription

public java.lang.String getDescription()
Human readable description of how the evaluation fared

Returns:
Description of the evaluation

getOntology

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

Returns:
Evaluated ontology

getContext

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

Returns:
Evaluation context

succesfulEvaluation

public boolean succesfulEvaluation()
Has there been a succesful evaluation?

Returns:
true if the evaluation was succesful, else false

evaluate

protected abstract boolean evaluate()
Implements the actual evaluation

Returns:
true if the evaluation was succesful, else false

setEvaluation

protected void setEvaluation(double evaluation)
Sets the evaluation grade. It is clipped into [0,1]. 0 means the ontology is really bad, 1 means it is perfect (with regards to this evaluation measure)

Parameters:
evaluation - intented evaluation grade

addProblem

protected java.util.Map<java.lang.String,Problem> addProblem(Problem problem)
Adds a problem to the set of problems about the ontology

Parameters:
problem - new problem
Returns:
the new problem map

getRandomURISolution

protected java.lang.String getRandomURISolution()
Creates a new random URI for a solution

Returns:
new evaluation URI

getRandomURIProblem

protected java.lang.String getRandomURIProblem()
Creates a new random URI for a problem

Returns:
new evaluation URI