Search in sources :

Example 6 with ColumnIndicatorUnit

use of org.talend.dataprofiler.core.ui.editor.preview.ColumnIndicatorUnit in project tdq-studio-se by Talend.

the class DateFrequencyStateUtilTest method setUp.

@Before
public void setUp() throws Exception {
    mapVal2Freq = new HashMap<Object, Long>();
    mapVal2Freq.put(1993, 4L);
    mapVal2Freq.put(1994, 23L);
    mapVal2Freq.put(1996, 15L);
    mapVal2Freq.put(1999, 11L);
    yearLowFrequencyIndicator = IndicatorsFactory.eINSTANCE.createYearLowFrequencyIndicator();
    yearLowFrequencyIndicator.setValueToFreq(mapVal2Freq);
    yearLowFrequencyIndicator.setComputed(true);
    units = new ArrayList<IndicatorUnit>();
    ModelElementIndicator modelElementIndicator = UnitTestBuildHelper.createModelElementIndicator();
    ColumnIndicatorUnit columnIndicatorUnit = new ColumnIndicatorUnit(IndicatorEnum.YearLowFrequencyIndicatorEnum, yearLowFrequencyIndicator, modelElementIndicator);
    units.add(columnIndicatorUnit);
}
Also used : ColumnIndicatorUnit(org.talend.dataprofiler.core.ui.editor.preview.ColumnIndicatorUnit) IndicatorUnit(org.talend.dataprofiler.core.ui.editor.preview.IndicatorUnit) ColumnIndicatorUnit(org.talend.dataprofiler.core.ui.editor.preview.ColumnIndicatorUnit) ModelElementIndicator(org.talend.dataprofiler.core.model.ModelElementIndicator) Before(org.junit.Before)

Example 7 with ColumnIndicatorUnit

use of org.talend.dataprofiler.core.ui.editor.preview.ColumnIndicatorUnit in project tdq-studio-se by Talend.

the class ModelElementIndicatorImpl method createSpecialIndicatorUnit.

private IndicatorUnit createSpecialIndicatorUnit(IndicatorEnum indicatorEnum, Indicator indicator) {
    Indicator tempIndicator = indicator;
    if (tempIndicator == null) {
        EFactoryImpl factory = (EFactoryImpl) indicatorEnum.getIndicatorType().getEPackage().getEFactoryInstance();
        tempIndicator = (Indicator) factory.create(indicatorEnum.getIndicatorType());
        // MOD scorreia 2008-09-18: bug 5131 fixed: set indicator's definition when the indicator is created.
        if (!DefinitionHandler.getInstance().setDefaultIndicatorDefinition(tempIndicator)) {
            // $NON-NLS-1$
            log.error(DefaultMessagesImpl.getString("ModelElementIndicatorImpl_COULDNOTSETDEF_GIVEN_IND0") + tempIndicator.getName());
        }
    }
    // }
    if (this.specialIndicatorUnitList == null) {
        this.specialIndicatorUnitList = new ArrayList<IndicatorUnit>();
    }
    IndicatorUnit indicatorUnit = new ColumnIndicatorUnit(indicatorEnum, tempIndicator, this);
    specialIndicatorUnitList.add(indicatorUnit);
    this.specialIndicatorUnitMap.put(tempIndicator.getName(), indicatorUnit);
    return indicatorUnit;
}
Also used : EFactoryImpl(org.eclipse.emf.ecore.impl.EFactoryImpl) IndicatorUnit(org.talend.dataprofiler.core.ui.editor.preview.IndicatorUnit) ColumnIndicatorUnit(org.talend.dataprofiler.core.ui.editor.preview.ColumnIndicatorUnit) ColumnIndicatorUnit(org.talend.dataprofiler.core.ui.editor.preview.ColumnIndicatorUnit) UniqueCountIndicator(org.talend.dataquality.indicators.UniqueCountIndicator) AvgLengthWithBlankIndicator(org.talend.dataquality.indicators.AvgLengthWithBlankIndicator) FrequencyIndicator(org.talend.dataquality.indicators.FrequencyIndicator) MaxValueIndicator(org.talend.dataquality.indicators.MaxValueIndicator) MaxLengthWithBlankNullIndicator(org.talend.dataquality.indicators.MaxLengthWithBlankNullIndicator) ValidRegCodeCountIndicator(org.talend.dataquality.indicators.ValidRegCodeCountIndicator) PhoneNumbStatisticsIndicator(org.talend.dataquality.indicators.PhoneNumbStatisticsIndicator) AvgLengthWithBlankNullIndicator(org.talend.dataquality.indicators.AvgLengthWithBlankNullIndicator) MinLengthIndicator(org.talend.dataquality.indicators.MinLengthIndicator) MinValueIndicator(org.talend.dataquality.indicators.MinValueIndicator) LowerQuartileIndicator(org.talend.dataquality.indicators.LowerQuartileIndicator) AverageLengthIndicator(org.talend.dataquality.indicators.AverageLengthIndicator) MaxLengthWithBlankIndicator(org.talend.dataquality.indicators.MaxLengthWithBlankIndicator) MeanIndicator(org.talend.dataquality.indicators.MeanIndicator) DefValueCountIndicator(org.talend.dataquality.indicators.DefValueCountIndicator) WellFormE164PhoneCountIndicator(org.talend.dataquality.indicators.WellFormE164PhoneCountIndicator) RangeIndicator(org.talend.dataquality.indicators.RangeIndicator) AvgLengthWithNullIndicator(org.talend.dataquality.indicators.AvgLengthWithNullIndicator) MaxLengthWithNullIndicator(org.talend.dataquality.indicators.MaxLengthWithNullIndicator) ModelElementIndicator(org.talend.dataprofiler.core.model.ModelElementIndicator) InvalidRegCodeCountIndicator(org.talend.dataquality.indicators.InvalidRegCodeCountIndicator) UpperQuartileIndicator(org.talend.dataquality.indicators.UpperQuartileIndicator) ValidPhoneCountIndicator(org.talend.dataquality.indicators.ValidPhoneCountIndicator) RowCountIndicator(org.talend.dataquality.indicators.RowCountIndicator) PossiblePhoneCountIndicator(org.talend.dataquality.indicators.PossiblePhoneCountIndicator) MaxLengthIndicator(org.talend.dataquality.indicators.MaxLengthIndicator) CountsIndicator(org.talend.dataquality.indicators.CountsIndicator) MinLengthWithBlankNullIndicator(org.talend.dataquality.indicators.MinLengthWithBlankNullIndicator) NullCountIndicator(org.talend.dataquality.indicators.NullCountIndicator) MedianIndicator(org.talend.dataquality.indicators.MedianIndicator) Indicator(org.talend.dataquality.indicators.Indicator) BlankCountIndicator(org.talend.dataquality.indicators.BlankCountIndicator) TextIndicator(org.talend.dataquality.indicators.TextIndicator) DistinctCountIndicator(org.talend.dataquality.indicators.DistinctCountIndicator) DuplicateCountIndicator(org.talend.dataquality.indicators.DuplicateCountIndicator) IQRIndicator(org.talend.dataquality.indicators.IQRIndicator) MinLengthWithBlankIndicator(org.talend.dataquality.indicators.MinLengthWithBlankIndicator) MinLengthWithNullIndicator(org.talend.dataquality.indicators.MinLengthWithNullIndicator) BoxIndicator(org.talend.dataquality.indicators.BoxIndicator)

Aggregations

ColumnIndicatorUnit (org.talend.dataprofiler.core.ui.editor.preview.ColumnIndicatorUnit)7 IndicatorUnit (org.talend.dataprofiler.core.ui.editor.preview.IndicatorUnit)6 ModelElementIndicator (org.talend.dataprofiler.core.model.ModelElementIndicator)5 EFactoryImpl (org.eclipse.emf.ecore.impl.EFactoryImpl)3 AverageLengthIndicator (org.talend.dataquality.indicators.AverageLengthIndicator)3 AvgLengthWithBlankIndicator (org.talend.dataquality.indicators.AvgLengthWithBlankIndicator)3 AvgLengthWithBlankNullIndicator (org.talend.dataquality.indicators.AvgLengthWithBlankNullIndicator)3 AvgLengthWithNullIndicator (org.talend.dataquality.indicators.AvgLengthWithNullIndicator)3 BlankCountIndicator (org.talend.dataquality.indicators.BlankCountIndicator)3 BoxIndicator (org.talend.dataquality.indicators.BoxIndicator)3 CountsIndicator (org.talend.dataquality.indicators.CountsIndicator)3 DefValueCountIndicator (org.talend.dataquality.indicators.DefValueCountIndicator)3 DistinctCountIndicator (org.talend.dataquality.indicators.DistinctCountIndicator)3 DuplicateCountIndicator (org.talend.dataquality.indicators.DuplicateCountIndicator)3 FrequencyIndicator (org.talend.dataquality.indicators.FrequencyIndicator)3 IQRIndicator (org.talend.dataquality.indicators.IQRIndicator)3 Indicator (org.talend.dataquality.indicators.Indicator)3 InvalidRegCodeCountIndicator (org.talend.dataquality.indicators.InvalidRegCodeCountIndicator)3 LowerQuartileIndicator (org.talend.dataquality.indicators.LowerQuartileIndicator)3 MaxLengthIndicator (org.talend.dataquality.indicators.MaxLengthIndicator)3