Class MatchDefinition

java.lang.Object
com.aquima.interactions.matching.impl.model.MatchDefinition
All Implemented Interfaces:
IMatchDefinition, Comparable<IMatchDefinition>

public class MatchDefinition extends Object implements IMatchDefinition, Comparable<IMatchDefinition>
This class holds the match definition of a single matchable attribute.
Since:
6.2
Author:
O. Kerpershoek, F. van der Meer
  • Constructor Details

  • Method Details

    • getMatchFunction

      public IMatchFunction getMatchFunction()
      Description copied from interface: IMatchDefinition
      This method returns the match function that will be used to match the attribute. The match function might be wrapped with a multivalue matcher, depending on the strategy.
      Specified by:
      getMatchFunction in interface IMatchDefinition
      Returns:
      The match function that should be used to match the attribute.
    • demandValueFor

      public IMatchValue demandValueFor(IValue profileValue)
      Description copied from interface: IMatchDefinition
      This method is invoked to convert a value object to a matchable demand value.
      Specified by:
      demandValueFor in interface IMatchDefinition
      Parameters:
      profileValue - The value object that should be converted.
      Returns:
      The demand value for the object value.
    • supplyValueFor

      public IMatchValue supplyValueFor(IValue caseValue)
      Description copied from interface: IMatchDefinition
      This method is invoked to convert a value object to a matchable supply value.
      Specified by:
      supplyValueFor in interface IMatchDefinition
      Parameters:
      caseValue - The value object that should be converted.
      Returns:
      The supply value for the object value.
    • getAttributeName

      public String getAttributeName()
      Description copied from interface: IMatchDefinition
      This method returns the name of the attribute for which these match settings are defined.
      Specified by:
      getAttributeName in interface IMatchDefinition
      Returns:
      the name of the attribute for which these match settings are defined.
    • getDefaultWeight

      public int getDefaultWeight()
      Description copied from interface: IMatchDefinition
      This method returns the weight that should be used when matching the attribute when no weight value is provided by the match request.
      Specified by:
      getDefaultWeight in interface IMatchDefinition
      Returns:
      The weight that should be used as default when matching the attribute.
    • getDefaultThresholdPercentage

      public int getDefaultThresholdPercentage()
      Description copied from interface: IMatchDefinition
      This method returns the threshold that should be used as default when the match request does not specify a threshold for the attribute.
      Specified by:
      getDefaultThresholdPercentage in interface IMatchDefinition
      Returns:
      The threshold that should be used when matching the attribute.
    • getDefaultUnknownPercentage

      public int getDefaultUnknownPercentage()
      Description copied from interface: IMatchDefinition
      This method returns the unknown percentage that should be used as default when the match request does not specify an unknown percentage for the attribute.
      Specified by:
      getDefaultUnknownPercentage in interface IMatchDefinition
      Returns:
      The unknown percentage that should be used when matching the attribute.
    • isReverseMatch

      public boolean isReverseMatch()
      Description copied from interface: IMatchDefinition
      This method returns a boolean indicating if the attribute should be matched reversed. A reverse match means that the supply and demand values are switched, so the case value (demand) will be matched against the profile value (supply).
      Specified by:
      isReverseMatch in interface IMatchDefinition
      Returns:
      a boolean indicating if the attribute should be matched reversed.
    • isMultivalue

      public boolean isMultivalue()
      Description copied from interface: IMatchDefinition
      This method returns a boolean indicating if the attribute this match definition is defined for can have multiple values.
      Specified by:
      isMultivalue in interface IMatchDefinition
      Returns:
      Boolean indicating if the attribute can have multiple values.
    • getMasterAttributeName

      public String getMasterAttributeName()
      Description copied from interface: IMatchDefinition
      This method returns the name of the attribute that should be used as modifier for the score of this attribute. When a master attribute has been specified, the score of this attribute will be multiplied by (percentage wise) with the score of the master attribute. In effect this means that this attribute can never score higher than its master attribute, thus creating a dependency between the two.
      Specified by:
      getMasterAttributeName in interface IMatchDefinition
      Returns:
      the name of the attribute that should be used as modifier for the score of this attribute (may be null).
    • getRequirementType

      public RequirementType getRequirementType()
      Description copied from interface: IMatchDefinition
      This method returns the requirement that should be met before a match may be initiated for this attribute.
      Specified by:
      getRequirementType in interface IMatchDefinition
      Returns:
      the requirement that should be met before a match may be initiated for this attribute.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • compareTo

      public int compareTo(IMatchDefinition md)
      Specified by:
      compareTo in interface Comparable<IMatchDefinition>