use of orgomg.cwm.objectmodel.core.Expression in project tdq-studio-se by Talend.
the class DomainHelper method getPattern.
private static String getPattern(final Collection<Domain> dataFilters, DomainType domainType, PatternType patternType) {
if (dataFilters == null) {
return null;
}
for (Domain domain : dataFilters) {
if (!domainType.label.equals(domain.getName())) {
continue;
}
EList<Pattern> patterns = domain.getPatterns();
for (Pattern pattern : patterns) {
if (patternType.label.equals(pattern.getName())) {
PatternComponent next = pattern.getComponents().iterator().next();
if (next == null) {
continue;
} else {
RegularExpression regexp = (RegularExpression) next;
Expression expression = regexp.getExpression();
if (expression != null) {
return expression.getBody();
}
}
}
}
}
return null;
}
Aggregations