Class SimpleTemporalMapper
- java.lang.Object
-
- org.aksw.limes.core.measures.mapper.AMapper
-
- org.aksw.limes.core.measures.mapper.temporal.simpleTemporal.SimpleTemporalMapper
-
- All Implemented Interfaces:
IMapper,ISimpleTemporalMapper
- Direct Known Subclasses:
ConcurrentMapper,PredecessorMapper,SuccessorMapper
public abstract class SimpleTemporalMapper extends AMapper implements ISimpleTemporalMapper
Abstract class of simple temporal relations mapper.- Version:
- 1.0
- Author:
- Kleanthi Georgala (georgala@informatik.uni-leipzig.de)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.aksw.limes.core.measures.mapper.IMapper
IMapper.Language
-
-
Constructor Summary
Constructors Constructor Description SimpleTemporalMapper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected StringgetFirstProperty(String expression)Extracts first property (beginDate) from metric expression.protected StringgetSecondProperty(String expression)Extracts second property (machineID) from metric expression.protected TreeMap<String,Set<Instance>>orderByBeginDate(ACache cache, String expression, String kbType)Orders a cache of instances based on their begin date property.-
Methods inherited from class org.aksw.limes.core.measures.mapper.AMapper
getUriToUriMapping, getUriToUriMapping, getValueToUriMap, setNo
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.aksw.limes.core.measures.mapper.IMapper
getMapping, getMappingSizeApproximation, getName, getRuntimeApproximation, setNo
-
-
-
-
Method Detail
-
getFirstProperty
protected String getFirstProperty(String expression)
Extracts first property (beginDate) from metric expression.- Parameters:
expression- , The metric expression- Returns:
- first property of metric expression as string
-
getSecondProperty
protected String getSecondProperty(String expression)
Extracts second property (machineID) from metric expression.- Parameters:
expression- , The metric expression- Returns:
- second property of metric expression as string
-
orderByBeginDate
protected TreeMap<String,Set<Instance>> orderByBeginDate(ACache cache, String expression, String kbType)
Orders a cache of instances based on their begin date property. For each instance, it retrieves its begin date property, converts its value to an epoch (string) using the SimpleDateFormat function and places the instance inside the corresponding set("bucket") of instances.- Parameters:
cache- , the cache of instancesexpression- , the metric expressionkbType- , source or target- Returns:
- blocks, a map of sets with unique begin dates as keys and set of instances as values
-
-