Class LocalisedCharacterString

java.lang.Object
org.apache.sis.internal.jaxb.lan.LocalisedCharacterString

final class LocalisedCharacterString extends Object
The <LocalisedCharacterString> elements nested in a <textGroup> one. This element contains a string for a given locale.
Since:
0.3
Version:
0.3
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) Locale
    The locale value for this string.
    private static final String
    A prefix to concatenate with the language code.
    (package private) String
    The text in the locale of this localized string.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty constructor only used by JAXB.
    Constructs a localized string for the given locale and text.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    equals(Object object)
    Compares this string with the given object for equality.
    Returns the locale language for <LocalisedCharacterString> attribute.
    int
    Returns a hash code value for this string.
    void
    setLocale(String localeId)
    Sets the locale language, using a string formatted as #locale-xxx, where xxx are the two or three letters representing the language.
    Returns a string representation of this object for debugging purpose.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • PREFIX

      private static final String PREFIX
      A prefix to concatenate with the language code. This is a hack for a common pattern found in the way locales are specified in ISO 19139:2007 files. See SIS-137 for more information.
      See Also:
    • locale

      Locale locale
      The locale value for this string.
    • text

      String text
      The text in the locale of this localized string. JAXB uses this field for formatting the <LocalisedCharacterString> elements in the XML tree at marshalling-time.
  • Constructor Details

    • LocalisedCharacterString

      LocalisedCharacterString()
      Empty constructor only used by JAXB.
    • LocalisedCharacterString

      LocalisedCharacterString(Locale locale, String text)
      Constructs a localized string for the given locale and text.
      Parameters:
      locale - the string language.
      text - the string.
  • Method Details

    • getLocale

      public String getLocale()
      Returns the locale language for <LocalisedCharacterString> attribute.
      Returns:
      the current locale.
      See Also:
    • setLocale

      public void setLocale(String localeId)
      Sets the locale language, using a string formatted as #locale-xxx, where xxx are the two or three letters representing the language.
      Parameters:
      localeId - the new locale.
      See Also:
    • hashCode

      public int hashCode()
      Returns a hash code value for this string.
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object object)
      Compares this string with the given object for equality.
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Returns a string representation of this object for debugging purpose. Example:
      Overrides:
      toString in class Object
      See Also: