|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.faktorips.runtime.internal.InternationalStringXmlReaderWriter
public class InternationalStringXmlReaderWriter
Helper class to read international strings from XML and write them back to XML.
The helper should not be initialized, just use the static utility methods.
| Field Summary | |
|---|---|
static String |
XML_ATTR_LOCALE
|
static String |
XML_ATTR_TEXT
|
static String |
XML_ELEMENT_LOCALIZED_STRING
|
static String |
XML_TAG
|
| Method Summary | |
|---|---|
static Collection<org.faktorips.values.LocalizedString> |
fromXml(Element element)
Reads the localized strings stored in the given XML Element. |
static Collection<org.faktorips.values.LocalizedString> |
fromXml(Element element,
String tagName)
Reads the localized strings stored in the child Element with
the specified name. |
static Element |
toXml(Document doc,
Collection<org.faktorips.values.LocalizedString> localizedStrings)
Creates a new Element containing the given localized strings. |
static Element |
toXml(Document doc,
org.faktorips.values.DefaultInternationalString internationalString)
Creates a new Element containing the given DefaultInternationalString. |
| 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
public static final String XML_ELEMENT_LOCALIZED_STRING
public static final String XML_ATTR_LOCALE
public static final String XML_ATTR_TEXT
| Method Detail |
|---|
public static Element toXml(Document doc,
org.faktorips.values.DefaultInternationalString internationalString)
Element containing the given DefaultInternationalString.
doc - the xml Document used to store the new element.internationalString - the DefaultInternationalString to be saved.
public static Element toXml(Document doc,
Collection<org.faktorips.values.LocalizedString> localizedStrings)
Element containing the given localized strings.
The element that is created represents an DefaultInternationalString even though the
element can be created from passing only the contents (the localized strings) of an
international string.
doc - the xml Document used to store the new element.localizedStrings - the localized strings to be saved.
public static Collection<org.faktorips.values.LocalizedString> fromXml(Element element)
localized strings stored in the given XML Element.
If the given element is not representing an international string, an empty collection is
returned.
element - the XML Element representing an international string
localized strings defined in the
international string represented by the given Element.
public static Collection<org.faktorips.values.LocalizedString> fromXml(Element element,
String tagName)
localized strings stored in the child Element with
the specified name. If the given element does not contain a child of the given name or if
that child does not represent an international string, an empty collection is returned.
element - the XML Element representing the parent of an international string.tagName - the name of the child node representing an international string.
localized strings defined in the
international string.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||