|
|||||||||
Home >> All >> org >> apache >> hivemind >> schema >> [ rules overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |
org.apache.hivemind.schema.rules
Class RuleUtils

java.lang.Objectorg.apache.hivemind.schema.rules.RuleUtils
- public class RuleUtils
- extends java.lang.Object
Static methods useful to org.apache.hivemind.schema.Rules and org.apache.hivemind.schema.Translators.
Field Summary | |
private static org.apache.commons.logging.Log |
LOG
|
Constructor Summary | |
RuleUtils()
|
Method Summary | |
static java.util.Map |
convertInitializer(java.lang.String initializer)
Used to convert a org.apache.hivemind.schema.Translator initializer string of the form: key=value[,key=value]* into a Map of
keys and values. |
static org.apache.hivemind.schema.Translator |
getTranslator(org.apache.hivemind.schema.SchemaProcessor processor,
java.lang.String translator)
Convienience for invoking Module.getTranslator(String)> Module.getTranslator(String) 55 . |
static java.lang.String |
processText(org.apache.hivemind.schema.SchemaProcessor processor,
org.apache.hivemind.Element element,
java.lang.String inputValue)
Invoked to process text from an attribute or from an element's content. |
static void |
setProperty(org.apache.hivemind.schema.SchemaProcessor processor,
org.apache.hivemind.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 |
Field Detail |
LOG
private static final org.apache.commons.logging.Log LOG
Constructor Detail |
RuleUtils
public RuleUtils()
Method Detail |
convertInitializer
public static java.util.Map convertInitializer(java.lang.String initializer)
- Used to convert a org.apache.hivemind.schema.Translator initializer string of the
form:
key=value[,key=value]*
into a Map of keys and values. The keys and values are Strings.
processText
public static java.lang.String processText(org.apache.hivemind.schema.SchemaProcessor processor, org.apache.hivemind.Element element, java.lang.String inputValue)
- Invoked to process text from an attribute or from an element's content. Performs two jobs:
- Convert localized message references to localized strings
- Expand symbols using
Registry.expandSymbols(String, Location)>
Registry.expandSymbols(String, Location)
55
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.
setProperty
public static void setProperty(org.apache.hivemind.schema.SchemaProcessor processor, org.apache.hivemind.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. Logs an error if there is a problem.
getTranslator
public static org.apache.hivemind.schema.Translator getTranslator(org.apache.hivemind.schema.SchemaProcessor processor, java.lang.String translator)
- Convienience for invoking Module.getTranslator(String)>
Module.getTranslator(String)
55 .
|
|||||||||
Home >> All >> org >> apache >> hivemind >> schema >> [ rules overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: ![]() ![]() ![]() |
DETAIL: FIELD | CONSTR | METHOD |