public class DictionaryRegexTransformer extends Object implements Transformer
Dictionary
object of which it iterates over
the keys to use each as a regular expression; if the pattern matches, it
transforms the string accordingly returning the corresponding value of the
Dictionary.
If multiTransform is set it goes through the whole list of keys in the
same way, otherwise it returns after the first match.Constructor and Description |
---|
DictionaryRegexTransformer() |
Modifier and Type | Method and Description |
---|---|
Dictionary |
getDictionary() |
boolean |
isMultiTransform() |
void |
setDictionary(Dictionary dictionary) |
void |
setMultiTransform(boolean multiTransform) |
String |
transform(String s) |
public DictionaryRegexTransformer()
public String transform(String s) throws TransformationException
transform
in interface Transformer
TransformationException
public Dictionary getDictionary()
public void setDictionary(Dictionary dictionary)
public boolean isMultiTransform()
public void setMultiTransform(boolean multiTransform)
Copyright © 2012–2014 Royal Botanic Gardens, Kew. All rights reserved.