matchCandidate() - trillium_quality - 17.2

Trillium Director SDK Reference Guide

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Quality
Version
17.2
Language
English
Product name
Trillium Quality
Title
Trillium Director SDK Reference Guide
Topic type
Overview
Administration
Configuration
Installation
Reference
How Do I
First publish date
2008

The matchCandidate method matches a record to the candidates that are in the match window. This method returns an array of keys and a corresponding array of match patterns for each candidate that matches.

This method does not return match suspects. To return match suspects as well as matches, use the matchCandidateWithSuspects method described in matchCandidateWithSuspects().

This method has two signatures. Choose one depending on whether or not you want to explicitly identify the match level.

Syntax

public void matchCandidate(int handle,
                          java.lang.String trillName[],
                          java.lang.String inputData[],
                          java.lang.String key[],
                          java.lang.String matchPattern[],
                          int matchLevel,
                          int retCode[]);
public void matchCandidate(int handle,
                          java.lang.String trillName[],
                          java.lang.String inputData[],
                          java.lang.String key[],
                          java.lang.String matchPattern[],
                          int retCode[]);

Parameters

Name

Type

Use

Length

Description

handle

int

In

––

Handle to a Director matcher server instance.

trillName

string[ ]

In

n*

Array of strings that contains the field names of the record to match. These field names correspond to the field names in the DDL files.

inputData

string[ ]

In

n*

Array of strings that contains data to match.

key

string[ ]

Out

n*

Array of strings that contains the keys of the candidates that matched the input record. This array must be pre-allocated by the caller with the number of elements equal to the number of records in the match window.

matchPattern

string[ ]

Out

n*

Array of strings that contains the match patterns that correspond to the candidate keys returned in key. This array must be pre-allocated by the caller with the number of elements equal to the number of records in the match window.

matchLevel

int

In

--

Match level to be performed: 1 or 2. If not specified, it defaults to Level 1.

retCode

int[ ]

Out

4

Error code that indicates the status of the method call

n* indicates the maximum length. The total length depends on the number of elements allocated and the plaform on which the program is run.

Return Values

Refer to Return Values.

Example

TrilTGenClient testClient = new TrilTGenClient();
int[] retCode = new int[1];               // Return code and handle
int handle = 0;
char systemID;                       // System and Server ID for attach()
String serverName;
String[] matchFields = {"FirstName", "LastName", "MiddleName"};
String[] inputData = new String[3];
String keyValue;
String[] outPats = new String[12];
String[] outKeys = new String[12];

systemID = 'G';
serverName = "RMatcher";
handle = testClient.openMatcherEx(systemID, serverName, retCode);

testClient.clearWindow(handle, retCode); // Error handling omitted
inputData[0] = "JOHN";
inputData[1] = "SMITH";
inputData[2] = "D";
keyValue = "1ST JOHN";
testClient.addToMatchWindow(handle, matchFields, inputData, keyValue,
    retCode);

inputData[0] = "JOHNATHAN";
inputData[1] = "SMITH";
inputData[2] = "DAVID";
keyValue = "2ND JOHN";
testClient.addToMatchWindow(handle, matchFields, inputData, keyValue,
retCode);

inputData[0] = "J";
inputData[1] = "SMITH";
inputData[2] = "D";
keyValue = "3RD JOHN";
testClient.addToMatchWindow(handle, matchFields, inputData, keyValue,
retCode);

inputData[0] = "JOHN";
inputData[1] = "SMITH";
inputData[2] = "";

// Match this record

testClient.matchCandidate(handle, matchFields, inputData, outKeys, outPats,
retCode);