matchCandidateWithSuspects() - 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 matchCandidateWithSuspects() method matches a record to the candidates that are in the match window and returns an array of keys and a corresponding array of match patterns for each candidate that is a match or match suspect. If only matches are required, use the matchCandidate() method in matchCandidate().

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

Syntax

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

public void matchCandidateWithSuspects(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.

trillName

string[ ]

In

n*

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

inputData

string[ ]

In

n*

Array of strings containing the data to match.

key

string[ ]

Out

n*

Array of strings that contains the keys of the candidates that matched the input record. 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. 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 indicating the status of the method call.

n* indicates that the length depends on the platform on which the program runs.

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
// Return matches and suspects

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