Class PT_FreeText

java.lang.Object
org.apache.sis.internal.jaxb.gco.GO_CharacterString
org.apache.sis.internal.jaxb.lan.PT_FreeText

public final class PT_FreeText extends GO_CharacterString
JAXB wrapper for ISO 19115-3 <PT_FreeText> element mapped to InternationalString. It will be used in order to marshal and unmarshal international strings localized in several language, using the DefaultInternationalString implementation class. Example: If there is more than one locale, the whole <lan:textGroup> block is repeated for each locale, instead of repeating <lan:LocalisedCharacterString> inside the same group as we could expect. However, at unmarshalling time, both forms are accepted.

The <gco:CharacterString> element is inherited from the GO_CharacterString parent class.

Since:
0.3
Version:
1.0
Author:
Cédric Briançon (Geomatys), Martin Desruisseaux (Geomatys), Cullen Rombach (Image Matters)
  • Method Details

    • create

      public static PT_FreeText create(org.opengis.util.InternationalString text)
      Constructs a text group from the given InternationalString if it contains at least one non-root locale. Otherwise returns null, meaning that the simpler GO_CharacterString construct should be used instead.
      Parameters:
      text - an international string which could have several translations embedded for the same text.
      Returns:
      a PT_FreeText instance if the given text has several translations, or null otherwise.
    • toCharSequence

      protected CharSequence toCharSequence()
      Returns the content of this <gco:CharacterString> as an InternationalString.
      Overrides:
      toCharSequence in class GO_CharacterString
      Returns:
      the character sequence for this <gco:CharacterString>.