use of org.talend.dataquality.rules.AlgorithmDefinition in project tdq-studio-se by Talend.
the class MatchKeyAndSurvivorshipTableViewer method createNewSurvivorshipKeyDefinition.
private SurvivorshipKeyDefinition createNewSurvivorshipKeyDefinition(String columnName) {
SurvivorshipKeyDefinition skd = RulesFactory.eINSTANCE.createSurvivorshipKeyDefinition();
skd.setName(columnName);
AlgorithmDefinition createAlgorithmDefinition = RulesFactory.eINSTANCE.createAlgorithmDefinition();
createAlgorithmDefinition.setAlgorithmType(SurvivorShipAlgorithmEnum.getTypeByIndex(3).getComponentValueName());
skd.setFunction(createAlgorithmDefinition);
skd.setAllowManualResolution(true);
return skd;
}
use of org.talend.dataquality.rules.AlgorithmDefinition in project tdq-studio-se by Talend.
the class MatchRuleElementTreeSelectionDialog method getParticularSurvivorshipRulesFromRules.
private List<Map<String, String>> getParticularSurvivorshipRulesFromRules(MatchRuleDefinition matchRuleDefinition, boolean retrieveDisplayValue) {
if (matchRuleDefinition != null) {
List<Map<String, String>> ruleValues = new ArrayList<Map<String, String>>();
for (ParticularDefaultSurvivorshipDefinitions pdsd : matchRuleDefinition.getParticularDefaultSurvivorshipDefinitions()) {
Map<String, String> pr = new HashMap<String, String>();
String matchedColumnName = matchExistingColumnForKey(pdsd);
pr.put(MatchRulesTableLabelProvider.INPUT_COLUMN, matchedColumnName);
// set survivorship function and parameter
AlgorithmDefinition algorithmDefinition = pdsd.getFunction();
String functionType = algorithmDefinition != null && algorithmDefinition.getAlgorithmType() != null ? algorithmDefinition.getAlgorithmType() : StringUtils.EMPTY;
pr.put(MatchRulesTableLabelProvider.SURVIVORSHIP_FUNCTION, functionType);
pr.put(MatchRulesTableLabelProvider.PARAMETER, algorithmDefinition != null && algorithmDefinition.getAlgorithmParameters() != null ? algorithmDefinition.getAlgorithmParameters() : StringUtils.EMPTY);
ruleValues.add(pr);
}
return ruleValues;
}
return null;
}
use of org.talend.dataquality.rules.AlgorithmDefinition in project tdq-studio-se by Talend.
the class MatchKeyDefinitionImpl method basicSetAlgorithm.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetAlgorithm(AlgorithmDefinition newAlgorithm, NotificationChain msgs) {
AlgorithmDefinition oldAlgorithm = algorithm;
algorithm = newAlgorithm;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RulesPackage.MATCH_KEY_DEFINITION__ALGORITHM, oldAlgorithm, newAlgorithm);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.talend.dataquality.rules.AlgorithmDefinition in project tdq-studio-se by Talend.
the class ParticularDefaultSurvivorshipDefinitionsImpl method basicSetFunction.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetFunction(AlgorithmDefinition newFunction, NotificationChain msgs) {
AlgorithmDefinition oldFunction = function;
function = newFunction;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RulesPackage.PARTICULAR_DEFAULT_SURVIVORSHIP_DEFINITIONS__FUNCTION, oldFunction, newFunction);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.talend.dataquality.rules.AlgorithmDefinition in project tdq-studio-se by Talend.
the class SurvivorshipKeyDefinitionImpl method basicSetFunction.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetFunction(AlgorithmDefinition newFunction, NotificationChain msgs) {
AlgorithmDefinition oldFunction = function;
function = newFunction;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RulesPackage.SURVIVORSHIP_KEY_DEFINITION__FUNCTION, oldFunction, newFunction);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
Aggregations