Search in sources :

Example 16 with FrequencyExt

use of org.talend.dq.indicators.ext.FrequencyExt in project tdq-studio-se by Talend.

the class PieStatisticsState method getCustomerDataset.

public ICustomerDataset getCustomerDataset() {
    CustomerDefaultCategoryDataset customerdataset = new CustomerDefaultCategoryDataset();
    for (IndicatorUnit unit : units) {
        if (unit.isExcuted()) {
            FrequencyExt[] frequencyExt = (FrequencyExt[]) unit.getValue();
            int numOfShown = PieStatisticsStateUtil.getNumberOfShown(unit, frequencyExt);
            for (int i = 0; i < numOfShown; i++) {
                FrequencyExt freqExt = frequencyExt[i];
                String keyLabel = PieStatisticsStateUtil.getkeyLabel(freqExt);
                customerdataset.addValue(freqExt.getValue(), PluginConstant.EMPTY_STRING, keyLabel);
                ChartDataEntity entity = PieStatisticsStateUtil.createDataEntity(unit, freqExt, keyLabel);
                customerdataset.addDataEntity(entity);
            }
        }
    }
    return customerdataset;
}
Also used : IndicatorUnit(org.talend.dataprofiler.core.ui.editor.preview.IndicatorUnit) ChartDataEntity(org.talend.dq.indicators.preview.table.ChartDataEntity) CustomerDefaultCategoryDataset(org.talend.dataprofiler.common.ui.editor.preview.CustomerDefaultCategoryDataset) FrequencyExt(org.talend.dq.indicators.ext.FrequencyExt)

Aggregations

FrequencyExt (org.talend.dq.indicators.ext.FrequencyExt)16 ChartDataEntity (org.talend.dq.indicators.preview.table.ChartDataEntity)8 IndicatorUnit (org.talend.dataprofiler.core.ui.editor.preview.IndicatorUnit)7 CustomerDefaultCategoryDataset (org.talend.dataprofiler.common.ui.editor.preview.CustomerDefaultCategoryDataset)5 ArrayList (java.util.ArrayList)4 Test (org.junit.Test)4 HashMap (java.util.HashMap)2 ICustomerDataset (org.talend.dataprofiler.common.ui.editor.preview.ICustomerDataset)2 Iterator (java.util.Iterator)1 List (java.util.List)1 Map (java.util.Map)1 Entry (java.util.Map.Entry)1 Set (java.util.Set)1 TableWithData (org.talend.dataprofiler.core.ui.editor.preview.model.TableWithData)1 DatePatternFreqIndicator (org.talend.dataquality.indicators.DatePatternFreqIndicator)1 FormatFreqPieIndicator (org.talend.dataquality.indicators.FormatFreqPieIndicator)1 FrequencyIndicator (org.talend.dataquality.indicators.FrequencyIndicator)1 IndicatorParameters (org.talend.dataquality.indicators.IndicatorParameters)1 ModeIndicator (org.talend.dataquality.indicators.ModeIndicator)1 SoundexFreqIndicator (org.talend.dataquality.indicators.SoundexFreqIndicator)1