public class RuleUtils extends java.lang.Object
Rule
s and
Translator
s.Constructor and Description |
---|
RuleUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.Map |
convertInitializer(java.lang.String initializer)
Used to convert a
Translator initializer string of the
form: key=value[,key=value]* into a Map of
keys and values. |
static Translator |
getTranslator(SchemaProcessor processor,
java.lang.String translator)
Convienience for invoking
Module.getTranslator(String) . |
static java.lang.String |
processText(SchemaProcessor processor,
Element element,
java.lang.String inputValue)
Invoked to process text from an attribute or from an element's content.
|
static void |
setProperty(SchemaProcessor processor,
Element element,
java.lang.String propertyName,
java.lang.Object target,
java.lang.Object value)
Sets a property of the target object to the given value.
|
public RuleUtils()
public static java.util.Map convertInitializer(java.lang.String initializer)
Translator
initializer string of the
form: key=value[,key=value]*
into a Map of
keys and values. The keys and values are Strings.public static java.lang.String processText(SchemaProcessor processor, Element element, java.lang.String inputValue)
Registry.expandSymbols(String, Location)
Note: if the input is a localized message then no symbol expansion takes place. Localized message references are simply strings that begin with '%'. The remainder of the string is the message key.
A null input value passes through unchanged.
public static void setProperty(SchemaProcessor processor, Element element, java.lang.String propertyName, java.lang.Object target, java.lang.Object value)
public static Translator getTranslator(SchemaProcessor processor, java.lang.String translator)
Module.getTranslator(String)
.processor
- the processor for the schema being convertedtranslator
- the string identifying the translator to provide (may be null)NullTranslator