|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hivemind.schema.rules.RuleUtils
public class RuleUtils
Static methods useful to Rule
s and
Translator
s.
Constructor Summary | |
---|---|
RuleUtils()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RuleUtils()
Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |