Search in sources :

Example 11 with AlgorithmDefinition

use of org.talend.dataquality.rules.AlgorithmDefinition in project tdq-studio-se by Talend.

the class BlockKeyDefinitionImpl method basicSetPostAlgorithm.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetPostAlgorithm(AlgorithmDefinition newPostAlgorithm, NotificationChain msgs) {
    AlgorithmDefinition oldPostAlgorithm = postAlgorithm;
    postAlgorithm = newPostAlgorithm;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RulesPackage.BLOCK_KEY_DEFINITION__POST_ALGORITHM, oldPostAlgorithm, newPostAlgorithm);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) AlgorithmDefinition(org.talend.dataquality.rules.AlgorithmDefinition)

Example 12 with AlgorithmDefinition

use of org.talend.dataquality.rules.AlgorithmDefinition in project tdq-studio-se by Talend.

the class BlockKeyDefinitionImpl 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.BLOCK_KEY_DEFINITION__ALGORITHM, oldAlgorithm, newAlgorithm);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) AlgorithmDefinition(org.talend.dataquality.rules.AlgorithmDefinition)

Example 13 with AlgorithmDefinition

use of org.talend.dataquality.rules.AlgorithmDefinition in project tdq-studio-se by Talend.

the class BlockKeyDefinitionImpl method basicSetPreAlgorithm.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetPreAlgorithm(AlgorithmDefinition newPreAlgorithm, NotificationChain msgs) {
    AlgorithmDefinition oldPreAlgorithm = preAlgorithm;
    preAlgorithm = newPreAlgorithm;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, RulesPackage.BLOCK_KEY_DEFINITION__PRE_ALGORITHM, oldPreAlgorithm, newPreAlgorithm);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) AlgorithmDefinition(org.talend.dataquality.rules.AlgorithmDefinition)

Example 14 with AlgorithmDefinition

use of org.talend.dataquality.rules.AlgorithmDefinition in project tdq-studio-se by Talend.

the class DefaultSurvivorshipDefinitionImpl 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.DEFAULT_SURVIVORSHIP_DEFINITION__FUNCTION, oldFunction, newFunction);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) AlgorithmDefinition(org.talend.dataquality.rules.AlgorithmDefinition)

Example 15 with AlgorithmDefinition

use of org.talend.dataquality.rules.AlgorithmDefinition in project tdq-studio-se by Talend.

the class MatchAnalysisExecutorTest method createMatchIndicatorWithOneMathRule.

/**
 * DOC zhao Comment method "createMatchIndicatorWithOneMathRule".
 *
 * @param nameVar
 * @param matchIndicator
 * @param groupQualityThreshold
 * @param matchInterval
 */
private void createMatchIndicatorWithOneMathRule(String nameVar, RecordMatchingIndicator matchIndicator, double groupQualityThreshold, double matchInterval) {
    MatchRuleDefinition matchRuleDefinition = RulesPackage.eINSTANCE.getRulesFactory().createMatchRuleDefinition();
    matchRuleDefinition.setMatchGroupQualityThreshold(groupQualityThreshold);
    MatchRule matchRule = RulesPackage.eINSTANCE.getRulesFactory().createMatchRule();
    matchRule.setMatchInterval(matchInterval);
    matchRule.setName("match rule 1");
    MatchKeyDefinition matchkeyDef = RulesPackage.eINSTANCE.getRulesFactory().createMatchKeyDefinition();
    matchkeyDef.setName(nameVar);
    matchkeyDef.setColumn(nameVar);
    AlgorithmDefinition algoDef = RulesPackage.eINSTANCE.getRulesFactory().createAlgorithmDefinition();
    algoDef.setAlgorithmType(AttributeMatcherType.LEVENSHTEIN.name());
    matchkeyDef.setAlgorithm(algoDef);
    matchkeyDef.setConfidenceWeight(1);
    matchRule.getMatchKeys().add(matchkeyDef);
    matchRuleDefinition.getMatchRules().add(matchRule);
    matchIndicator.setBuiltInMatchRuleDefinition(matchRuleDefinition);
}
Also used : MatchRuleDefinition(org.talend.dataquality.rules.MatchRuleDefinition) MatchKeyDefinition(org.talend.dataquality.rules.MatchKeyDefinition) AlgorithmDefinition(org.talend.dataquality.rules.AlgorithmDefinition) MatchRule(org.talend.dataquality.rules.MatchRule)

Aggregations

AlgorithmDefinition (org.talend.dataquality.rules.AlgorithmDefinition)24 ArrayList (java.util.ArrayList)7 HashMap (java.util.HashMap)7 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)7 MatchKeyDefinition (org.talend.dataquality.rules.MatchKeyDefinition)7 RecordMatchingIndicator (org.talend.dataquality.indicators.columnset.RecordMatchingIndicator)6 MatchRule (org.talend.dataquality.rules.MatchRule)6 MatchRuleDefinition (org.talend.dataquality.rules.MatchRuleDefinition)6 Test (org.junit.Test)5 MetadataColumn (org.talend.core.model.metadata.builder.connection.MetadataColumn)5 MatchGroupResultConsumer (org.talend.dataquality.record.linkage.grouping.MatchGroupResultConsumer)5 BlockKeyDefinition (org.talend.dataquality.rules.BlockKeyDefinition)5 BlockKeyIndicator (org.talend.dataquality.indicators.columnset.BlockKeyIndicator)4 SurvivorshipKeyDefinition (org.talend.dataquality.rules.SurvivorshipKeyDefinition)4 ExecuteMatchRuleHandler (org.talend.dq.analysis.match.ExecuteMatchRuleHandler)4 Map (java.util.Map)3 ParticularDefaultSurvivorshipDefinitions (org.talend.dataquality.rules.ParticularDefaultSurvivorshipDefinitions)3 DefaultSurvivorshipDefinition (org.talend.dataquality.rules.DefaultSurvivorshipDefinition)2 List (java.util.List)1 EList (org.eclipse.emf.common.util.EList)1