Master Index Match Engine Reference

Step 5: Define Curve Adjustment or Linear Fitting (Optional)

If your custom comparators use curve adjustment or linear fitting to adjust matching weight calculations, you need to create a Java class that defines the curve. You do not need to create this file in the same package as the Java comparator class, but for packaging purposes, create it in the same working folder.

You need to perform this step if you defined the following line in comparatorsList.xml for the comparator:


<curve-adjust status="true" />

ProcedureTo Define Curve Adjustment or Linear Fitting

  1. Complete Step 4: Define Data Source Handling (Optional).

  2. Create a Java class named the same name as the Java class that defines the comparator with “CurveAdjustor” appended.

    For example, if the comparator is defined by a class named ExactComparator, the parameter validation class would be ExactComparatorCurveAdjustor.

  3. In this class, implement com.sun.mdm.matcher.configurator.CurveAdjustor.

    The method in this class is described below.

  4. Continue to Step 6: Compile and Package the Comparator.

processCurveAdjustment

Description

The processCurveAdjustment method provides handling for curve adjustment within a specific match comparator.

Syntax

double[] processCurveAdjustment(String compar, double[] cap)

Parameters

Parameter 

Type 

Description 

compar 

string 

The name of the comparator, as defined in the name attribute of the code element for the comparator. 

cap 

double[] 

An array of values that define the curve adjustment. 

Return Value

An array of curve adjustment values.

Throws

MatcherException