Class LocaleAdapter.Wrapped

java.lang.Object
javax.xml.bind.annotation.adapters.XmlAdapter<PT_Locale,Locale>
org.apache.sis.internal.jaxb.lan.LocaleAdapter.Wrapped
Enclosing class:
LocaleAdapter

public static final class LocaleAdapter.Wrapped extends XmlAdapter<PT_Locale,Locale>
JAXB adapter for XML <PT_Locale> 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:
1.0
Version:
1.0
  • Constructor Details

    • Wrapped

      private Wrapped()
      Empty constructor for JAXB.
  • Method Details

    • marshal

      public PT_Locale marshal(Locale value)
      Substitutes the locale by the wrapper to be marshalled into an XML file or stream. JAXB calls automatically this method at marshalling time.
      Specified by:
      marshal in class XmlAdapter<PT_Locale,Locale>
      Parameters:
      value - the locale value.
      Returns:
      the wrapper for the locale value.
    • unmarshal

      public Locale unmarshal(PT_Locale value)
      Substitutes the wrapped value read from a XML stream by the object which will contains the value. JAXB calls automatically this method at unmarshalling time.
      Specified by:
      unmarshal in class XmlAdapter<PT_Locale,Locale>
      Parameters:
      value - the wrapper for this metadata value.
      Returns:
      a locale which represents the metadata value.