Class MatchInstance
java.lang.Object
com.aquima.interactions.matching.request.MatchInstance
- All Implemented Interfaces:
IMatchableInstance
- Direct Known Subclasses:
MatchRequest
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 Summary
ConstructorsModifierConstructorDescriptionprotected
MatchInstance
(IEntityDefinition entity, String name) protected
MatchInstance
(IEntityInstance instance, IAttributeFilter filter, Set<EntityValue> matchableInstanceCache) -
Method Summary
Modifier and TypeMethodDescriptionaddInstance
(String attribute, IEntityDefinition type, String name) This method may be used to add a matchable instance to this instance.This method returns the entity name of the casebase against which this match request should be matched.This method returns the name of the instance.getInstances
(String relation) This method may be used to retrieve the instances that will be matched for the specified relation attribute.int
This method returns the threshold for the instance score.This method may be used to retrieve the match settings for the specified attribute.void
setThresholdPercentage
(int threshold) This method may be used to specify the threshold that should be used for this instance.This method can be used to set a value in the matchable instance of the match request.
-
Constructor Details
-
MatchInstance
protected MatchInstance(IEntityInstance instance, IAttributeFilter filter, Set<EntityValue> matchableInstanceCache) -
MatchInstance
-
-
Method Details
-
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 interfaceIMatchableInstance
- Returns:
- the entity name of the casebase against which this match request should be matched.
-
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 interfaceIMatchableInstance
- 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 interfaceIMatchableInstance
- 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 interfaceIMatchableInstance
- Parameters:
threshold
- The threshold that should be used when matching this instance.
-
getInstances
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 interfaceIMatchableInstance
- Parameters:
relation
- The relation attribute for which the instances are requested.- Returns:
- The instances that will be match for the spacified relation attribute.
-
setValue
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
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
Description copied from interface:IMatchableInstance
This method may be used to retrieve the match settings for the specified attribute.- Specified by:
getValue
in interfaceIMatchableInstance
- Parameters:
attribute
- The attribute for which the match settings are requested.- Returns:
- The match settings for the specified attribute.
-