use of org.talend.dq.analysis.ColumnCorrelationAnalysisHandler in project tdq-studio-se by Talend.
the class CorrelationAnalysisDetailsPage method recomputeIndicators.
public void recomputeIndicators() {
correlationAnalysisHandler = new ColumnCorrelationAnalysisHandler();
correlationAnalysisHandler.setAnalysis(getCurrentModelElement());
stringDataFilter = correlationAnalysisHandler.getStringDataFilter();
analyzedColumns = correlationAnalysisHandler.getAnalyzedColumns();
if (correlationAnalysisHandler.getIndicator() == null && columnSetMultiIndicator != null) {
ColumnsetFactory columnsetFactory = ColumnsetFactory.eINSTANCE;
// MOD qiongli 2010-6-18 bug 12766
if (ColumnsetPackage.eINSTANCE.getCountAvgNullIndicator() == columnSetMultiIndicator.eClass()) {
columnSetMultiIndicator = columnsetFactory.createCountAvgNullIndicator();
// MOD xqliu 2010-04-06 bug 12161
fillSimpleIndicators(columnSetMultiIndicator);
// ~12161
}
if (ColumnsetPackage.eINSTANCE.getMinMaxDateIndicator() == columnSetMultiIndicator.eClass()) {
columnSetMultiIndicator = columnsetFactory.createMinMaxDateIndicator();
}
if (ColumnsetPackage.eINSTANCE.getWeakCorrelationIndicator() == columnSetMultiIndicator.eClass()) {
columnSetMultiIndicator = columnsetFactory.createWeakCorrelationIndicator();
}
} else {
columnSetMultiIndicator = (ColumnSetMultiValueIndicator) correlationAnalysisHandler.getIndicator();
}
if (columnSetMultiIndicator == null) {
columnSetMultiIndicator = ColumnsetFactory.eINSTANCE.createCountAvgNullIndicator();
}
initializeIndicator(columnSetMultiIndicator);
columnSetMultiIndicator.setStoreData(true);
for (ModelElement element : analyzedColumns) {
TdColumn tdColumn = SwitchHelpers.COLUMN_SWITCH.doSwitch(element);
if (tdColumn == null) {
continue;
}
// currentColumnIndicator = new ColumnIndicator(tdColumn);
DataminingType dataminingType = correlationAnalysisHandler.getDatamingType(tdColumn);
MetadataHelper.setDataminingType(dataminingType == null ? DataminingType.NOMINAL : dataminingType, tdColumn);
}
}
Aggregations