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
,RetrievalFactoryObject
,Retriever<DataObject,
DependencyQuery>
public class DependencyRetrieverImpl
extends RetrieverImpl<DataObject,DependencyQuery>
implements DependencyRetriever
Implementation of
DependencyRetriever
.- Author:
- Rahol Kumar, Alexander Schultheis
-
Field Summary
Fields inherited from interface de.uni_trier.wi2.procake.retrieval.DependencyRetriever
DEFAULT_ALPHA, DEFAULT_RESULT_NUMBER
Fields inherited from interface de.uni_trier.wi2.procake.retrieval.Retriever
DEFAULT_ADDQUERYTORESULTS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondouble
getAlpha()
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.int
Method, that returns the parameter k for the result numbers, that defines, how many dependency full matches must be found.Method, that returns the retriever name.newQuery()
Creates a newQuery
for the retriever.perform
(DependencyQuery dependencyQuery) Method, to perform the dependency retrieval.void
setAlpha
(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.void
setResultsNumber
(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, getSimilarityModel, getValuator, isAddQueryToResults, setAddQueryToResults, setInternalSimilarityMeasure, setObjectPool, 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
getValuator, isAddQueryToResults, setAddQueryToResults, setInternalSimilarityMeasure, setObjectPool, setSimilarityModel
-
Constructor Details
-
DependencyRetrieverImpl
public DependencyRetrieverImpl()
-
-
Method Details
-
newQuery
Description copied from interface:Retriever
Creates a newQuery
for the retriever. Do not mix the query objects between different retrieval implementation because queries can be implementation dependent.- Specified by:
newQuery
in interfaceDependencyRetriever
- Specified by:
newQuery
in interfaceRetriever<DataObject,
DependencyQuery> - Overrides:
newQuery
in classRetrieverImpl<DataObject,
DependencyQuery> - Returns:
- a new query object.
-
perform
Method, to perform the dependency retrieval. Necessary to cast the objects in method signature.- Specified by:
perform
in interfaceDependencyRetriever
- Specified by:
perform
in 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:DependencyRetriever
Method, 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:
setResultsNumber
in interfaceDependencyRetriever
- Parameters:
resultsNumber
- The parameter k defines, how many dependency full matches must be found.
-
getResultsNumber
public int getResultsNumber()Description copied from interface:DependencyRetriever
Method, 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:
getResultsNumber
in interfaceDependencyRetriever
- Returns:
- The parameter k defines, how many dependency full matches must be found.
-
getRetrieverName
Method, that returns the retriever name.- Specified by:
getRetrieverName
in interfaceRetrievalFactoryObject
- Returns:
- The name of the retriever.
-
setAlpha
public void setAlpha(double alpha) Description copied from interface:DependencyRetriever
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. The default weight isDependencyRetriever.DEFAULT_ALPHA
.- Specified by:
setAlpha
in interfaceDependencyRetriever
- Parameters:
alpha
- The weighting parameter alpha, that should be used.
-
getAlpha
public double getAlpha()Description copied from interface:DependencyRetriever
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.- Specified by:
getAlpha
in interfaceDependencyRetriever
- Returns:
- The weighting parameter alpha, that is used.
-