Package org.apache.sis.internal.jaxb.lan
Class Country
java.lang.Object
org.apache.sis.internal.jaxb.gco.GO_CharacterString
org.apache.sis.internal.jaxb.lan.Country
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:
Note that<gco:CharacterString> can be substituted to the country 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
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 country to marshal, or
nullif the given locale was null or if itsLocale.getCountry()attribute is the empty string.
-
getLocale
public static Locale getLocale(Context context, LanguageCode language, Country country, Class<?> caller) Returns the locale for the given language and country (which may be null), ornullif none.- Parameters:
context- the current (un)marshalling context, ornullif none.language- the wrapper for the language value.country- the wrapper for the country value.caller- the class which is invoking this method, used only in case of warning.- Returns:
- a locale which represents the language and country value.
-