use of org.talend.dataquality.record.linkage.grouping.swoosh.AnalysisSwooshMatchRecordGrouping in project tdq-studio-se by Talend.
the class ExecuteMatchRuleHandler method computeMatchGroupResult.
/**
* DOC zhao Comment method "computeMatchGroupResult".
*
* @param columnMap
* @param matchResultConsumer
* @param matchRows
* @return
*/
private void computeMatchGroupResult(Map<MetadataColumn, String> columnMap, MatchGroupResultConsumer matchResultConsumer, List<Object[]> matchRows, RecordMatchingIndicator recordMatchingIndicator) throws BusinessException {
boolean isOpenWarningDialog = false;
AnalysisMatchRecordGrouping analysisMatchRecordGrouping = null;
if (recordMatchingIndicator.getBuiltInMatchRuleDefinition().getRecordLinkageAlgorithm().equals(RecordMatcherType.T_SwooshAlgorithm.name())) {
analysisMatchRecordGrouping = new AnalysisSwooshMatchRecordGrouping(matchResultConsumer);
} else {
analysisMatchRecordGrouping = new AnalysisMatchRecordGrouping(matchResultConsumer);
}
AnalysisRecordGroupingUtils.setRuleMatcher(columnMap, recordMatchingIndicator, analysisMatchRecordGrouping);
analysisMatchRecordGrouping.setMatchRows(matchRows);
try {
AnalysisRecordGroupingUtils.initialMatchGrouping(columnMap, recordMatchingIndicator, analysisMatchRecordGrouping);
// TDQ-14276 set the Map<columnName, dataPattern>
Map<String, String> patternMap = AnalysisRecordGroupingUtils.createColumnDatePatternMap(columnMap, colName2IndexMap);
analysisMatchRecordGrouping.setColumnDatePatternMap(patternMap);
analysisMatchRecordGrouping.run();
} catch (InstantiationException e1) {
isOpenWarningDialog = true;
} catch (IllegalAccessException e1) {
isOpenWarningDialog = true;
} catch (ClassNotFoundException e1) {
isOpenWarningDialog = true;
} finally {
if (isOpenWarningDialog) {
BusinessException businessException = new BusinessException();
throw businessException;
}
}
}
Aggregations