Module jonix.onix3

Class Language

java.lang.Object
com.tectonica.jonix.onix3.Language
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixDataComposite<JonixLanguage>, OnixComposite.OnixDataCompositeWithKey<JonixLanguage,LanguageRoles>, OnixTag, Serializable

Language composite

A group of data elements which together represent a language, and specify its role and, where required, whether it is a country variant. Optional, and repeatable to specify multiple languages and their various roles.

Reference name <Language>
Short tag <language>
Cardinality 0…n

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • Language

      public Language()
    • Language

      public Language(Element element)
  • Method Details

    • _initialize

      public void _initialize()
      Description copied from interface: OnixComposite
      This is an internal API. Since Jonix 8.0, composite objects are being populated lazily. This method initiates the population process, and is invoked internally by the accessor APIs of the composites
      Specified by:
      _initialize in interface OnixComposite
    • exists

      public boolean exists()
      Description copied from interface: OnixTag
      indicates whether this tag exists in the ONIX record
      Specified by:
      exists in interface OnixTag
      Returns:
      whether this tag (<Language> or <language>) is explicitly provided in the ONIX XML
    • ifExists

      public void ifExists(Consumer<Language> action)
    • getXmlElement

      public Element getXmlElement()
      Description copied from interface: OnixComposite
      For advanced use-cases only.
      Specified by:
      getXmlElement in interface OnixComposite
      Returns:
      native representation of the XML element underlying to this tag
    • languageRole

      public LanguageRole languageRole()

      An ONIX code indicating the ‘role’ of a language in the context of the ONIX record. Mandatory in each occurrence of the <Language> composite, and non-repeating.

      Jonix-Comment: this field is required
    • languageCode

      public LanguageCode languageCode()

      An ONIX code indicating a language. Mandatory in each occurrence of the <Language> composite, and non-repeating.

      Jonix-Comment: this field is required
    • countryCode

      public CountryCode countryCode()

      An ONIX code identifying a country when this specifies a variant of the language, eg US English. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • regionCode

      public RegionCode regionCode()

      An ONIX code identifying the region when this specifies a variant of the language eg Flemish – Dutch as used in the Flemish region of Belgium. Optional and non-repeatable. A region is an area which is not a country (in the sense that it does not have a distinct country code), but which is precisely defined in geographical terms, eg Quebec, Scotland. In general, if a region is specified, the country may be omitted. If both country and region are specified, the region must be within the country. Note that US States have region codes, while US overseas territories have distinct ISO Country Codes.

      Jonix-Comment: this field is optional
    • scriptCode

      public ScriptCode scriptCode()

      An ONIX code identifying the script in which the language is represented. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • asStruct

      public JonixLanguage asStruct()
      Specified by:
      asStruct in interface OnixComposite.OnixDataComposite<JonixLanguage>
    • structKey

      public LanguageRoles structKey()
      Specified by:
      structKey in interface OnixComposite.OnixDataCompositeWithKey<JonixLanguage,LanguageRoles>