Search in sources :

Example 1 with AllMatchIndicatorImpl

use of org.talend.dataquality.indicators.columnset.impl.AllMatchIndicatorImpl in project tdq-studio-se by Talend.

the class PatternsSelectPage method organizeTableInput.

/**
 * zshen.
 *
 * @return the input of table.
 */
private List<Map<Integer, RegexpMatchingIndicator>> organizeTableInput() {
    List<Map<Integer, RegexpMatchingIndicator>> returnList = new ArrayList<Map<Integer, RegexpMatchingIndicator>>();
    AllMatchIndicatorImpl allMatchIndicator = this.selectPatternsWizard.getAllMatchIndicator();
    if (allMatchIndicator == null) {
        return returnList;
    }
    List<ModelElement> analysisColumns = this.selectPatternsWizard.getAllMatchIndicator().getAnalyzedColumns();
    List<RegexpMatchingIndicator> regexpMatchingIndicatorList = this.selectPatternsWizard.getAllMatchIndicator().getCompositeRegexMatchingIndicators();
    for (RegexpMatchingIndicator regexIndicator : regexpMatchingIndicatorList) {
        int index = analysisColumns.indexOf(regexIndicator.getAnalyzedElement());
        Map<Integer, RegexpMatchingIndicator> returnMap = getMapLocation(returnList, index);
        // new HashMap<Integer, String>();
        returnMap.put(index, regexIndicator);
        if (returnMap.size() == 1) {
            returnList.add(returnMap);
        }
    }
    return returnList;
}
Also used : ModelElement(orgomg.cwm.objectmodel.core.ModelElement) AllMatchIndicatorImpl(org.talend.dataquality.indicators.columnset.impl.AllMatchIndicatorImpl) ArrayList(java.util.ArrayList) RegexpMatchingIndicator(org.talend.dataquality.indicators.RegexpMatchingIndicator) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 RegexpMatchingIndicator (org.talend.dataquality.indicators.RegexpMatchingIndicator)1 AllMatchIndicatorImpl (org.talend.dataquality.indicators.columnset.impl.AllMatchIndicatorImpl)1 ModelElement (orgomg.cwm.objectmodel.core.ModelElement)1