Package org.apache.sis.internal.jaxb.lan
Class LanguageCode
java.lang.Object
org.apache.sis.internal.jaxb.gco.GO_CharacterString
org.apache.sis.internal.jaxb.lan.LanguageCode
JAXB wrapper for
Locale
in order to wrap the value in an XML element as specified by ISO 19115-3 standard.
See package documentation for more information about the handling of CodeList in ISO 19115-3.
This adapter formats the locale like below (by LocaleAdapter):
PT_Locale adapter):
Note that <gco:CharacterString> can be substituted to the language code.- Since:
- 0.3
- Version:
- 1.0
- Author:
- Cédric Briançon (Geomatys), Martin Desruisseaux (Geomatys), Cullen Rombach (Image Matters)
-
Field Summary
Fields inherited from class org.apache.sis.internal.jaxb.gco.GO_CharacterString
FILENAME, MIME_TYPE, type, URL -
Method Summary
Modifier and TypeMethodDescriptionstatic LanguageCodeCreates a new wrapper for the given locale.Returns the language, ornullif none.Methods inherited from class org.apache.sis.internal.jaxb.gco.GO_CharacterString
toCharSequence, toString
-
Method Details
-
create
Creates a new wrapper for the given locale.- Parameters:
context- the current (un)marshalling context, ornullif none.locale- the value to marshal, ornull.- Returns:
- the language to marshal, or
nullif the given locale was null or if itsLocale.getLanguage()attribute is the empty string.
-
getLanguage
Returns the language, ornullif none. The language is expected to be a 2- or 3-letters ISO 639 code, but this is not verified by this method.- Returns:
- the language code
-