use of org.talend.dataquality.record.linkage.ui.composite.tableviewer.provider.DuplicateStatisticsRow in project tdq-studio-se by Talend.
the class DuplicateRecordPieChart method getPieDataset.
private Object getPieDataset(List<DuplicateStatisticsRow> dupStats) {
Map<String, Long> dupMap = new HashMap<String, Long>();
for (DuplicateStatisticsRow dupStatRow : dupStats) {
if (!dupStatRow.getIsRowCount()) {
String label = dupStatRow.getLabel();
dupMap.put(label, dupStatRow.getCount());
}
}
return TOPChartUtil.getInstance().createDatasetForDuplicateRecord(dupMap);
}
use of org.talend.dataquality.record.linkage.ui.composite.tableviewer.provider.DuplicateStatisticsRow in project tdq-studio-se by Talend.
the class DuplicateRecordStatisticsSection method setDupRecordTableInput.
/**
* DOC zhao Comment method "setDupRecTableInput".
*/
private void setDupRecordTableInput() {
RecordMatchingIndicator recordMatchingIndicator = MatchRuleAnlaysisUtils.getRecordMatchIndicatorFromAna(analysis);
// Row count
Long rowCount = recordMatchingIndicator.getCount();
// Compute row count.
DuplicateStatisticsRow rowCountRow = new DuplicateStatisticsRow();
rowCountRow.setIsRowCount(Boolean.TRUE);
// $NON-NLS-1$
rowCountRow.setLabel(DefaultMessagesImpl.getString("DuplicateRecordStatisticsSection.ROW_COUNT"));
rowCountRow.setCount(rowCount);
setPercentage(rowCount, rowCount, rowCountRow);
// Unique records
DuplicateStatisticsRow uniqueRow = new DuplicateStatisticsRow();
// $NON-NLS-1$
uniqueRow.setLabel(DefaultMessagesImpl.getString("DuplicateRecordStatisticsSection.UNIQUE_RECORDS"));
Long uniqueCount = rowCount - recordMatchingIndicator.getSuspectRecordCount() - recordMatchingIndicator.getMatchedRecordCount();
uniqueRow.setCount(uniqueCount);
setPercentage(uniqueCount, rowCount, uniqueRow);
// Matched records.
DuplicateStatisticsRow matchedRow = new DuplicateStatisticsRow();
// $NON-NLS-1$
matchedRow.setLabel(DefaultMessagesImpl.getString("DuplicateRecordStatisticsSection.MATCHED_RECORDS"));
matchedRow.setCount(recordMatchingIndicator.getMatchedRecordCount());
setPercentage(recordMatchingIndicator.getMatchedRecordCount(), rowCount, matchedRow);
// Suspect records.
DuplicateStatisticsRow suspectRow = new DuplicateStatisticsRow();
// $NON-NLS-1$
suspectRow.setLabel(DefaultMessagesImpl.getString("DuplicateRecordStatisticsSection.SUSPECT_RECORDS"));
suspectRow.setCount(recordMatchingIndicator.getSuspectRecordCount());
setPercentage(recordMatchingIndicator.getSuspectRecordCount(), rowCount, suspectRow);
List<DuplicateStatisticsRow> duplStatsRowList = new ArrayList<DuplicateStatisticsRow>();
duplStatsRowList.add(rowCountRow);
duplStatsRowList.add(uniqueRow);
duplStatsRowList.add(matchedRow);
duplStatsRowList.add(suspectRow);
duplicateRecordTableViewer.setInput(duplStatsRowList);
}
use of org.talend.dataquality.record.linkage.ui.composite.tableviewer.provider.DuplicateStatisticsRow in project tdq-studio-se by Talend.
the class DuplicateRecordStatisticsSection method createSubChart.
/*
* (non-Javadoc)
*
* @see
* org.talend.dataquality.record.linkage.ui.section.AbstractMatchAnaysisTableSection#createSubChart(org.eclipse.
* swt.widgets.Composite)
*/
@Override
protected void createSubChart(Composite sectionClient) {
duplicateRecordPieChart = new DuplicateRecordPieChart(sectionClient);
List<DuplicateStatisticsRow> dupStatistics = (List<DuplicateStatisticsRow>) duplicateRecordTableViewer.getInput();
duplicateRecordPieChart.createPieChart(dupStatistics);
}
Aggregations