use of org.talend.dataquality.indicators.definition.IndicatorsDefinitions in project tdq-studio-se by Talend.
the class DefinitionHandler method loadDefinitionsFromFile.
/**
* DOC mzhao feature 13676 split system indicators.
*
* @return
*/
public IndicatorsDefinitions loadDefinitionsFromFile() {
Resource definitionsFile = getDefCategoryResourceFromFile();
EList<EObject> contents = definitionsFile.getContents();
if (contents == null || contents.isEmpty()) {
// $NON-NLS-1$
log.error(Messages.getString("DefinitionHandler.NoContentFound", definitionsFile.getURI()));
return null;
}
DefinitionSwitch<IndicatorsDefinitions> catSwitch = new DefinitionSwitch<IndicatorsDefinitions>() {
@Override
public IndicatorsDefinitions caseIndicatorsDefinitions(IndicatorsDefinitions object) {
return object;
}
};
return catSwitch.doSwitch(contents.get(0));
}
Aggregations