Class CaseBaseTemplate

java.lang.Object
com.aquima.interactions.test.templates.AbstractReportingTemplate
com.aquima.interactions.test.templates.matching.CaseBaseTemplate

public class CaseBaseTemplate extends AbstractReportingTemplate
This template class may be used to initialize a casebase.
Since:
6.2
Author:
O. Kerpershoek, F. van der Meer
  • Constructor Details

    • CaseBaseTemplate

      public CaseBaseTemplate(com.aquima.interactions.foundation.report.IInitializationReport report, String entityName)
      Constructs the template with the required parameters.
      Parameters:
      report - The initialization report that should be used to add error snd warnings to.
      entityName - The name of the entity for which the casebase is defined.
  • Method Details

    • getMatchDefinition

      public MatchDefinitionTemplate getMatchDefinition(String attributeName)
      This method returns the match definition for the required attribute. When no match definition was found for the attribute, an exception is thrown.
      Parameters:
      attributeName - The name of the attribute for which the match definition is requested.
      Returns:
      The match definition for the specified attribute.
    • addMatchDefinition

      public MatchDefinitionTemplate addMatchDefinition(String attribute, String functionName)
      This method adds a match definition for the specified attribute.
      Parameters:
      attribute - The attribute for which the match definition is created.
      functionName - The name of the match function that should be used when matching the attribute.
      Returns:
      Match definition template that may be used to adjust the match settings.
    • getMatchDefinitions

      protected Collection<MatchDefinitionTemplate> getMatchDefinitions()
    • addCase

      public CaseTemplate addCase(String name)
      This method may be used to add a case to the casebase.
      Parameters:
      name - The name of the case that should be added.
      Returns:
      Case template that may be used to adjust the values of the case.
    • getCases

      protected Collection<CaseTemplate> getCases()
    • getCase

      public CaseTemplate getCase(String name)
      This method returns the case template for the specified name. If no case is found matching the name, a null value is returned.
      Parameters:
      name - The name of the requested case (template).
      Returns:
      Template representing the case with the specified name.
    • getEntityName

      protected String getEntityName()
    • getKeyField

      protected String getKeyField()
    • setKeyField

      public void setKeyField(String keyField)
      This method may be used to specify the attribute that should be used as key-field.
      Parameters:
      keyField - The attribute that should be used as key-field.
    • getMaxResults

      protected int getMaxResults()
    • setMaxResults

      public void setMaxResults(int maxResults)
      this method may be used to set the default number of results of a match action.
      Parameters:
      maxResults - the default number of results of a match action.
    • getCaseThreshold

      protected int getCaseThreshold()
    • setCaseThreshold

      public void setCaseThreshold(int threshold)
      This method may be used to set the default threshold for the cases.
      Parameters:
      threshold - the default threshold for the cases.
    • toDataSource

      public com.aquima.interactions.matching.ds.ICaseBaseDS toDataSource()
      This method converts the template to a data source that can be used to initialize the casebase.
      Returns:
      a data source that can be used to initialize the casebase.