edu.uky.kcr.recordlinkage.engine
Class ExactMatchLinkageEngine

java.lang.Object
  extended by edu.uky.kcr.recordlinkage.engine.AbstractLinkageEngine
      extended by edu.uky.kcr.recordlinkage.engine.ExactMatchLinkageEngine
All Implemented Interfaces:
LinkageEngine

public class ExactMatchLinkageEngine
extends AbstractLinkageEngine

A simple, deterministic LinkageEngine that matches values from fields in two records using the String.equals(Object) method. If the field values are equal, the score of the returned LinkageMatch is set to EXACT_MATCH_SCORE, otherwise the score is set to NO_MATCH_SCORE. There are no indeterminate matches from this engine.
The list fields to compare are read from MatchingConfiguration objects in the LinkageConfiguration object. Each of these field comparisons are "AND'd" together to get a final determination of the match.

Author:
ihands

Field Summary
static java.lang.Float EXACT_MATCH_SCORE
           
static java.lang.String NAME
           
static java.lang.Float NO_MATCH_SCORE
           
 
Constructor Summary
ExactMatchLinkageEngine()
           
 
Method Summary
 java.util.List<LinkageMatch> getLinkageMatches(LinkageDataSource primaryDataSource, DataSourceRecord secondaryDataSourceRecord)
          This method should be the only method that a LinkageEngine implementer needs to implement.
 java.lang.String getName()
           
 
Methods inherited from class edu.uky.kcr.recordlinkage.engine.AbstractLinkageEngine
findLinkedRecords, getLinkageConfiguration, getPrimaryUnblocked, getSecondaryUnblocked, initialize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

EXACT_MATCH_SCORE

public static java.lang.Float EXACT_MATCH_SCORE

NO_MATCH_SCORE

public static java.lang.Float NO_MATCH_SCORE
Constructor Detail

ExactMatchLinkageEngine

public ExactMatchLinkageEngine()
Method Detail

getName

public java.lang.String getName()
Returns:
the name of the LinkageEngine as specified by the "name" attribute in a LinkageConfiguration file

getLinkageMatches

public java.util.List<LinkageMatch> getLinkageMatches(LinkageDataSource primaryDataSource,
                                                      DataSourceRecord secondaryDataSourceRecord)
                                               throws LinkageException
Description copied from class: AbstractLinkageEngine
This method should be the only method that a LinkageEngine implementer needs to implement. It is called after the unblocked lists have been populated so that unblocked records are available through AbstractLinkageEngine.getPrimaryUnblocked() and AbstractLinkageEngine.getSecondaryUnblocked(). An implementer needs to create LinkageMatch objects with a valid score for each record-to-record match from the primaryDataSource to the secondaryDataSourceRecord.

Specified by:
getLinkageMatches in class AbstractLinkageEngine
Parameters:
primaryDataSource - Source of data records to match against the secondary record.
secondaryDataSourceRecord - Single record from the secondary data source that should be scored against the primary records.
Returns:
List of LinkageMatch objects with a valid score.
Throws:
LinkageException