The addToMatchWindow() adds a match candidate to a linked list that is subsequently sent to the Director matcher server when matchCandidate() is called.
The client should check the error code after each add ToMatchWindow() call. If the value 705 is returned, the number of records added to the match window has exceeded the maximum window size. The application should attempt the match again. Note that the record that caused the 705 error code was not processed.
Syntax
public void addToMatchWindow(int handle,
java.lang.String trillName[],
java.lang.String inputData[],
java.lang.String key,
int retCode[]);
Parameters
Name |
Type |
Use |
Length |
Description |
---|---|---|---|---|
handle |
int |
In |
–– |
Handle to a Director matcher server. |
trillName |
string[ ] |
In |
n* |
Array of strings that contains the field names of the candidate data. These field names correspond to the field names in the DDL file. |
inputData |
string[ ] |
In |
n* |
Array of strings containing candidate data. |
key |
string |
In |
user-defined |
Unique “key” for this candidate. This value will be subsequently returned by the matchCandidate() method if the matcher server identifies this candidate as a match. |
retCode |
int[ ] |
Out |
4 |
Error code that indicates status of method call. |
*indicates a platform-specific length; that is, 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);
inputData[0] = "JOHN"; // Error handling omitted
inputData[1] = "SMITH";
inputData[2] = "D";
keyValue = "1ST JOHN"; // Add first candidate to match window
testClient.addToMatchWindow(handle, matchFields, inputData,
keyValue, retCode);
inputData[0] = "JOHNATHAN";
inputData[1] = "SMITH";
inputData[2] = "DAVID";
keyValue = "2ND JOHN"; // Add second candidate to match window
testClient.addToMatchWindow(handle, matchFields, inputData,
keyValue, retCode);
inputData[0] = "J";
inputData[1] = "SMITH";
inputData[2] = "D";
keyValue = "3RD JOHN"; // Add third candidate to match window
testClient.addToMatchWindow(handle, matchFields, inputData,
keyValue, retCode);
inputData[0] = "JOHN";
inputData[1] = "SMITH";
inputData[2] = ""; // Match current record against candidates
testClient.matchCandidate(handle, matchFields, inputData, outKeys,
outPats, retCode);