Class 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
  • Constructor Details

    • DependencyRetrieverImpl

      public DependencyRetrieverImpl()
  • Method Details

    • newQuery

      public DependencyQuery newQuery()
      Description copied from interface: Retriever
      Creates a new Query for the retriever. Do not mix the query objects between different retrieval implementation because queries can be implementation dependent.
      Specified by:
      newQuery in interface DependencyRetriever
      Specified by:
      newQuery in interface Retriever<DataObject,DependencyQuery>
      Overrides:
      newQuery in class RetrieverImpl<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:
      perform in interface DependencyRetriever
      Specified by:
      perform in interface Retriever<DataObject,DependencyQuery>
      Parameters:
      dependencyQuery - A dependency query that can be created with newQuery()
      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 interface DependencyRetriever
      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 interface DependencyRetriever
      Returns:
      The parameter k defines, how many dependency full matches must be found.
    • getRetrieverName

      public String getRetrieverName()
      Method, that returns the retriever name.
      Specified by:
      getRetrieverName in interface RetrievalFactoryObject
      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 is DependencyRetriever.DEFAULT_ALPHA.
      Specified by:
      setAlpha in interface DependencyRetriever
      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 interface DependencyRetriever
      Returns:
      The weighting parameter alpha, that is used.