public class JobXMLUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_PREFIX
Prefix for map keys which will be converted to xml attributes
|
static java.lang.String |
CDATA_SUFFIX
Suffix for map key of string values, to output the content as CDATA section
|
static java.lang.String |
DATAVALUE_SUFFIX
Suffix for map key of map value, to output value map in "generic data" structure, allowing automatic reversal
|
static java.lang.String |
PLURAL_REPL |
static java.lang.String |
PLURAL_SUFFIX
suffix for map keys of Collection values, to convert a collection to a plural/single* element set
|
static java.lang.String |
TEXT_KEY
map key for text value to output the value as element text, must be the only non-attribute map entry on output.
|
Constructor and Description |
---|
JobXMLUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
addAttribute(java.util.Map map,
java.lang.String key,
java.lang.Object val)
Add entry to the map for the given key, converting the key into an attribute key identifier
|
static java.lang.String |
asAttributeName(java.lang.String key)
Return the key as an attribute key identifier
|
static java.lang.String |
asCDATAName(java.lang.String key)
Return the key name for use as a CDATA section
|
static java.lang.String |
asDataValueKey(java.lang.String key)
Return the key name for use as generic data structure
|
static void |
makeAttribute(java.util.Map map,
java.lang.String key)
Replace the key in the map with the attribute key identifier, if the map entry exists and is not null
|
static java.util.Map |
makePlural(java.util.Map map,
java.lang.String key)
change the key for the map entry to the pluralized key form
|
static java.lang.String |
pluralize(java.lang.String key)
Return the pluralized key form of the key
|
static java.util.Map |
toAttrMap(java.lang.String key,
java.lang.Object val)
Return a Map with an attribute key identifier created from the given key, and the given value
|
public static final java.lang.String ATTR_PREFIX
public static final java.lang.String PLURAL_SUFFIX
public static final java.lang.String PLURAL_REPL
public static final java.lang.String CDATA_SUFFIX
public static final java.lang.String DATAVALUE_SUFFIX
public static final java.lang.String TEXT_KEY
public static void addAttribute(java.util.Map map, java.lang.String key, java.lang.Object val)
public static java.lang.String asAttributeName(java.lang.String key)
public static void makeAttribute(java.util.Map map, java.lang.String key)
public static java.util.Map toAttrMap(java.lang.String key, java.lang.Object val)
public static java.lang.String pluralize(java.lang.String key)
public static java.util.Map makePlural(java.util.Map map, java.lang.String key)
public static java.lang.String asCDATAName(java.lang.String key)
public static java.lang.String asDataValueKey(java.lang.String key)