use of org.talend.dataquality.indicators.columnset.CountAvgNullIndicator in project tdq-studio-se by Talend.
the class CorrelationAnalysisDetailsPage method initializeIndicator.
private void initializeIndicator(Indicator indicator) {
if (indicator.getIndicatorDefinition() == null) {
DefinitionHandler.getInstance().setDefaultIndicatorDefinition(indicator);
}
// MOD xqliu 2010-04-06 bug 12161
if (indicator instanceof CountAvgNullIndicator) {
if (((CountAvgNullIndicator) indicator).getChildIndicators().size() == 0) {
CountAvgNullIndicator countAvgNullIndicator = (CountAvgNullIndicator) indicator;
fillSimpleIndicators(countAvgNullIndicator);
}
for (Indicator child : ((CompositeIndicator) indicator).getChildIndicators()) {
// recurse
initializeIndicator(child);
}
} else if (indicator instanceof CompositeIndicator) {
// MOD qiongli 2012-5-14 TDQ-5256 should initialize children
for (Indicator child : ((CompositeIndicator) indicator).getChildIndicators()) {
initializeIndicator(child);
}
}
}
use of org.talend.dataquality.indicators.columnset.CountAvgNullIndicator in project tdq-studio-se by Talend.
the class CorrelationAnalysisResultPage method createBubbleOrGanttChart.
private void createBubbleOrGanttChart(final ScrolledForm sForm, final Composite composite, final ColumnSetMultiValueIndicator columnSetMultiValueIndicator) {
List<Composite> previewChartList = new ArrayList<Composite>();
List<ModelElement> bubOrGanttColumnList = new ArrayList<ModelElement>();
if (columnSetMultiValueIndicator instanceof CountAvgNullIndicator) {
bubOrGanttColumnList = columnSetMultiValueIndicator.getNumericColumns();
} else {
bubOrGanttColumnList = columnSetMultiValueIndicator.getDateColumns();
}
for (ModelElement column : bubOrGanttColumnList) {
final MetadataColumn tdColumn = (MetadataColumn) column;
final ExpandableComposite exComp = toolkit.createExpandableComposite(composite, ExpandableComposite.TREE_NODE | ExpandableComposite.CLIENT_INDENT);
// $NON-NLS-1$
exComp.setText(DefaultMessagesImpl.getString("ColumnMasterDetailsPage.column", tdColumn.getName()));
exComp.setLayout(new GridLayout());
exComp.setData(columnSetMultiValueIndicator);
previewChartList.add(exComp);
final Composite comp = toolkit.createComposite(exComp);
comp.setLayout(new GridLayout(2, false));
comp.setLayoutData(new GridData(GridData.FILL_BOTH));
if (tdColumn != null) {
IRunnableWithProgress rwp = new IRunnableWithProgress() {
public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
monitor.beginTask(DefaultMessagesImpl.getString("ColumnCorrelationNominalIntervalResultPage.CreatePreview", tdColumn.getName()), // $NON-NLS-1$
IProgressMonitor.UNKNOWN);
Display.getDefault().asyncExec(new Runnable() {
public void run() {
HideSeriesChartComposite hcc = new HideSeriesChartComposite(comp, getAnalysisHandler().getAnalysis(), columnSetMultiValueIndicator, tdColumn, true);
GridData gd = new GridData();
gd.widthHint = 800;
gd.heightHint = 450;
hcc.setLayoutData(gd);
}
});
monitor.done();
}
};
try {
new ProgressMonitorDialog(getSite().getShell()).run(true, false, rwp);
} catch (Exception ex) {
log.error(ex, ex);
}
}
exComp.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
getChartComposite().layout();
sForm.reflow(true);
}
});
exComp.setExpanded(true);
exComp.setClient(comp);
}
if (!previewChartList.isEmpty()) {
this.previewChartCompsites = previewChartList.toArray(new Composite[previewChartList.size()]);
}
}
use of org.talend.dataquality.indicators.columnset.CountAvgNullIndicator in project tdq-studio-se by Talend.
the class IndicatorsComp method setInput.
// input composite indicator
public void setInput(Object... obj) {
List<ColumnSetIndicatorUnit> indicatortList = new ArrayList<ColumnSetIndicatorUnit>();
for (Object indicatorObj : obj) {
// for SimpleStatIndicator, CountAvgNullIndicator, MinMaxDateIndicator, WeakCorrelationIndicator
if (indicatorObj instanceof SimpleStatIndicator || indicatorObj instanceof CountAvgNullIndicator || indicatorObj instanceof MinMaxDateIndicator || indicatorObj instanceof WeakCorrelationIndicator) {
columnSetIndicator = (ColumnSetMultiValueIndicator) indicatorObj;
for (Indicator indicator : IndicatorHelper.getIndicatorLeavesBySingleNode(columnSetIndicator)) {
IndicatorEnum indicatorEnum = IndicatorEnum.findIndicatorEnum(indicator.eClass());
indicatortList.add(new ColumnSetIndicatorUnit(indicatorEnum, indicator));
}
// MOD msjian TDQ-8860: we always show the allMatchIndicator in the Indicators section
} else if (indicatorObj instanceof AllMatchIndicator) {
// for AllMatchIndicator
AllMatchIndicator allMatchIndicator = (AllMatchIndicator) indicatorObj;
indicatortList.add(new ColumnSetIndicatorUnit(IndicatorEnum.AllMatchIndicatorEnum, allMatchIndicator));
// TDQ-8860~
}
// ~
}
setElements(indicatortList.toArray(new ColumnSetIndicatorUnit[indicatortList.size()]));
}
Aggregations