use of org.talend.dataquality.rules.MatchRule in project tdq-studio-se by Talend.
the class AnaMatchSurvivorSection method getCurrentTabDefinitions.
/*
* (non-Javadoc)
*
* @see org.talend.dataquality.record.linkage.ui.section.MatchingKeySection#getCurrentTabDefinitions()
*/
@Override
protected List<?> getCurrentTabDefinitions() {
MatchKeyAndSurvivorTableComposite matchRuleTableComp = (MatchKeyAndSurvivorTableComposite) getCurrentMatchRuleTableComposite();
MatchRule matchRule = matchRuleTableComp.getMatchRule();
List<MatchKeyAndSurvivorDefinition> matchAndSurvDefList = matchRuleWithSurvMap.get(matchRule);
return matchAndSurvDefList;
}
use of org.talend.dataquality.rules.MatchRule in project tdq-studio-se by Talend.
the class AnaMatchSurvivorSection method deleteMatchRuleTab.
/*
* (non-Javadoc)
*
* @see
* org.talend.dataquality.record.linkage.ui.section.MatchingKeySection#deleteMatchRuleTab(org.eclipse.swt.custom
* .CTabItem)
*/
@Override
protected void deleteMatchRuleTab(CTabItem tabItem) {
MatchRule matchRule = getMatchRule(tabItem);
List<MatchKeyAndSurvivorDefinition> matchAndSurvDefList = matchRuleWithSurvMap.get(matchRule);
MatchRuleDefinition matchRuleDefinition = getMatchRuleDefinition();
for (MatchKeyAndSurvivorDefinition matchAndSurvDef : matchAndSurvDefList) {
matchRuleDefinition.getSurvivorshipKeys().remove(matchAndSurvDef.getSurvivorShipKey());
}
matchRuleWithSurvMap.remove(matchRule);
super.deleteMatchRuleTab(tabItem);
}
use of org.talend.dataquality.rules.MatchRule in project tdq-studio-se by Talend.
the class EditSortMatchRuleNamesDialog method okPressed.
/*
* (non-Javadoc)
*
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
*/
@Override
protected void okPressed() {
resultMatchRuleList.clear();
// set the modified name to Matchrule
for (int i = 0; i < orderMatchRuleList.size(); i++) {
OrderMatchRule orderMatchRule = orderMatchRuleList.get(i);
MatchRule matchRule = orderMatchRule.getMatchRule();
matchRule.setName(orderMatchRule.getName());
resultMatchRuleList.add(matchRule);
}
super.okPressed();
}
use of org.talend.dataquality.rules.MatchRule in project tdq-studio-se by Talend.
the class MatchingKeySection method getCurrentMatchRuleTableComposite.
protected AbsMatchAnalysisTableComposite<?> getCurrentMatchRuleTableComposite() {
CTabItem currentTabItem = ruleFolder.getSelection();
if (currentTabItem == null) {
// $NON-NLS-1$
log.warn(DefaultMessagesImpl.getString("MatchingKeySection.ONE_MATCH_RULE_REQUIRED"));
MatchRule newMatchRule = getNewMatchRule();
addRuleTab(false, newMatchRule);
addMatchRuleToAnalysis(newMatchRule);
currentTabItem = ruleFolder.getSelection();
}
AbsMatchAnalysisTableComposite<?> matchRuleTableComp = getMatchRuleComposite(currentTabItem);
return matchRuleTableComp;
}
use of org.talend.dataquality.rules.MatchRule in project tdq-studio-se by Talend.
the class MatchingKeySection method getCurrentMatchRule.
protected MatchRule getCurrentMatchRule() throws Exception {
CTabItem currentTabItem = ruleFolder.getSelection();
if (currentTabItem == null) {
// $NON-NLS-1$
throw new Exception(DefaultMessagesImpl.getString("MatchingKeySection.ONE_MATCH_RULE_REQUIRED"));
}
MatchRuleTableComposite matchRuleTableComp = (MatchRuleTableComposite) getMatchRuleComposite(currentTabItem);
MatchRule matchRule = matchRuleTableComp.getMatchRule();
return matchRule;
}
Aggregations