Class DependencyRetrieverImpl
- java.lang.Object
-
- de.uni_trier.wi2.procake.utils.composition.FactoryObjectImplementation
-
- de.uni_trier.wi2.procake.utils.composition.AbstractEmptyFactoryObjectImplementation
-
- de.uni_trier.wi2.procake.retrieval.impl.RetrieverImpl<DataObject,DependencyQuery>
-
- de.uni_trier.wi2.procake.retrieval.impl.DependencyRetrieverImpl
-
- All Implemented Interfaces:
DependencyRetriever,Retriever<DataObject,DependencyQuery>
public class DependencyRetrieverImpl extends RetrieverImpl<DataObject,DependencyQuery> implements DependencyRetriever
Implementation ofDependencyRetriever.- Author:
- Rahol Kumar, Alexander Schultheis
-
-
Field Summary
-
Fields inherited from interface de.uni_trier.wi2.procake.retrieval.DependencyRetriever
DEFAULT_ALPHA, DEFAULT_RESULT_NUMBER, NAME
-
Fields inherited from interface de.uni_trier.wi2.procake.retrieval.Retriever
DEFAULT_ADDQUERYTORESULTS
-
-
Constructor Summary
Constructors Constructor Description DependencyRetrieverImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doublegetAlpha()Method, that returns the parameter alpha, which is a weighting factor, that enables adjusting both parts of the similarity computation to individual needs of the use case.intgetResultsNumber()Method, that returns the parameter k for the result numbers, that defines, how many dependency full matches must be found.StringgetRetrieverName()Method, that returns the retriever name.DependencyQuerynewQuery()Creates a newQueryfor the retriever.DependencyRetrievalResultListperform(DependencyQuery dependencyQuery)Method, to perform the dependency retrieval.voidsetAlpha(double alpha)Method, to set the parameter alpha, which is a weighting factor, that enables adjusting both parts of the similarity computation to individual needs of the use case.voidsetResultsNumber(int resultsNumber)Method, to set the parameter k for the result numbers, that defines, how many dependency full matches must be found.-
Methods inherited from class de.uni_trier.wi2.procake.retrieval.impl.RetrieverImpl
getInternalSimilarityMeasure, getObjectPool, getSimilarityCache, getSimilarityModel, getValuator, isAddQueryToResults, setAddQueryToResults, setInternalSimilarityMeasure, setObjectPool, setSimilarityCache, setSimilarityModel
-
Methods inherited from class de.uni_trier.wi2.procake.utils.composition.AbstractEmptyFactoryObjectImplementation
getParameters, postInit, preInit
-
Methods inherited from class de.uni_trier.wi2.procake.utils.composition.FactoryObjectImplementation
getParameter, initParametersBasedOn
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.uni_trier.wi2.procake.retrieval.Retriever
isAddQueryToResults, setAddQueryToResults, setInternalSimilarityMeasure, setObjectPool, setSimilarityCache, setSimilarityModel
-
-
-
-
Method Detail
-
newQuery
public DependencyQuery newQuery()
Description copied from interface:RetrieverCreates a newQueryfor the retriever. Do not mix the query objects between different retrieval implementation because queries can be implementation dependent.- Specified by:
newQueryin interfaceDependencyRetriever- Specified by:
newQueryin interfaceRetriever<DataObject,DependencyQuery>- Overrides:
newQueryin classRetrieverImpl<DataObject,DependencyQuery>- Returns:
- a new query object.
-
perform
public DependencyRetrievalResultList perform(DependencyQuery dependencyQuery)
Method, to perform the dependency retrieval. Necessary to cast the objects in method signature.- Specified by:
performin interfaceDependencyRetriever- Specified by:
performin interfaceRetriever<DataObject,DependencyQuery>- Parameters:
dependencyQuery- A dependency query that can be created withnewQuery()- Returns:
- a list of retrieval results
-
setResultsNumber
public void setResultsNumber(int resultsNumber)
Description copied from interface:DependencyRetrieverMethod, to set the parameter k for the result numbers, that defines, how many dependency full matches must be found. If not at least k such case combinations were detected, a search of combined cases using dependency similarities is performed.- Specified by:
setResultsNumberin interfaceDependencyRetriever- Parameters:
resultsNumber- The parameter k defines, how many dependency full matches must be found.
-
getResultsNumber
public int getResultsNumber()
Description copied from interface:DependencyRetrieverMethod, that returns the parameter k for the result numbers, that defines, how many dependency full matches must be found. If not at least k such case combinations were detected, a search of combined cases using dependency similarities is performed.- Specified by:
getResultsNumberin interfaceDependencyRetriever- Returns:
- The parameter k defines, how many dependency full matches must be found.
-
getRetrieverName
public String getRetrieverName()
Method, that returns the retriever name.- Returns:
- The name of the retriever.
-
setAlpha
public void setAlpha(double alpha)
Description copied from interface:DependencyRetrieverMethod, to set the parameter alpha, which is a weighting factor, that enables adjusting both parts of the similarity computation to individual needs of the use case. The default weight isDependencyRetriever.DEFAULT_ALPHA.- Specified by:
setAlphain interfaceDependencyRetriever- Parameters:
alpha- The weighting parameter alpha, that should be used.
-
getAlpha
public double getAlpha()
Description copied from interface:DependencyRetrieverMethod, that returns the parameter alpha, which is a weighting factor, that enables adjusting both parts of the similarity computation to individual needs of the use case.- Specified by:
getAlphain interfaceDependencyRetriever- Returns:
- The weighting parameter alpha, that is used.
-
-