Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
titleInfo

By default the structure of the parameter string is validated through and regular expression. In this case the value of the parameter need to contain only a-z0-9 and underscores. If the value has a more complex structure it is possible to define a custom regular expression. In this case the instantiation of the parser is shown in the following code example. In this example it is needed to change the expression for the constant PATTERN_PAIRS.

Code Block
private static final String PATTERN_PAIRS = "((([a-zA-Z0-9_]+)|([(][a-zA-Z0-9_]+([:][a-zA-Z0-9_]+)+[)]))[,])"
			+ "*(([a-zA-Z0-9_]+)|([(][a-zA-Z0-9_]+([:][a-zA-Z0-9_]+)+[)]))";
private static final String PATTERN_WITH_ATTRIBUTESNAMES = "([(][a-zA-Z0-9_]+[=]"
			+ PATTERN_PAIRS
			+ "[)])([\\s][(][a-zA-Z0-9_]+[=]"
			+ PATTERN_PAIRS
			+ "[)])*";
private static final String PATTERN_WITHOUT_ATTRIBUTENAMES = "("
			+ PATTERN_PAIRS + ")([\\s]" + PATTERN_PAIRS + ")*";
private static final String PATTERN_KEYWORD = PATTERN_WITH_ATTRIBUTESNAMES
			+ "|" + PATTERN_WITHOUT_ATTRIBUTENAMES;
 
...
 
parameterHelper = PreParserKeywordParameterHelper.newInstance(InterOperatorParallelizationKeywordParameter.class, PATTERN_KEYWORD);