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 Details

    • MatchFunction

      protected MatchFunction(String name, String type)
  • Method Details

    • getName

      public String getName()
      Description copied from interface: IMatchFunction
      This method returns the unique match function name.
      Specified by:
      getName in interface IMatchFunction
      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 interface IMatchFunction
      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 interface IMatchFunction
    • 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 interface IMatchFunction
    • 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 interface IMatchFunction
      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.