Package org.apache.sis.internal.jaxb.lan
Class PT_Locale.Wrapper
java.lang.Object
org.apache.sis.internal.jaxb.lan.PT_Locale.Wrapper
- Enclosing class:
- PT_Locale
Wraps the
"locale" attributes in a "PT_Locale" element.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) CharsetThe character encoding.(package private) CountryThe country code, ornullif none.private booleantrueif marshalling an element from the ISO 19115:2003 model, orfalseif marshalling an element from the ISO 19115:2014 model.(package private) LanguageCodeThe language code, ornullif none. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbeforeMarshal(Marshaller marshaller) Invoked by JAXBMarshallerbefore this object is marshalled to XML.private LanguageCodeGets the language code for this PT_Locale.private LanguageCodeGets the language code for this PT_Locale.private voidsetLanguage(LanguageCode newValue) Sets the language code for this PT_Locale.private voidsetLanguageCode(LanguageCode newValue) Sets the language code for this PT_Locale.
-
Field Details
-
language
LanguageCode languageThe language code, ornullif none. -
country
Country countryThe country code, ornullif none. -
characterEncoding
Charset characterEncodingThe character encoding. Ifnull, then this property will be set to the encoding of XML file. The specification said:Indeed, an XML file can only support data expressed in a single character set, which is generally declared in the XML file header. Having all the localized strings stored in a single XML file would limit the use of a single character set such as UTF-8. In order to avoid this, the
LocalisedCharacterStringclass is implemented specifically to allow a by-reference containment of thePT_FreeText.textGroupproperty, and thePT_LocaleContaineris the recommended root element to be instantiated in a dedicated XML file. The localized string related to a given locale can be stored in a corresponding locale container (i.e. XML file) and referenced from thePT_FreeText.textGroupproperty instances. -
isLegacyMetadata
private boolean isLegacyMetadatatrueif marshalling an element from the ISO 19115:2003 model, orfalseif marshalling an element from the ISO 19115:2014 model.
-
-
Constructor Details
-
Wrapper
public Wrapper()Empty constructor for JAXB only. -
Wrapper
Creates a new wrapper for the given locale.- Parameters:
locale- the locale to marshal, ornull.encoding- the character set, ornullfor defaulting to the encoding of XML document.
-
-
Method Details
-
getLanguageCode
Gets the language code for this PT_Locale. Used in ISO 19115:2003 model. -
setLanguageCode
Sets the language code for this PT_Locale. Used in ISO 19115:2003 model. -
getLanguage
Gets the language code for this PT_Locale. Used in ISO 19115:2014 model. -
setLanguage
Sets the language code for this PT_Locale. Used in ISO 19115:2014 model. -
beforeMarshal
Invoked by JAXBMarshallerbefore this object is marshalled to XML. If thecharacterEncodingis not set, then this method set a default value. That default is the encoding of the XML document being written.Note: This is redundant with the encoding declared in the XML header. But the<lan:characterEncoding>element is mandatory according OGC/ISO schemas.
-