|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.uky.kcr.recordlinkage.engine.AbstractLinkageEngine
public abstract class AbstractLinkageEngine
This class provides the most convenient way to create a LinkageEngine implementation.
It provides the following features to implementers:
getLinkageMatches(LinkageDataSource, DataSourceRecord).getPrimaryUnblocked()
and getSecondaryUnblocked() methods.LinkageResultSet is created automatically from the returned LinkageMatch objects in the
getLinkageMatches(LinkageDataSource, DataSourceRecord) call.LinkageConfiguration object is available from its getter method.getLinkageMatches(LinkageDataSource, DataSourceRecord)
method to perform a linkage operation, returning a List of LinkageMatch objects. AbstractLinkageEngine implementation:
LinkageController creates an AbstractLinkageEngine object by reading the LinkageConfiguration.getLinkageEngineClassName() value
as a the type of class to instantiate. The LinkageController then initializes the engine with the LinkageConfiguration object and calls
LinkageEngine.findLinkedRecords(LinkageDataSource, LinkageDataSource).AbstractLinkageEngine calls buildUnblockedLists(LinkageDataSource, LinkageDataSource) to create the lists of
primary and secondary unblocked records from the BlockingConfiguration objects in LinkageConfiguration.AbstractLinkageEngine then iterates through every unblocked record from the secondary data source and calls
getLinkageMatches(LinkageDataSource, DataSourceRecord) with that record.LinkageDataSource to the passed-in secondary record and create a list of
LinkageMatch objects with a valid score for each match.getLinkageMatches(LinkageDataSource, DataSourceRecord), the
AbstractLinkageEngine will iterate through the LinkageMatch objects and compare their LinkageMatch.getScore() value with the
LinkageConfiguration.getPositiveMatchCutoffScore() and LinkageConfiguration.getNegativeMatchCutoffScore() to know whether they are positive
or indeterminate matches.AbstractLinkageEngine will return a LinkageResultSet with the LinkageMatch
results.AbstractLinkageEngine, but if you define any, you will need to also define the
default constructor that takes no arguments. This requirement is related to the way that the LinkageController instantiates LinkageEngines by
class name.
| Constructor Summary | |
|---|---|
AbstractLinkageEngine()
|
|
| Method Summary | |
|---|---|
LinkageResultSet |
findLinkedRecords(LinkageDataSource primaryDataSource,
LinkageDataSource secondaryDataSource)
Primary workhorse method for a linkage operation, this is where deterministic and probabilistic methods are used to match records. |
LinkageConfiguration |
getLinkageConfiguration()
|
abstract java.util.List<LinkageMatch> |
getLinkageMatches(LinkageDataSource primaryDataSource,
DataSourceRecord secondaryDataSourceRecord)
This method should be the only method that a LinkageEngine implementer needs to implement. |
java.util.Set<DataSourceRecord> |
getPrimaryUnblocked()
|
java.util.Set<DataSourceRecord> |
getSecondaryUnblocked()
|
void |
initialize(LinkageConfiguration linkageConfiguration)
This method is called immediately after the LinkageEngine is created, before LinkageEngine.findLinkedRecords(LinkageDataSource, LinkageDataSource) is called. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface edu.uky.kcr.recordlinkage.engine.LinkageEngine |
|---|
getName |
| Constructor Detail |
|---|
public AbstractLinkageEngine()
| Method Detail |
|---|
public void initialize(LinkageConfiguration linkageConfiguration)
LinkageEngineLinkageEngine.findLinkedRecords(LinkageDataSource, LinkageDataSource) is called.
initialize in interface LinkageEnginelinkageConfiguration - Configuration object containing the BlockingConfiguration, MatchingConfiguration, and cutoff scores necessary for a
LinkageMatch to be determined by this engine.public LinkageConfiguration getLinkageConfiguration()
LinkageConfiguration object that was passed into the LinkageEngine.initialize(LinkageConfiguration) method.
public abstract java.util.List<LinkageMatch> getLinkageMatches(LinkageDataSource primaryDataSource,
DataSourceRecord secondaryDataSourceRecord)
throws LinkageException
getPrimaryUnblocked() and
getSecondaryUnblocked(). An implementer needs to create LinkageMatch objects with a valid score for each
record-to-record match from the primaryDataSource to the secondaryDataSourceRecord.
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.
LinkageMatch objects with a valid score.
LinkageException
public LinkageResultSet findLinkedRecords(LinkageDataSource primaryDataSource,
LinkageDataSource secondaryDataSource)
throws LinkageException
LinkageEngine
findLinkedRecords in interface LinkageEngineprimaryDataSource - A source of DataSourceRecords to be linked, typically the larger data set.secondaryDataSource - A second source of DataSourceRecords to be linked, typically the smaller data set.
LinkageMatch objects, as well as any
unmatched records.
LinkageExceptionpublic java.util.Set<DataSourceRecord> getPrimaryUnblocked()
Set of DataSourceRecord objects from the primary data source that have not been blocked by
BlockingConfiguration objects in the LinkageConfiguration.public java.util.Set<DataSourceRecord> getSecondaryUnblocked()
Set of DataSourceRecord objects from the secondary data source that have not been blocked by
BlockingConfiguration objects in the LinkageConfiguration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||