Package org.apache.sis.internal.jaxb.lan
Class LocaleAdapter
java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<LanguageCode,Locale>
org.apache.sis.internal.jaxb.lan.LocaleAdapter
JAXB adapter for XML
<GO_CharacterString> or <LanguageCode> elements
mapped to Locale. This adapter formats the locale like below:
This adapter is used for legacy locales in gmd namespace.
For locales in the newer lan namespace, see PT_Locale.- Since:
- 0.3
- Version:
- 0.4
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classJAXB adapter for XML<PT_Locale>elements mapped toLocale. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionConverts the locale to the object to be marshalled in a XML file or stream.unmarshal(LanguageCode value) Converts the locale read from a XML stream to the object containing the value.
-
Constructor Details
-
LocaleAdapter
private LocaleAdapter()Empty constructor for JAXB.
-
-
Method Details
-
unmarshal
Converts the locale read from a XML stream to the object containing the value. JAXB calls automatically this method at unmarshalling time.- Specified by:
unmarshalin classXmlAdapter<LanguageCode,Locale> - Parameters:
value- the adapter for this metadata value.- Returns:
- a locale which represents the metadata value.
-
marshal
Converts the locale to the object to be marshalled in a XML file or stream. JAXB calls automatically this method at marshalling time.- Specified by:
marshalin classXmlAdapter<LanguageCode,Locale> - Parameters:
value- the locale value.- Returns:
- the adapter for the given locale.
-