Search in sources :

Example 1 with TableAnalysisHandler

use of org.talend.dq.analysis.TableAnalysisHandler in project tdq-studio-se by Talend.

the class BusinessRuleAnalysisDetailsPage method recomputeIndicators.

public void recomputeIndicators() {
    analysisHandler = new TableAnalysisHandler();
    analysisHandler.setAnalysis(getCurrentModelElement());
    stringDataFilter = analysisHandler.getStringDataFilter();
    EList<ModelElement> analyzedTables = analysisHandler.getAnalyzedTables();
    List<TableIndicator> tableIndicatorList = new ArrayList<TableIndicator>();
    for (ModelElement element : analyzedTables) {
        NamedColumnSet set = SwitchHelpers.NAMED_COLUMN_SET_SWITCH.doSwitch(element);
        if (set == null) {
            continue;
        }
        TableIndicator currentTableIndicator = new TableIndicator(set);
        Collection<Indicator> indicatorList = analysisHandler.getIndicators(set);
        currentTableIndicator.setIndicators(indicatorList.toArray(new Indicator[indicatorList.size()]));
        tableIndicatorList.add(currentTableIndicator);
    }
    currentTableIndicators = tableIndicatorList.toArray(new TableIndicator[tableIndicatorList.size()]);
}
Also used : ModelElement(orgomg.cwm.objectmodel.core.ModelElement) TableIndicator(org.talend.dataprofiler.core.model.TableIndicator) TableAnalysisHandler(org.talend.dq.analysis.TableAnalysisHandler) ArrayList(java.util.ArrayList) NamedColumnSet(orgomg.cwm.resource.relational.NamedColumnSet) CompositeIndicator(org.talend.dataprofiler.core.ui.editor.preview.CompositeIndicator) Indicator(org.talend.dataquality.indicators.Indicator) TableIndicator(org.talend.dataprofiler.core.model.TableIndicator)

Aggregations

ArrayList (java.util.ArrayList)1 TableIndicator (org.talend.dataprofiler.core.model.TableIndicator)1 CompositeIndicator (org.talend.dataprofiler.core.ui.editor.preview.CompositeIndicator)1 Indicator (org.talend.dataquality.indicators.Indicator)1 TableAnalysisHandler (org.talend.dq.analysis.TableAnalysisHandler)1 ModelElement (orgomg.cwm.objectmodel.core.ModelElement)1 NamedColumnSet (orgomg.cwm.resource.relational.NamedColumnSet)1