use of org.talend.dataprofiler.core.ui.editor.preview.ColumnSetIndicatorUnit in project tdq-studio-se by Talend.
the class ColumnSetAnalysisResultPage method createSimpleTable2.
private void createSimpleTable2(final ScrolledForm form, final Composite composite, final SimpleStatIndicator simpleStatIndicator) {
List<IndicatorUnit> units = new ArrayList<IndicatorUnit>();
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.RowCountIndicatorEnum, masterPage.getSimpleStatIndicator().getRowCountIndicator()));
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.DistinctCountIndicatorEnum, masterPage.getSimpleStatIndicator().getDistinctCountIndicator()));
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.DuplicateCountIndicatorEnum, masterPage.getSimpleStatIndicator().getDuplicateCountIndicator()));
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.UniqueIndicatorEnum, masterPage.getSimpleStatIndicator().getUniqueCountIndicator()));
EIndicatorChartType simpleStatType = EIndicatorChartType.SIMPLE_STATISTICS;
// create table firstly
ITableTypeStates tableTypeState = TableTypeStatesFactory.getInstance().getTableState(simpleStatType, units);
TableWithData chartData = new TableWithData(simpleStatType, tableTypeState.getDataEntity());
TableViewer tableviewer = tableTypeState.getTableForm(composite);
tableviewer.setInput(chartData);
// MOD qiongli feature 19192.
DataExplorer dataExplorer = tableTypeState.getDataExplorer();
Analysis analysis = this.getAnalysisHandler().getAnalysis();
ChartTableFactory.addMenuAndTip(tableviewer, dataExplorer, analysis);
// create chart
if (canShowChartForResultPage()) {
IChartTypeStates chartTypeState = ChartTypeStatesFactory.getChartState(simpleStatType, units);
Object chart = chartTypeState.getChart();
TOPChartUtils.getInstance().decorateChart(chart, false);
if (chart != null) {
Object chartComposite2 = TOPChartUtils.getInstance().createChartComposite(composite, SWT.NONE, chart, true);
addMenuToChartComp(chartComposite2, dataExplorer, analysis, ((ICustomerDataset) chartTypeState.getDataset()).getDataEntities());
}
}
}
use of org.talend.dataprofiler.core.ui.editor.preview.ColumnSetIndicatorUnit in project tdq-studio-se by Talend.
the class CorrelationAnalysisResultPage method createSimpleStatistics2.
private void createSimpleStatistics2(final Composite composite, final ColumnSetMultiValueIndicator columnSetMultiValueIndicator) {
List<IndicatorUnit> units = new ArrayList<IndicatorUnit>();
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.RowCountIndicatorEnum, columnSetMultiValueIndicator.getRowCountIndicator()));
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.DistinctCountIndicatorEnum, columnSetMultiValueIndicator.getDistinctCountIndicator()));
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.DuplicateCountIndicatorEnum, columnSetMultiValueIndicator.getDuplicateCountIndicator()));
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.UniqueIndicatorEnum, columnSetMultiValueIndicator.getUniqueCountIndicator()));
EIndicatorChartType simpleStatType = EIndicatorChartType.SIMPLE_STATISTICS;
// create table viewer firstly
ITableTypeStates tableTypeState = TableTypeStatesFactory.getInstance().getTableState(simpleStatType, units);
TableWithData chartData = new TableWithData(simpleStatType, tableTypeState.getDataEntity());
TableViewer tableviewer = tableTypeState.getTableForm(composite);
tableviewer.setInput(chartData);
TableUtils.addTooltipForTable(tableviewer.getTable());
// create chart
if (canShowChartForResultPage()) {
// then create chart
IChartTypeStates chartTypeState = ChartTypeStatesFactory.getChartState(simpleStatType, units);
Object chart = chartTypeState.getChart();
TOPChartUtils.getInstance().decorateChart(chart, false);
if (chart != null) {
TOPChartUtils.getInstance().createChartComposite(composite, SWT.NONE, chart, true);
}
}
}
use of org.talend.dataprofiler.core.ui.editor.preview.ColumnSetIndicatorUnit 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()]));
}
use of org.talend.dataprofiler.core.ui.editor.preview.ColumnSetIndicatorUnit in project tdq-studio-se by Talend.
the class ColumnSetAnalysisDetailsPage method createAllMatch.
private void createAllMatch(final Composite composite) {
List<IndicatorUnit> units = new ArrayList<IndicatorUnit>();
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.AllMatchIndicatorEnum, allMatchIndicator));
EIndicatorChartType matchingType = EIndicatorChartType.PATTERN_MATCHING;
IChartTypeStates chartTypeState = ChartTypeStatesFactory.getChartState(matchingType, units);
Object chart = chartTypeState.getChart();
TOPChartUtils.getInstance().decorateChart(chart, false);
if (chart != null) {
TOPChartUtils.getInstance().createChartComposite(composite, SWT.NONE, chart, true);
}
}
use of org.talend.dataprofiler.core.ui.editor.preview.ColumnSetIndicatorUnit in project tdq-studio-se by Talend.
the class ColumnSetAnalysisDetailsPage method createSimpleStatistics.
private void createSimpleStatistics(final Composite composite) {
List<IndicatorUnit> units = new ArrayList<IndicatorUnit>();
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.RowCountIndicatorEnum, simpleStatIndicator.getRowCountIndicator()));
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.DistinctCountIndicatorEnum, simpleStatIndicator.getDistinctCountIndicator()));
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.DuplicateCountIndicatorEnum, simpleStatIndicator.getDuplicateCountIndicator()));
units.add(new ColumnSetIndicatorUnit(IndicatorEnum.UniqueIndicatorEnum, simpleStatIndicator.getUniqueCountIndicator()));
IChartTypeStates chartTypeState = ChartTypeStatesFactory.getChartState(EIndicatorChartType.SIMPLE_STATISTICS, units);
// create chart
Object chart = chartTypeState.getChart();
TOPChartUtils.getInstance().decorateChart(chart, false);
if (chart != null) {
TOPChartUtils.getInstance().createChartComposite(composite, SWT.NONE, chart, true);
}
}
Aggregations