|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faktorips.runtime.internal.ValueToXmlHelper
public class ValueToXmlHelper
Helper class to write values to XML and retrieve them from XML.
| Field Summary | |
|---|---|
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_CONFIG_ELEMENT
|
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
|
| Method Summary | ||
|---|---|---|
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
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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 XML_TAG_CONFIG_ELEMENT
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
| Method Detail |
|---|
public 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 value
public 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 value
public 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 value
public 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 content
public 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 child
public 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 Range getRangeFromElement(Element el,
String tagName)
public static EnumValues getEnumValueSetFromElement(Element el,
String tagName)
public static <T> org.faktorips.valueset.UnrestrictedValueSet<T> getUnrestrictedValueSet(Element el,
String tagName)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||