Package org.aksw.iguana.rp.metrics
Class AbstractMetric
- java.lang.Object
-
- org.aksw.iguana.rp.metrics.AbstractMetric
-
- All Implemented Interfaces:
Metric
- Direct Known Subclasses:
EachQueryMetric,F1MeasureMetric,NoQMetric,NoQPHMetric,QPSMetric
public abstract class AbstractMetric extends java.lang.Object implements Metric
Abstract Metric class which implements the method sendData so the final Metric class can send their final data via this command to the storages- Author:
- f.conrads
-
-
Constructor Summary
Constructors Constructor Description AbstractMetric()This constructor will not set name, Short name and description Thus the final Metric class has to set them itself.AbstractMetric(java.lang.String name, java.lang.String shortName, java.lang.String description)Will create an Metric class with the name, short name and description
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()This method will be called, as soon as the associated Experiment Task is finished.java.lang.StringgetDescription()This method should return a short description of what the Metric will calculate For example (No.org.apache.jena.rdf.model.PropertygetMetricProperty()java.lang.StringgetName()This method should return the Metric Name For example: "Query Mixes Per Hour"java.lang.StringgetShortName()This method should return an abbreviated version of the Metric name.StorageManagergetStorageManager()org.apache.jena.rdf.model.ResourcegetSubject(java.util.Properties recv)org.apache.jena.rdf.model.ResourcegetTaskResource()voidsendData(org.apache.jena.rdf.model.Model m)voidsetMetaData(java.util.Properties metaData)Will add the Meta Data to the MetricvoidsetStorageManager(StorageManager smanager)-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.aksw.iguana.rp.metrics.Metric
receiveData
-
-
-
-
Constructor Detail
-
AbstractMetric
public AbstractMetric()
This constructor will not set name, Short name and description Thus the final Metric class has to set them itself.
-
AbstractMetric
public AbstractMetric(java.lang.String name, java.lang.String shortName, java.lang.String description)Will create an Metric class with the name, short name and description- Parameters:
name-shortName-description-
-
-
Method Detail
-
setStorageManager
public void setStorageManager(StorageManager smanager)
- Specified by:
setStorageManagerin interfaceMetric
-
getStorageManager
public StorageManager getStorageManager()
- Specified by:
getStorageManagerin interfaceMetric
-
getDescription
public java.lang.String getDescription()
Description copied from interface:MetricThis method should return a short description of what the Metric will calculate For example (No. of Queries Per Hour): "Will sum up all successful executed Queries in one hour."- Specified by:
getDescriptionin interfaceMetric- Returns:
-
getName
public java.lang.String getName()
Description copied from interface:MetricThis method should return the Metric Name For example: "Query Mixes Per Hour"
-
getShortName
public java.lang.String getShortName()
Description copied from interface:MetricThis method should return an abbreviated version of the Metric name. For example (Query Mixes Per Hour): "QMPH"- Specified by:
getShortNamein interfaceMetric- Returns:
-
setMetaData
public void setMetaData(java.util.Properties metaData)
Will add the Meta Data to the Metric- Specified by:
setMetaDatain interfaceMetric
-
getTaskResource
public org.apache.jena.rdf.model.Resource getTaskResource()
-
getSubject
public org.apache.jena.rdf.model.Resource getSubject(java.util.Properties recv)
-
getMetricProperty
public org.apache.jena.rdf.model.Property getMetricProperty()
-
sendData
public void sendData(org.apache.jena.rdf.model.Model m)
-
close
public void close()
Description copied from interface:MetricThis method will be called, as soon as the associated Experiment Task is finished. Not all metrics are available for each test. Hence it should be implemented if the Metric cannot calculate the test results that it will just close itself without adding results. TheMetricManagerwill try to close the Metric still, thus it should be checked if that was the case.
-
-