de.dfki.mycbr.core.retrieval
Class Retrieval
java.lang.Object
java.util.AbstractMap<K,V>
java.util.HashMap<Instance,Similarity>
de.dfki.mycbr.core.retrieval.Retrieval
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Runnable, java.util.Map<Instance,Similarity>
public class Retrieval
- extends java.util.HashMap<Instance,Similarity>
- implements java.lang.Runnable
A retrieval has a retrieval method and a retrieval engine.
When specifying a case base and a query you can retrieve a similarity
value between the query and each case in the case base.
- Author:
- myCBR Team
- See Also:
- Serialized Form
| Nested classes/interfaces inherited from class java.util.AbstractMap |
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V> |
| Methods inherited from class java.util.HashMap |
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values |
| Methods inherited from class java.util.AbstractMap |
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Map |
equals, hashCode |
Retrieval
public Retrieval(Concept c,
ICaseBase cb)
- Parameters:
c - the query should be an instance of this concept
Retrieval
public Retrieval(Concept c,
ICaseBase cb,
RetrievalEngine re)
- Parameters:
c - the query should be an instance of this concept
start
public final void start()
- Throws:
java.lang.Exception - if something goes wrong during retrieval
setRetrievalEngine
public void setRetrievalEngine(RetrievalEngine re)
- Since:
- 3.0.0 BETA 0.2
getRetrievalEngine
public RetrievalEngine getRetrievalEngine()
setCaseBase
public void setCaseBase(ICaseBase cb)
- Since:
- 3.0.0 BETA 0.3
getCaseBase
public ICaseBase getCaseBase()
- Since:
- 3.0.0 BETA 0.3
getQueryInstance
public Instance getQueryInstance()
- Since:
- 3.0.0 BETA 0.2
resetQuery
public Instance resetQuery()
- Set all attributes to undefined
- Since:
- 3.0.0 BETA 0.3
setK
public void setK(int k)
- Since:
- 3.0.0 BETA 0.3
getK
public int getK()
- Since:
- 3.0.0 BETA 0.3
setRetrievalMethod
public final void setRetrievalMethod(Retrieval.RetrievalMethod m)
- Parameters:
m - the current retrieval method
isFinished
public boolean isFinished()
getRetrievalMethod
public final Retrieval.RetrievalMethod getRetrievalMethod()
- Returns:
- the current case
run
public void run()
- Specified by:
run in interface java.lang.Runnable
getResult
public java.util.List<Pair<Instance,Similarity>> getResult()