public enum ValueToXmlHelper extends Enum<ValueToXmlHelper>
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIGURED_DEFAULT_PREFIX |
static String |
CONFIGURED_VALUE_SET_PREFIX |
static String |
LEGACY_XML_TAG_CONFIG_ELEMENT
Since 3.19 the ConfigElement was separated in ConfiguredDefault and ConfiguredValueSet.
|
static String |
XML_ATTRIBUTE_ATTRIBUTE |
static String |
XML_ATTRIBUTE_CONTAINS_NULL |
static String |
XML_ATTRIBUTE_IS_NULL |
static String |
XML_ATTRIBUTE_STRUCTURE_USAGE |
static String |
XML_TAG_ALL_VALUES |
static String |
XML_TAG_ATTRIBUTE_VALUE |
static String |
XML_TAG_CONFIGURED_DEFAULT |
static String |
XML_TAG_CONFIGURED_VALUE_SET |
static String |
XML_TAG_DATA |
static String |
XML_TAG_ENUM |
static String |
XML_TAG_LOWER_BOUND |
static String |
XML_TAG_RANGE |
static String |
XML_TAG_STEP |
static String |
XML_TAG_TABLE_CONTENT_NAME |
static String |
XML_TAG_TABLE_CONTENT_USAGE |
static String |
XML_TAG_UPPER_BOUND |
static String |
XML_TAG_VALUE
Used for both the value of a config element and the values of an enum value set.
|
static String |
XML_TAG_VALUE_SET |
| Modifier and Type | Method and Description |
|---|---|
static void |
addCDataValueToElement(String value,
Element el,
String tagName)
Adds the value to the given xml element.
|
static void |
addInternationalStringToElement(org.faktorips.values.DefaultInternationalString value,
Element el,
String tagName)
Adds the
DefaultInternationalString to the given xml element. |
static void |
addTableUsageToElement(Element el,
String structureUsage,
String tableContentName)
Adds a table usage to the XML element.
|
static Element |
addValueAndReturnElement(String value,
Element el,
String tagName)
Adds the value to the given xml element as does
addValueToElement(String, Element, String). |
static void |
addValueToElement(String value,
Element el,
String tagName)
Adds the value to the given xml element.
|
static Element |
createValueElement(String value,
String tagName,
Document ownerDocument,
boolean useCDataSection) |
static EnumValues |
getEnumValueSetFromElement(Element el,
String tagName) |
static org.faktorips.values.DefaultInternationalString |
getInternationalStringFromElement(Element el)
Returns the
DefaultInternationalString stored in the given element. |
static org.faktorips.values.DefaultInternationalString |
getInternationalStringFromElement(Element el,
String tagName)
Returns the
DefaultInternationalString stored in the child element of the given
element with the indicated name. |
static Range |
getRangeFromElement(Element el,
String tagName) |
static <T> org.faktorips.valueset.UnrestrictedValueSet<T> |
getUnrestrictedValueSet(Element el,
String tagName) |
static String |
getValueFromElement(Element valueEl)
Returns the string representation of the value stored in given value element.
|
static String |
getValueFromElement(Element el,
String tagName)
Returns the string representation of the value stored in the child element of the given
element with the indicated name.
|
static void |
setValue(String value,
Element valueEl) |
static ValueToXmlHelper |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ValueToXmlHelper[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final String XML_TAG_VALUE
public static final String XML_TAG_VALUE_SET
public static final String XML_TAG_DATA
public static final String LEGACY_XML_TAG_CONFIG_ELEMENT
public static final String CONFIGURED_DEFAULT_PREFIX
public static final String CONFIGURED_VALUE_SET_PREFIX
public static final String XML_TAG_CONFIGURED_DEFAULT
public static final String XML_TAG_CONFIGURED_VALUE_SET
public static final String XML_TAG_ATTRIBUTE_VALUE
public static final String XML_ATTRIBUTE_ATTRIBUTE
public static final String XML_TAG_ALL_VALUES
public static final String XML_TAG_ENUM
public static final String XML_TAG_RANGE
public static final String XML_TAG_STEP
public static final String XML_TAG_UPPER_BOUND
public static final String XML_TAG_LOWER_BOUND
public static final String XML_TAG_TABLE_CONTENT_NAME
public static final String XML_TAG_TABLE_CONTENT_USAGE
public static final String XML_ATTRIBUTE_STRUCTURE_USAGE
public static final String XML_ATTRIBUTE_IS_NULL
public static final String XML_ATTRIBUTE_CONTAINS_NULL
public static ValueToXmlHelper[] values()
for (ValueToXmlHelper c : ValueToXmlHelper.values()) System.out.println(c);
public static ValueToXmlHelper valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static void addValueToElement(String value, Element el, String tagName)
value - the string representation of the valueel - the xml element.tagName - the tag name for the element that stored the valuepublic static void addInternationalStringToElement(org.faktorips.values.DefaultInternationalString value,
Element el,
String tagName)
DefaultInternationalString to the given xml element. Takes care of proper
null handling.value - the DefaultInternationalString to be added.el - the xml element.tagName - the tag name for the element that stored the value.public static void addCDataValueToElement(String value, Element el, String tagName)
value - the string representation of the valueel - the xml element.tagName - the tag name for the element that stored the valuepublic static Element createValueElement(String value, String tagName, Document ownerDocument, boolean useCDataSection)
public static Element addValueAndReturnElement(String value, Element el, String tagName)
addValueToElement(String, Element, String). The created element then is returned.value - the string representation of the valueel - the XML element to add the value to.tagName - the tag name for the element that stored the valuepublic static void addTableUsageToElement(Element el, String structureUsage, String tableContentName)
el - the XML element to add the value to.structureUsage - the value for the structureUsage XML attributetableContentName - the name of the used table contentpublic static String getValueFromElement(Element el, String tagName)
null if the value is null or no such
child element exists.
<Parent>
<Property isNull="false">42</Property>
</Parent>
el - The xml element that is the parent of the element storing the value.tagName - The name of the childpublic static org.faktorips.values.DefaultInternationalString getInternationalStringFromElement(Element el, String tagName)
DefaultInternationalString stored in the child element of the given
element with the indicated name. Returns an empty DefaultInternationalString if the value is
null or no such child element exists.el - The xml element that is the parent of the element storing the international string.tagName - The name of the childpublic static String getValueFromElement(Element valueEl)
null if the value is null, the attribute isNull is true or no such
child element exists.
<Property isNull="false">42</Property>
valueEl - The xml value element containing the value.public static org.faktorips.values.DefaultInternationalString getInternationalStringFromElement(Element el)
DefaultInternationalString stored in the given element. Returns an empty
DefaultInternationalString if the value is null.el - The xml element storing the international string.public static EnumValues getEnumValueSetFromElement(Element el, String tagName)
Copyright © 2020. All rights reserved.