use of org.talend.dq.analysis.ModelElementAnalysisHandler in project tdq-studio-se by Talend.
the class FunctionalDependencyAnalysisDetailsPage method initialize.
/*
* (non-Javadoc)
*
* @see
* org.talend.dataprofiler.core.ui.editor.AbstractMetadataFormPage#initialize(org.eclipse.ui.forms.editor.FormEditor
* )
*/
@Override
public void initialize(FormEditor editor) {
super.initialize(editor);
analysisHandler = new ModelElementAnalysisHandler();
analysisHandler.setAnalysis(getCurrentModelElement());
stringDataFilter = analysisHandler.getStringDataFilterwithContext();
}
use of org.talend.dq.analysis.ModelElementAnalysisHandler in project tdq-studio-se by Talend.
the class ColumnAnalysisDetailsPage method recomputeIndicators.
public void recomputeIndicators() {
analysisHandler = new ModelElementAnalysisHandler();
analysisHandler.setAnalysis(getCurrentModelElement());
// Handle JUDIs
UDIHelper.updateJUDIsForAnalysis(getCurrentModelElement());
stringDataFilter = analysisHandler.getStringDataFilterwithContext();
EList<ModelElement> analyzedColumns = analysisHandler.getAnalyzedColumns();
List<ModelElementIndicator> meIndicatorList = new ArrayList<ModelElementIndicator>();
ModelElementIndicator currentIndicator = null;
for (ModelElement element : analyzedColumns) {
TdColumn tdColumn = SwitchHelpers.COLUMN_SWITCH.doSwitch(element);
// MOD qiongli 2011-1-10,16796:delimitefile
MetadataColumn mdColumn = SwitchHelpers.METADATA_COLUMN_SWITCH.doSwitch(element);
if (tdColumn == null && mdColumn == null) {
continue;
}
// MOD qiongli TDQ-7052 if the node is filtered ,it will be return null,so should create a new node.
RepositoryNode repNode = RepositoryNodeHelper.recursiveFind(element);
if (repNode == null) {
repNode = RepositoryNodeHelper.createRepositoryNode(element);
}
// MOD mzhao feature 15750, The column is recompute from the file, here create a new repository view object.
if (tdColumn == null && mdColumn != null) {
currentIndicator = ModelElementIndicatorHelper.createDFColumnIndicator(repNode);
} else if (tdColumn != null) {
currentIndicator = ModelElementIndicatorHelper.createModelElementIndicator(repNode);
}
DataminingType dataminingType = DataminingType.get(analysisHandler.getDatamingType(element));
MetadataHelper.setDataminingType(dataminingType == null ? DataminingType.NOMINAL : dataminingType, element);
Collection<Indicator> indicatorList = analysisHandler.getIndicators(element);
if (currentIndicator != null) {
currentIndicator.setIndicators(indicatorList.toArray(new Indicator[indicatorList.size()]));
meIndicatorList.add(currentIndicator);
}
}
currentModelElementIndicators = meIndicatorList.toArray(new ModelElementIndicator[meIndicatorList.size()]);
}
Aggregations