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 Type
    Method
    Description
    This method is invoked to convert a value object to a matchable demand value.
    This method returns the type of the match function.
    This method returns the unique match function name.
    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.
    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

      IMatchValue demandValueFor(IValue obj)
      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

      IMatchValue supplyValueFor(IValue obj)
      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

      int match(IMatchValue demand, IMatchValue supply)
      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

      int match(IMatchVisitor visitor, IMatchValue demand, IMatchValue supply)
      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.