Class MatchFunction
- java.lang.Object
-
- com.aquima.interactions.matching.impl.functions.MatchFunction
-
- All Implemented Interfaces:
IMatchFunction
- Direct Known Subclasses:
CrossTableMatch
,EntityMatch
,EntityMatchDef
,ExactNumberMatch
,ExactStringMatch
,FullTextMatch
,LevenshteinMatch
,NormDistMatch
,RampMatch
,StringRangeMatch
,TrigramMatch
public abstract class MatchFunction extends Object implements IMatchFunction
Base class for most match functions.- Since:
- 6.2
- Author:
- O. Kerpershoek, F. van der Meer
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MatchFunction(String name, String type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMatchType()
This method returns the type of the match function.String
getName()
This method returns the unique match function name.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
onLoadComplete()
This method is invoked by the casebase after all the cases have been initialized.void
onStartup()
This method is invoked by the casebase before the cases are initialized.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.aquima.interactions.matching.IMatchFunction
demandValueFor, getSupportedTypes, match, supplyValueFor
-
-
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:IMatchFunction
This method returns the unique match function name.- Specified by:
getName
in interfaceIMatchFunction
- Returns:
- the unique match function name.
-
getMatchType
public String getMatchType()
Description copied from interface:IMatchFunction
This method returns the type of the match function.- Specified by:
getMatchType
in interfaceIMatchFunction
- Returns:
- the type of the match function.
-
onLoadComplete
public void onLoadComplete()
Description copied from interface:IMatchFunction
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.- Specified by:
onLoadComplete
in interfaceIMatchFunction
-
onStartup
public void onStartup()
Description copied from interface:IMatchFunction
This method is invoked by the casebase before the cases are initialized.- Specified by:
onStartup
in interfaceIMatchFunction
-
match
public int match(IMatchVisitor visitor, IMatchValue demand, IMatchValue supply)
Description copied from interface:IMatchFunction
This method should compare the demand value against the supply value and determine the match score.- Specified by:
match
in interfaceIMatchFunction
- 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.
-
-