Class MatchInstance

java.lang.Object
com.aquima.interactions.matching.request.MatchInstance
All Implemented Interfaces:
IMatchableInstance
Direct Known Subclasses:
MatchRequest

public class MatchInstance extends Object implements IMatchableInstance
This class is used by the match request to store an instance that should be matched.
Since:
6.2
Author:
O. Kerpershoek, F. van der Meer
  • Constructor Details

  • Method Details

    • getEntityName

      public String getEntityName()
      Description copied from interface: IMatchableInstance
      This method returns the entity name of the casebase against which this match request should be matched.
      Specified by:
      getEntityName in interface IMatchableInstance
      Returns:
      the entity name of the casebase against which this match request should be matched.
    • getInstanceName

      public String getInstanceName()
      Description copied from interface: IMatchableInstance
      This method returns the name of the instance. The name is used to identify the instance in for instance a detail match.
      Specified by:
      getInstanceName in interface IMatchableInstance
      Returns:
      The name of the instance this interface represents.
    • getThresholdPercentage

      public int getThresholdPercentage()
      Description copied from interface: IMatchableInstance
      This method returns the threshold for the instance score. When the instance scores less than the threshold, the case will be removed from consideration. The default threshold returned by this method is -1, indicating that the default as specified in the match engine should be used.
      Specified by:
      getThresholdPercentage in interface IMatchableInstance
      Returns:
      The threshold that should be used for this instance.
    • setThresholdPercentage

      public void setThresholdPercentage(int threshold)
      Description copied from interface: IMatchableInstance
      This method may be used to specify the threshold that should be used for this instance. A threshold should be an integer ranging from zero to 100, where a value of zero means that the threshold should be disabled (as all instances will at least score zero).
      Specified by:
      setThresholdPercentage in interface IMatchableInstance
      Parameters:
      threshold - The threshold that should be used when matching this instance.
    • getInstances

      public IMatchableInstance[] getInstances(String relation)
      Description copied from interface: IMatchableInstance
      This method may be used to retrieve the instances that will be matched for the specified relation attribute.
      Specified by:
      getInstances in interface IMatchableInstance
      Parameters:
      relation - The relation attribute for which the instances are requested.
      Returns:
      The instances that will be match for the spacified relation attribute.
    • setValue

      public MatchAttribute setValue(String attribute, IValue attrValue)
      This method can be used to set a value in the matchable instance of the match request.
      Parameters:
      attribute - The name of the attribute for which the value is set.
      attrValue - The value of the attribute.
      Returns:
      MatchAttribute object representing the value that should be matched.
      Throws:
      UnknownAttributeException - This exception is thrown when the attribute name is not known in the instance this MatchableInstance represents.
    • addInstance

      public MatchInstance addInstance(String attribute, IEntityDefinition type, String name)
      This method may be used to add a matchable instance to this instance.
      Parameters:
      attribute - The (relation) attribute the instance should be added to.
      type - The type of the entity the instance will represent.
      name - The name of the instance.
      Returns:
      New matchable instance class that represents the newly added instance.
      Throws:
      UnknownAttributeException - This exception is thrown when an invalid (relation) attribute name is provided.
    • getValue

      public IMatchableAttribute getValue(String attribute)
      Description copied from interface: IMatchableInstance
      This method may be used to retrieve the match settings for the specified attribute.
      Specified by:
      getValue in interface IMatchableInstance
      Parameters:
      attribute - The attribute for which the match settings are requested.
      Returns:
      The match settings for the specified attribute.