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
Modifier and TypeFieldDescriptionstatic final boolean
Specifies whether Query should be added to result list -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks whether the retriever is instructed to add the query to the RetrievalResultListnewQuery()
Creates a newQuery
for the retriever.Performs a retrieval for the given query.void
setAddQueryToResults
(boolean addQueryToResults) Instructs retriever to add the query to the RetrievalResultList depending on addQueryToResultsvoid
setInternalSimilarityMeasure
(String parameter) Sets internal similarity measure that is used to compute similarityvoid
setObjectPool
(ReadableObjectPool<TCase> pool) Sets the object pool.void
Sets the similarity model.
-
Field Details
-
DEFAULT_ADDQUERYTORESULTS
static final boolean DEFAULT_ADDQUERYTORESULTSSpecifies whether Query should be added to result list- See Also:
-
-
Method Details
-
setObjectPool
Sets the object pool.- Parameters:
pool
-
-
setSimilarityModel
Sets the similarity model. By default, the default model is used.- Parameters:
model
-
-
setInternalSimilarityMeasure
Sets internal similarity measure that is used to compute similarity -
perform
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 newQuery
for 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
-
getValuator
SimilarityValuator getValuator()
-