Interface Retriever<TCase extends DataObject,TQuery extends Query>
-
- All Known Subinterfaces:
DependencyRetriever,ParallelLinearRetriever<TCase,TQuery>
- All Known Implementing Classes:
AbstractMACFACRetriever,DependencyRetrieverImpl,FeatureMACFACRetriever,FeatureRetriever,GraphAStarParallelRetrieverImpl,LinearRetrieverImpl,ParallelLinearRetrieverImpl,RetrieverImpl
public interface Retriever<TCase extends DataObject,TQuery extends Query>General retriever interface that describes the minimum methods a retriever must implement.- Author:
- Rainer Maximini
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEFAULT_ADDQUERYTORESULTSSpecifies whether Query should be added to result list
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisAddQueryToResults()Checks whether the retriever is instructed to add the query to the RetrievalResultListTQuerynewQuery()Creates a newQueryfor the retriever.RetrievalResultListperform(TQuery query)Performs a retrieval for the given query.voidsetAddQueryToResults(boolean addQueryToResults)Instructs retriever to add the query to the RetrievalResultList depending on addQueryToResultsvoidsetInternalSimilarityMeasure(String parameter)Sets internal similarity measure that is used to compute similarityvoidsetObjectPool(ReadableObjectPool<TCase> pool)Sets the object pool.voidsetSimilarityCache(SimilarityCache similarityCache)Sets the similarity cache.voidsetSimilarityModel(SimilarityModel model)Sets the similarity model.
-
-
-
Field Detail
-
DEFAULT_ADDQUERYTORESULTS
static final boolean DEFAULT_ADDQUERYTORESULTS
Specifies whether Query should be added to result list- See Also:
- Constant Field Values
-
-
Method Detail
-
setObjectPool
void setObjectPool(ReadableObjectPool<TCase> pool)
Sets the object pool.- Parameters:
pool-
-
setSimilarityModel
void setSimilarityModel(SimilarityModel model)
Sets the similarity model. By default, the default model is used.- Parameters:
model-
-
setSimilarityCache
void setSimilarityCache(SimilarityCache similarityCache)
Sets the similarity cache. By default, it is null.- Parameters:
similarityCache-
-
setInternalSimilarityMeasure
void setInternalSimilarityMeasure(String parameter)
Sets internal similarity measure that is used to compute similarity
-
perform
RetrievalResultList perform(TQuery query)
Performs a retrieval for the given query.- Parameters:
query- A query that can be created withnewQuery()- Returns:
- a list of retrieval results
-
newQuery
TQuery newQuery()
Creates a newQueryfor the retriever. Do not mix the query objects between different retrieval implementation because queries can be implementation dependent.- Returns:
- a new query object.
-
isAddQueryToResults
boolean isAddQueryToResults()
Checks whether the retriever is instructed to add the query to the RetrievalResultList- Returns:
- boolean
-
setAddQueryToResults
void setAddQueryToResults(boolean addQueryToResults)
Instructs retriever to add the query to the RetrievalResultList depending on addQueryToResults- Parameters:
addQueryToResults- Defines, whether query should be added or not
-
-