use of org.talend.dq.indicators.SchemaEvaluator in project tdq-studio-se by Talend.
the class SchemaAnalysisExecutor method evaluate.
/*
* (non-Javadoc)
*
* @see org.talend.dq.analysis.AnalysisExecutor#runAnalysis(org.talend.dataquality.analysis.Analysis,
* java.lang.String)
*/
@Override
protected ReturnCode evaluate(Analysis analysis, java.sql.Connection connection, String sqlStatement) {
SchemaEvaluator eval = new SchemaEvaluator();
// MOD xqliu 2009-02-09 bug 6237
eval.setMonitor(getMonitor());
// // --- add indicators
EList<Indicator> indicators = analysis.getResults().getIndicators();
for (Indicator indicator : indicators) {
ModelElement analyzedElement = indicator.getAnalyzedElement();
if (analyzedElement == null) {
continue;
}
Schema cat = SwitchHelpers.SCHEMA_SWITCH.doSwitch(analyzedElement);
if (cat == null) {
continue;
}
eval.storeIndicator(cat, indicator);
// ADDED rli 2008-07-10 fixed for the SchemaIndicator will increased after connection analysis running.
indicator.reset();
}
if (getMonitor() != null) {
getMonitor().worked(compIndicatorsWorked);
}
ReturnCode retCode = runAnalysisLow(analysis, sqlStatement, eval, connection);
return retCode;
}
Aggregations