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);
}
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;
}
Aggregations