use of org.talend.dataquality.indicators.Indicator in project tdq-studio-se by Talend.
the class AbstractAnalysisMetadataPage method getDqRules.
/**
* ADD gdbu 2011-6-1 bug : 19833
*
* DOC gdbu Comment method "getDqRules". Get all DQRule from analysis.
*
* @param analysis
* @return
*/
public List<DQRule> getDqRules(Analysis analysis) {
List<DQRule> result = new ArrayList<DQRule>();
EList<Indicator> indicators = analysis.getResults().getIndicators();
for (Indicator indicator : indicators) {
IndicatorDefinition indicatorDefinition = indicator.getIndicatorDefinition();
if (indicatorDefinition instanceof DQRule) {
result.add((DQRule) indicatorDefinition);
}
}
return result;
}
use of org.talend.dataquality.indicators.Indicator in project tdq-studio-se by Talend.
the class AbstractAnalysisResultPageWithChart method createMenuForAllDataEntity.
protected Map<String, Object> createMenuForAllDataEntity(Shell shell, DataExplorer dataExplorer, Analysis analysis, ChartDataEntity[] chartDataEntities) {
Map<String, Object> menuMap = new HashMap<String, Object>();
if (!analysis.getParameters().isStoreData()) {
return menuMap;
}
for (ChartDataEntity oneDataEntity : chartDataEntities) {
Indicator indicator = oneDataEntity.getIndicator();
Menu menu = createMenu(shell, dataExplorer, analysis, oneDataEntity, getEditorName(indicator));
ChartTableFactory.addJobGenerationMenu(menu, analysis, indicator);
menuMap.put(oneDataEntity.getLabel(), menu);
}
return menuMap;
}
use of org.talend.dataquality.indicators.Indicator in project tdq-studio-se by Talend.
the class TableIndicator method createTableIndicatorWithRowCountIndicator.
/**
* DOC xqliu Comment method "createTableIndicatorWithRowCountIndicator".
*
* @param table
* @return
*/
public static TableIndicator createTableIndicatorWithRowCountIndicator(NamedColumnSet set) {
TableIndicator tableIndicator = new TableIndicator(set);
RowCountIndicator createIndicator = IndicatorsFactory.eINSTANCE.createRowCountIndicator();
DefinitionHandler.getInstance().setDefaultIndicatorDefinition(createIndicator);
createIndicator.setAnalyzedElement(set);
Indicator[] indicators = new Indicator[] { createIndicator };
tableIndicator.setIndicators(indicators);
return tableIndicator;
}
use of org.talend.dataquality.indicators.Indicator in project tdq-studio-se by Talend.
the class TableIndicator method setIndicators.
public void setIndicators(Indicator[] indicators) {
this.clear();
for (Indicator oneIndicator : indicators) {
IndicatorEnum findIndicatorEnum = IndicatorEnum.findIndicatorEnum(oneIndicator.eClass());
if (IndicatorEnum.isPlainIndicatorEnum(findIndicatorEnum)) {
this.indicatorEnumList.add(findIndicatorEnum);
createIndicatorUnit(findIndicatorEnum, oneIndicator);
} else {
this.addSpecialIndicator(findIndicatorEnum, oneIndicator);
}
}
processIndicator();
}
use of org.talend.dataquality.indicators.Indicator in project tdq-studio-se by Talend.
the class ModelElementIndicatorImpl method setIndicators.
// MOD klliu 2010-06-03 init Indicators of the gate
public void setIndicators(Indicator[] indicators) {
clear();
for (Indicator oneIndicator : indicators) {
IndicatorEnum findIndicatorEnum = IndicatorEnum.findIndicatorEnum(oneIndicator.eClass());
if (findIndicatorEnum == null) {
// $NON-NLS-1$ //$NON-NLS-2$
log.error("enum not found for indicator: " + oneIndicator.getName() + " of type " + oneIndicator.getClass());
continue;
}
if (IndicatorEnum.isPlainIndicatorEnum(findIndicatorEnum)) {
this.flatIndicatorEnumList.add(findIndicatorEnum);
fillCategoryIndicators(findIndicatorEnum, oneIndicator);
} else {
this.addSpecialIndicator(findIndicatorEnum, oneIndicator);
}
}
processCategoryIndicator();
}
Aggregations