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 Summary
ConstructorsModifierConstructorDescriptionprotected
MatchDefinition
(IEntityDefinition entity, MatchEngine matchEngine, IMatchDefinitionDS datasource) -
Method Summary
Modifier and TypeMethodDescriptionint
demandValueFor
(IValue profileValue) This method is invoked to convert a value object to a matchable demand value.This method returns the name of the attribute for which these match settings are defined.int
This method returns the threshold that should be used as default when the match request does not specify a threshold for the attribute.int
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.int
This method returns the weight that should be used when matching the attribute when no weight value is provided by the match request.This method returns the name of the attribute that should be used as modifier for the score of this attribute.This method returns the match function that will be used to match the attribute.This method returns the requirement that should be met before a match may be initiated for this attribute.boolean
This method returns a boolean indicating if the attribute this match definition is defined for can have multiple values.boolean
This method returns a boolean indicating if the attribute should be matched reversed.supplyValueFor
(IValue caseValue) This method is invoked to convert a value object to a matchable supply value.toString()
-
Constructor Details
-
MatchDefinition
protected MatchDefinition(IEntityDefinition entity, MatchEngine matchEngine, IMatchDefinitionDS datasource)
-
-
Method Details
-
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 interfaceIMatchDefinition
- Returns:
- The match function that should be used to match the attribute.
-
demandValueFor
Description copied from interface:IMatchDefinition
This method is invoked to convert a value object to a matchable demand value.- Specified by:
demandValueFor
in interfaceIMatchDefinition
- Parameters:
profileValue
- The value object that should be converted.- Returns:
- The demand value for the object value.
-
supplyValueFor
Description copied from interface:IMatchDefinition
This method is invoked to convert a value object to a matchable supply value.- Specified by:
supplyValueFor
in interfaceIMatchDefinition
- Parameters:
caseValue
- The value object that should be converted.- Returns:
- The supply value for the object value.
-
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 interfaceIMatchDefinition
- 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 interfaceIMatchDefinition
- 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 interfaceIMatchDefinition
- 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 interfaceIMatchDefinition
- 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 interfaceIMatchDefinition
- 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 interfaceIMatchDefinition
- Returns:
- Boolean indicating if the attribute can have multiple values.
-
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 interfaceIMatchDefinition
- Returns:
- the name of the attribute that should be used as modifier for the score of this attribute (may be null).
-
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 interfaceIMatchDefinition
- Returns:
- the requirement that should be met before a match may be initiated for this attribute.
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<IMatchDefinition>
-