use of org.talend.dataquality.indicators.CountsIndicator in project tdq-studio-se by Talend.
the class ModelElementIndicatorImpl method fillCategoryIndicators.
/**
* Fill the plain indicator value to the corresponding indicator's property, and fill the value to field
* 'flatIndicatorEnumList' and 'plainIndicatorUnitMap'.
*
* @param indicatorEnum
* @param indicator
*/
private void fillCategoryIndicators(IndicatorEnum indicatorEnum, Indicator indicator) {
// add indicatorEnum to flatIndicatorEnumList
if (indicatorEnum.hasChildren()) {
for (IndicatorEnum indEnum : indicatorEnum.getChildren()) {
if (this.flatIndicatorEnumList.contains(indEnum)) {
continue;
}
this.flatIndicatorEnumList.add(indEnum);
}
}
switch(indicatorEnum) {
case CountsIndicatorEnum:
CountsIndicator countsIndicator = (CountsIndicator) indicator;
this.plainIndicatorUnitMap.put(IndicatorEnum.CountsIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.CountsIndicatorEnum, countsIndicator));
// add indicatorUnit to indicatorUnitMap
this.plainIndicatorUnitMap.put(IndicatorEnum.BlankCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.BlankCountIndicatorEnum, countsIndicator.getBlankCountIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.DistinctCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.DistinctCountIndicatorEnum, countsIndicator.getDistinctCountIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.DuplicateCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.DuplicateCountIndicatorEnum, countsIndicator.getDuplicateCountIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.RowCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.RowCountIndicatorEnum, countsIndicator.getRowCountIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.NullCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.NullCountIndicatorEnum, countsIndicator.getNullCountIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.UniqueIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.UniqueIndicatorEnum, countsIndicator.getUniqueCountIndicator()));
// MOD klliu bug 13411 2010-06-03
this.plainIndicatorUnitMap.put(IndicatorEnum.DefValueCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.DefValueCountIndicatorEnum, countsIndicator.getDefaultValueIndicator()));
break;
case TextIndicatorEnum:
TextIndicator textIndicator = (TextIndicator) indicator;
this.plainIndicatorUnitMap.put(IndicatorEnum.TextIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.TextIndicatorEnum, textIndicator));
// add indicatorUnit to indicatorUnitMap
this.plainIndicatorUnitMap.put(IndicatorEnum.MinLengthIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.MinLengthIndicatorEnum, textIndicator.getMinLengthIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.MaxLengthIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.MaxLengthIndicatorEnum, textIndicator.getMaxLengthIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.AverageLengthIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.AverageLengthIndicatorEnum, textIndicator.getAverageLengthIndicator()));
// MOD mzhao
this.plainIndicatorUnitMap.put(IndicatorEnum.MinLengthWithBlankIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.MinLengthWithBlankIndicatorEnum, textIndicator.getMinLengthWithBlankIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.MinLengthWithBlankNullIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.MinLengthWithBlankNullIndicatorEnum, textIndicator.getMinLengthWithBlankNullIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.MinLengthWithNullIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.MinLengthWithNullIndicatorEnum, textIndicator.getMinLengthWithNullIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.MaxLengthWithBlankIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.MaxLengthWithBlankIndicatorEnum, textIndicator.getMaxLengthWithBlankIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.MaxLengthWithBlankNullIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.MaxLengthWithBlankNullIndicatorEnum, textIndicator.getMaxLengthWithBlankNullIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.MaxLengthWithNullIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.MaxLengthWithNullIndicatorEnum, textIndicator.getMaxLengthWithNullIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.AverageLengthWithBlankIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.AverageLengthWithBlankIndicatorEnum, textIndicator.getAvgLengthWithBlankIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.AverageLengthWithNullBlankIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.AverageLengthWithNullBlankIndicatorEnum, textIndicator.getAvgLengthWithBlankNullIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.AverageLengthWithNullIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.AverageLengthWithNullIndicatorEnum, textIndicator.getAvgLengthWithNullIndicator()));
break;
case BoxIIndicatorEnum:
BoxIndicator boxtIndicator = (BoxIndicator) indicator;
this.plainIndicatorUnitMap.put(IndicatorEnum.BoxIIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.BoxIIndicatorEnum, boxtIndicator));
this.plainIndicatorUnitMap.put(IndicatorEnum.MeanIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.MeanIndicatorEnum, boxtIndicator.getMeanIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.MedianIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.MedianIndicatorEnum, boxtIndicator.getMedianIndicator()));
this.fillCategoryIndicators(IndicatorEnum.RangeIndicatorEnum, boxtIndicator.getRangeIndicator());
this.fillCategoryIndicators(IndicatorEnum.IQRIndicatorEnum, boxtIndicator.getIQR());
break;
case IQRIndicatorEnum:
IQRIndicator iqrIndicator = (IQRIndicator) indicator;
this.plainIndicatorUnitMap.put(IndicatorEnum.IQRIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.IQRIndicatorEnum, iqrIndicator));
this.plainIndicatorUnitMap.put(IndicatorEnum.LowerQuartileIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.LowerQuartileIndicatorEnum, iqrIndicator.getLowerValue()));
this.plainIndicatorUnitMap.put(IndicatorEnum.UpperQuartileIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.UpperQuartileIndicatorEnum, iqrIndicator.getUpperValue()));
break;
case RangeIndicatorEnum:
RangeIndicator rangeIndicator = (RangeIndicator) indicator;
this.plainIndicatorUnitMap.put(IndicatorEnum.RangeIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.RangeIndicatorEnum, rangeIndicator));
this.plainIndicatorUnitMap.put(IndicatorEnum.MaxValueIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.MaxValueIndicatorEnum, rangeIndicator.getUpperValue()));
this.plainIndicatorUnitMap.put(IndicatorEnum.MinValueIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.MinValueIndicatorEnum, rangeIndicator.getLowerValue()));
break;
case PhoneNumbStatisticsIndicatorEnum:
PhoneNumbStatisticsIndicator phoneNumbIndicator = (PhoneNumbStatisticsIndicator) indicator;
this.plainIndicatorUnitMap.put(IndicatorEnum.PhoneNumbStatisticsIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.PhoneNumbStatisticsIndicatorEnum, phoneNumbIndicator));
// add indicatorUnit to indicatorUnitMap
this.plainIndicatorUnitMap.put(IndicatorEnum.ValidPhoneCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.ValidPhoneCountIndicatorEnum, phoneNumbIndicator.getValidPhoneCountIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.PossiblePhoneCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.PossiblePhoneCountIndicatorEnum, phoneNumbIndicator.getPossiblePhoneCountIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.ValidRegCodeCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.ValidRegCodeCountIndicatorEnum, phoneNumbIndicator.getValidRegCodeCountIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.InvalidRegCodeCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.InvalidRegCodeCountIndicatorEnum, phoneNumbIndicator.getInvalidRegCodeCountIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.WellFormE164PhoneCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.WellFormE164PhoneCountIndicatorEnum, phoneNumbIndicator.getWellFormE164PhoneCountIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.WellFormIntePhoneCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.WellFormIntePhoneCountIndicatorEnum, phoneNumbIndicator.getWellFormIntePhoneCountIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.WellFormNationalPhoneCountIndicatorEnum, createPlainIndicatorUnit(IndicatorEnum.WellFormNationalPhoneCountIndicatorEnum, phoneNumbIndicator.getWellFormNationalPhoneCountIndicator()));
this.plainIndicatorUnitMap.put(IndicatorEnum.FormatFreqPieIndictorEnum, createPlainIndicatorUnit(IndicatorEnum.FormatFreqPieIndictorEnum, phoneNumbIndicator.getFormatFreqPieIndicator()));
break;
default:
this.plainIndicatorUnitMap.put(indicatorEnum, createPlainIndicatorUnit(indicatorEnum, indicator));
break;
}
}
use of org.talend.dataquality.indicators.CountsIndicator in project tdq-studio-se by Talend.
the class FrequencyTypeStateUtil method isWithRowCountIndicator.
public static boolean isWithRowCountIndicator(Indicator indicator) {
ModelElement currentAnalyzedElement = indicator.getAnalyzedElement();
InternalEObject eIndicator = (InternalEObject) indicator;
AnalysisResult result = (AnalysisResult) eIndicator.eContainer();
// MOD msjian TDQ-5960: fix a NPE
if (result == null) {
return false;
}
EList<Indicator> indicators = result.getIndicators();
if (indicators != null) {
for (Indicator indi : indicators) {
ModelElement analyzedElement = indi.getAnalyzedElement();
if (analyzedElement == currentAnalyzedElement) {
if (indi instanceof RowCountIndicator) {
return true;
} else if (indi instanceof CountsIndicator) {
CountsIndicator cindi = (CountsIndicator) indi;
return cindi.getRowCountIndicator() != null;
}
}
}
}
return false;
}
use of org.talend.dataquality.indicators.CountsIndicator in project tdq-studio-se by Talend.
the class PropertyHelperTest method testRealExistDuplicateName.
@Test
public void testRealExistDuplicateName() throws PersistenceException {
// --- create indicators
// Indicator
CountsIndicator createCountsIndicator = IndicatorsFactory.eINSTANCE.createCountsIndicator();
List<IRepositoryViewObject> all = null;
IndicatorDefinition createIndicatorDefinition = null;
try {
all = factory.getAll(ERepositoryObjectType.TDQ_SYSTEM_INDICATORS);
for (IRepositoryViewObject indicatorViewObject : all) {
if (indicatorViewObject.getLabel().equalsIgnoreCase("ROW COUNT")) {
createIndicatorDefinition = (IndicatorDefinition) PropertyHelper.getModelElement(indicatorViewObject.getProperty());
break;
}
}
} catch (PersistenceException e1) {
e1.printStackTrace();
Assert.fail(e1.getMessage());
}
createCountsIndicator.setIndicatorDefinition(createIndicatorDefinition);
boolean existDuplicateName = PropertyHelper.existDuplicateName("Copy of Row Count", "Row Count", ERepositoryObjectType.TDQ_INDICATOR_ELEMENT);
assertFalse(existDuplicateName);
}
use of org.talend.dataquality.indicators.CountsIndicator in project tdq-studio-se by Talend.
the class AbstractCommonActionProviderTest method createAnalysisNode.
private RepositoryNode createAnalysisNode(String name, IFolder folder, boolean isDelete) {
IPath createPath = Path.EMPTY;
if (folder != null) {
createPath = new Path(folder.getFullPath().lastSegment());
}
// connection
Analysis createAnalysis = AnalysisFactory.eINSTANCE.createAnalysis();
createAnalysis.setName(name);
// ~connection
TDQAnalysisItem createAnalysisItem = org.talend.dataquality.properties.PropertiesFactory.eINSTANCE.createTDQAnalysisItem();
org.talend.core.model.properties.Property createAnaProperty = PropertiesFactory.eINSTANCE.createProperty();
createAnaProperty.setId(EcoreUtil.generateUUID());
createAnaProperty.setItem(createAnalysisItem);
createAnaProperty.setLabel(createAnalysis.getName());
createAnalysisItem.setProperty(createAnaProperty);
createAnalysisItem.setAnalysis(createAnalysis);
ItemState createItemState = PropertiesFactory.eINSTANCE.createItemState();
createItemState.setDeleted(isDelete);
createAnalysisItem.setState(createItemState);
// Indicator
CountsIndicator createCountsIndicator = IndicatorsFactory.eINSTANCE.createCountsIndicator();
List<IRepositoryViewObject> all = null;
IndicatorDefinition createIndicatorDefinition = null;
try {
all = factory.getAll(ERepositoryObjectType.TDQ_SYSTEM_INDICATORS);
for (IRepositoryViewObject indicatorViewObject : all) {
if (indicatorViewObject.getLabel().equalsIgnoreCase("ROW COUNT")) {
// $NON-NLS-1$
createIndicatorDefinition = (IndicatorDefinition) PropertyHelper.getModelElement(indicatorViewObject.getProperty());
break;
}
}
} catch (PersistenceException e1) {
e1.printStackTrace();
Assert.fail(e1.getMessage());
}
createCountsIndicator.setIndicatorDefinition(createIndicatorDefinition);
AnalysisParameters createAnalysisParameters = AnalysisFactory.eINSTANCE.createAnalysisParameters();
AnalysisContext createAnalysisContext = AnalysisFactory.eINSTANCE.createAnalysisContext();
createAnalysis.setContext(createAnalysisContext);
AnalysisResult createAnalysisResult = AnalysisFactory.eINSTANCE.createAnalysisResult();
ExecutionInformations createExecutionInformations = AnalysisFactory.eINSTANCE.createExecutionInformations();
createAnalysisResult.setResultMetadata(createExecutionInformations);
createAnalysisResult.getIndicators().add(createCountsIndicator);
createAnalysis.setResults(createAnalysisResult);
createAnalysis.setParameters(createAnalysisParameters);
IRepositoryViewObject repViewObject = null;
try {
factory.create(createAnalysisItem, createPath, false);
repViewObject = factory.getLastVersion(createAnaProperty.getId());
} catch (PersistenceException e) {
Assert.fail(e.getMessage());
}
RepositoryNode anaRepNode = new AnalysisRepNode(repViewObject, null, ENodeType.TDQ_REPOSITORY_ELEMENT, null);
// set the contentType for anaRepNode from its parentNode
setParentNode(anaRepNode, ERepositoryObjectType.TDQ_ANALYSIS_ELEMENT);
// ~
return anaRepNode;
}
use of org.talend.dataquality.indicators.CountsIndicator in project tdq-studio-se by Talend.
the class ModelElementIndicatorImpl method createCategoryIndicatorUnits.
/**
* create indicatorMappings according category indicatorEnum.
*
* @param categoryEnums
* @return
*/
private IndicatorUnit[] createCategoryIndicatorUnits(IndicatorEnum[] categoryEnums) {
List<IndicatorUnit> indicatorUnitList = new ArrayList<IndicatorUnit>();
IndicatorUnit indicatorUnit;
for (IndicatorEnum categoryEnum : categoryEnums) {
if (null == categoryEnum) {
continue;
}
if (!IndicatorEnum.isPlainIndicatorEnum(categoryEnum)) {
// tempSpecialIndicatorEnumList.add(categoryEnum);
continue;
}
indicatorUnit = getPlainIndicatorUnit(categoryEnum);
switch(categoryEnum) {
case CountsIndicatorEnum:
CountsIndicator countsIndicator = (CountsIndicator) indicatorUnit.getIndicator();
countsIndicator.setBlankCountIndicator((BlankCountIndicator) getPlainIndicatorUnit(IndicatorEnum.BlankCountIndicatorEnum).getIndicator());
countsIndicator.setDistinctCountIndicator((DistinctCountIndicator) getPlainIndicatorUnit(IndicatorEnum.DistinctCountIndicatorEnum).getIndicator());
countsIndicator.setDuplicateCountIndicator((DuplicateCountIndicator) getPlainIndicatorUnit(IndicatorEnum.DuplicateCountIndicatorEnum).getIndicator());
countsIndicator.setRowCountIndicator((RowCountIndicator) getPlainIndicatorUnit(IndicatorEnum.RowCountIndicatorEnum).getIndicator());
countsIndicator.setNullCountIndicator((NullCountIndicator) getPlainIndicatorUnit(IndicatorEnum.NullCountIndicatorEnum).getIndicator());
countsIndicator.setUniqueCountIndicator((UniqueCountIndicator) getPlainIndicatorUnit(IndicatorEnum.UniqueIndicatorEnum).getIndicator());
// MOD klliu bug 13411 2010-06-03
countsIndicator.setDefaultValueIndicator((DefValueCountIndicator) getPlainIndicatorUnit(IndicatorEnum.DefValueCountIndicatorEnum).getIndicator());
indicatorUnit.setChildren(createCategoryIndicatorUnits(IndicatorEnum.CountsIndicatorEnum.getChildren()));
indicatorUnitList.add(indicatorUnit);
break;
case TextIndicatorEnum:
TextIndicator textIndicator = (TextIndicator) indicatorUnit.getIndicator();
textIndicator.setMinLengthIndicator((MinLengthIndicator) getPlainIndicatorUnit(IndicatorEnum.MinLengthIndicatorEnum).getIndicator());
textIndicator.setMaxLengthIndicator((MaxLengthIndicator) getPlainIndicatorUnit(IndicatorEnum.MaxLengthIndicatorEnum).getIndicator());
textIndicator.setAverageLengthIndicator((AverageLengthIndicator) getPlainIndicatorUnit(IndicatorEnum.AverageLengthIndicatorEnum).getIndicator());
// MOD yyi 2010-08-05
textIndicator.setAvgLengthWithBlankIndicator((AvgLengthWithBlankIndicator) getPlainIndicatorUnit(IndicatorEnum.AverageLengthWithBlankIndicatorEnum).getIndicator());
textIndicator.setAvgLengthWithNullIndicator((AvgLengthWithNullIndicator) getPlainIndicatorUnit(IndicatorEnum.AverageLengthWithNullIndicatorEnum).getIndicator());
textIndicator.setAvgLengthWithBlankNullIndicator((AvgLengthWithBlankNullIndicator) getPlainIndicatorUnit(IndicatorEnum.AverageLengthWithNullBlankIndicatorEnum).getIndicator());
textIndicator.setMinLengthWithBlankIndicator((MinLengthWithBlankIndicator) getPlainIndicatorUnit(IndicatorEnum.MinLengthWithBlankIndicatorEnum).getIndicator());
textIndicator.setMinLengthWithNullIndicator((MinLengthWithNullIndicator) getPlainIndicatorUnit(IndicatorEnum.MinLengthWithNullIndicatorEnum).getIndicator());
textIndicator.setMinLengthWithBlankNullIndicator((MinLengthWithBlankNullIndicator) getPlainIndicatorUnit(IndicatorEnum.MinLengthWithBlankNullIndicatorEnum).getIndicator());
textIndicator.setMaxLengthWithBlankIndicator((MaxLengthWithBlankIndicator) getPlainIndicatorUnit(IndicatorEnum.MaxLengthWithBlankIndicatorEnum).getIndicator());
textIndicator.setMaxLengthWithNullIndicator((MaxLengthWithNullIndicator) getPlainIndicatorUnit(IndicatorEnum.MaxLengthWithNullIndicatorEnum).getIndicator());
textIndicator.setMaxLengthWithBlankNullIndicator((MaxLengthWithBlankNullIndicator) getPlainIndicatorUnit(IndicatorEnum.MaxLengthWithBlankNullIndicatorEnum).getIndicator());
// ~
indicatorUnit.setChildren(createCategoryIndicatorUnits(IndicatorEnum.TextIndicatorEnum.getChildren()));
indicatorUnitList.add(indicatorUnit);
break;
case BoxIIndicatorEnum:
BoxIndicator boxtIndicator = (BoxIndicator) indicatorUnit.getIndicator();
boxtIndicator.setRangeIndicator((RangeIndicator) getPlainIndicatorUnit(IndicatorEnum.RangeIndicatorEnum).getIndicator());
boxtIndicator.setIQR((IQRIndicator) getPlainIndicatorUnit(IndicatorEnum.IQRIndicatorEnum).getIndicator());
boxtIndicator.setMeanIndicator((MeanIndicator) getPlainIndicatorUnit(IndicatorEnum.MeanIndicatorEnum).getIndicator());
boxtIndicator.setMedianIndicator((MedianIndicator) getPlainIndicatorUnit(IndicatorEnum.MedianIndicatorEnum).getIndicator());
indicatorUnit.setChildren(createCategoryIndicatorUnits(IndicatorEnum.BoxIIndicatorEnum.getChildren()));
indicatorUnitList.add(indicatorUnit);
break;
case IQRIndicatorEnum:
IQRIndicator iqrIndicator = (IQRIndicator) indicatorUnit.getIndicator();
iqrIndicator.setLowerValue((LowerQuartileIndicator) getPlainIndicatorUnit(IndicatorEnum.LowerQuartileIndicatorEnum).getIndicator());
iqrIndicator.setUpperValue((UpperQuartileIndicator) getPlainIndicatorUnit(IndicatorEnum.UpperQuartileIndicatorEnum).getIndicator());
indicatorUnit.setChildren(createCategoryIndicatorUnits(IndicatorEnum.IQRIndicatorEnum.getChildren()));
indicatorUnitList.add(indicatorUnit);
break;
case RangeIndicatorEnum:
RangeIndicator rangeIndicator = (RangeIndicator) indicatorUnit.getIndicator();
rangeIndicator.setLowerValue((MinValueIndicator) getPlainIndicatorUnit(IndicatorEnum.MinValueIndicatorEnum).getIndicator());
rangeIndicator.setUpperValue((MaxValueIndicator) getPlainIndicatorUnit(IndicatorEnum.MaxValueIndicatorEnum).getIndicator());
indicatorUnit.setChildren(createCategoryIndicatorUnits(IndicatorEnum.RangeIndicatorEnum.getChildren()));
indicatorUnitList.add(indicatorUnit);
break;
case PhoneNumbStatisticsIndicatorEnum:
PhoneNumbStatisticsIndicator phoneNumbIndicator = (PhoneNumbStatisticsIndicator) indicatorUnit.getIndicator();
phoneNumbIndicator.setValidPhoneCountIndicator((ValidPhoneCountIndicator) getPlainIndicatorUnit(IndicatorEnum.ValidPhoneCountIndicatorEnum).getIndicator());
phoneNumbIndicator.setPossiblePhoneCountIndicator((PossiblePhoneCountIndicator) getPlainIndicatorUnit(IndicatorEnum.PossiblePhoneCountIndicatorEnum).getIndicator());
phoneNumbIndicator.setValidRegCodeCountIndicator((ValidRegCodeCountIndicator) getPlainIndicatorUnit(IndicatorEnum.ValidRegCodeCountIndicatorEnum).getIndicator());
phoneNumbIndicator.setInvalidRegCodeCountIndicator((InvalidRegCodeCountIndicator) getPlainIndicatorUnit(IndicatorEnum.InvalidRegCodeCountIndicatorEnum).getIndicator());
phoneNumbIndicator.setWellFormE164PhoneCountIndicator((WellFormE164PhoneCountIndicator) getPlainIndicatorUnit(IndicatorEnum.WellFormE164PhoneCountIndicatorEnum).getIndicator());
phoneNumbIndicator.setWellFormIntePhoneCountIndicator((WellFormIntePhoneCountIndicatorImpl) getPlainIndicatorUnit(IndicatorEnum.WellFormIntePhoneCountIndicatorEnum).getIndicator());
phoneNumbIndicator.setWellFormNationalPhoneCountIndicator((WellFormNationalPhoneCountIndicatorImpl) getPlainIndicatorUnit(IndicatorEnum.WellFormNationalPhoneCountIndicatorEnum).getIndicator());
phoneNumbIndicator.setFormatFreqPieIndicator((FormatFreqPieIndicatorImpl) getPlainIndicatorUnit(IndicatorEnum.FormatFreqPieIndictorEnum).getIndicator());
indicatorUnit.setChildren(createCategoryIndicatorUnits(IndicatorEnum.PhoneNumbStatisticsIndicatorEnum.getChildren()));
indicatorUnitList.add(indicatorUnit);
break;
default:
indicatorUnitList.add(indicatorUnit);
break;
}
}
return indicatorUnitList.toArray(new IndicatorUnit[indicatorUnitList.size()]);
}
Aggregations