Package com.aquima.interactions.matching
Interface IMatchFunction
- All Known Implementing Classes:
CrossTableMatch
,DateRampMatch
,EntityMatch
,EntityMatchDef
,ExactNumberMatch
,ExactStringMatch
,FullTextMatch
,IntersectionMatcher
,LevenshteinMatch
,MatchFunction
,MaximumMatcher
,MultiValueMatcher
,NormDistMatch
,NumberRampMatch
,RampMatch
,StringRangeMatch
,TrigramMatch
,UniqueMatcher
public interface IMatchFunction
This interface defines the methods a match function must implement.
- Since:
- 6.2
- Author:
- O. Kerpershoek, F. van der Meer
-
Method Summary
Modifier and TypeMethodDescriptiondemandValueFor
(IValue obj) This method is invoked to convert a value object to a matchable demand value.This method returns the type of the match function.getName()
This method returns the unique match function name.DataType[]
This method returns an array of data types that are supported by this match function.int
match
(IMatchValue demand, IMatchValue supply) This method should compare the demand value against the supply value and determine the match score.int
match
(IMatchVisitor visitor, IMatchValue demand, IMatchValue supply) This method should compare the demand value against the supply value and determine the match score.void
This method is invoked by the casebase after all the cases have been initialized.void
This method is invoked by the casebase before the cases are initialized.supplyValueFor
(IValue obj) This method is invoked to convert a value object to a matchable supply value.
-
Method Details
-
getName
String getName()This method returns the unique match function name.- Returns:
- the unique match function name.
-
getMatchType
String getMatchType()This method returns the type of the match function.- Returns:
- the type of the match function.
-
getSupportedTypes
DataType[] getSupportedTypes()This method returns an array of data types that are supported by this match function.- Returns:
- an array of data types that are supported by this match function.
-
onStartup
void onStartup()This method is invoked by the casebase before the cases are initialized. -
onLoadComplete
void onLoadComplete()This method is invoked by the casebase after all the cases have been initialized. The onLoadComplete method may be used to optimize or adjust weight values based on the distribution of the case values. -
demandValueFor
This method is invoked to convert a value object to a matchable demand value.- Parameters:
obj
- The value object that should be converted.- Returns:
- The demand value for the object value.
-
supplyValueFor
This method is invoked to convert a value object to a matchable supply value.- Parameters:
obj
- The value object that should be converted.- Returns:
- The supply value for the object value.
-
match
This method should compare the demand value against the supply value and determine the match score.- Parameters:
demand
- The value that is demanded.supply
- The value that is supplied.- Returns:
- The match score for the supply and demand combination.
-
match
This method should compare the demand value against the supply value and determine the match score.- Parameters:
visitor
- The visitor that should be notified of the match events.demand
- The value that is demanded.supply
- The value that is supplied.- Returns:
- The match score for the supply and demand combination.
-