use of org.talend.dq.pattern.PatternTransformer in project tdq-studio-se by Talend.
the class ChartTableFactory method createPattern.
/**
* DOC bZhou Comment method "createPattern".
*
* @param analysis
* @param itemEntity
* @param pattTransformer
*/
public static void createPattern(Analysis analysis, String query) {
DbmsLanguage language = DbmsLanguageFactory.createDbmsLanguage(analysis);
PatternTransformer pattTransformer = new PatternTransformer(language);
String regex = pattTransformer.getRegexp(query);
IFolder folder = ResourceManager.getPatternRegexFolder();
// $NON-NLS-1$ //$NON-NLS-2$
new CreatePatternAction(folder, ExpressionType.REGEXP, "'" + regex + "'", language.getDbmsName()).run();
}
Aggregations