Module jonix.onix3

Class Header

java.lang.Object
com.tectonica.jonix.onix3.Header
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixSuperComposite, OnixHeader, OnixTag, Serializable

public class Header extends Object implements OnixHeader, Serializable

Header composite

A group of data elements which together constitute a message header. Mandatory in any ONIX for Books message to provide metadata about the message itself, and non-repeating.In ONIX 3.0, a number of redundant elements have been deleted, and the Sender and Addressee structures and the name and format of the <SentDateTime> element have been made consistent with other current ONIX formats.

Reference name <Header>
Short tag <header>
Cardinality 1

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • Header

      public Header(Element element)
      This constructor is for backward compatibility. For future proofing, it's recommended to use the other constructor, passing onixRelease label.
    • Header

      public Header(Element element, String onixRelease)
  • Method Details

    • onixVersion

      public OnixVersion onixVersion()
      Specified by:
      onixVersion in interface OnixHeader
    • onixRelease

      public String onixRelease()
      Specified by:
      onixRelease in interface OnixHeader
    • _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 (<Header> or <header>) is explicitly provided in the ONIX XML
    • ifExists

      public void ifExists(Consumer<Header> 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
    • sender

      public Sender sender()

      A group of data elements which together specify the sender of an ONIX for Books message. Mandatory in any ONIX for Books message, and non-repeating.

      Jonix-Comment: this field is required
    • sentDateTime

      public SentDateTime sentDateTime()

      The date on which the message is sent. Optionally, the time may be added, using the 24-hour clock, with an explicit indication of the time zone if required, in a format based on ISO 8601. Mandatory and non-repeating.

      Jonix-Comment: this field is required
    • messageNumber

      public MessageNumber messageNumber()

      A monotonic sequence number of the messages in a series sent between trading partners, to enable the receiver to check against gaps and duplicates. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • messageRepeat

      public MessageRepeat messageRepeat()

      A number which distinguishes any repeat transmissions of a message. If this element is used, the original is numbered 1 and repeats are numbered 2, 3 etc. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • defaultLanguageOfText

      public DefaultLanguageOfText defaultLanguageOfText()

      An ONIX code indicating the default language which is assumed for the text content of products listed in the message, unless the language is explicitly stated by sending a ‘language of text’ in Group P.10 of each Product record. Optional and non-repeating. To avoid any possible ambiguity, use of this default is deprecated, but any default supplied will be assumed for all Product records which do not specify the language of the text explicitly in Group P.10. It is strongly recommended that the language of the text should be specified in the <Language> composite for each product.

      Jonix-Comment: this field is optional
    • defaultPriceType

      public DefaultPriceType defaultPriceType()

      An ONIX code indicating the default price type which is assumed for prices of products listed in the message, unless the Price type is explicitly stated by sending a Price type code in each <Price> composite for each Product record. Optional and non-repeating. To avoid any possible ambiguity, use of this default is deprecated, but any default supplied will be assumed for all prices in Group P.26 which do not specify the Price type explicitly. It is strongly recommended that the price type should be specified in the <Price> composite for each individual price.

      Jonix-Comment: this field is optional
    • defaultCurrencyCode

      public DefaultCurrencyCode defaultCurrencyCode()

      An ONIX code indicating the default currency which is assumed for prices of products listed in the message, unless the Currency code is explicitly stated by sending a Currency code in each <Price> composite for each Product record. Optional and non-repeating. To avoid any possible ambiguity, use of this default is deprecated, but any default supplied will be assumed for all prices in Group P.26 which do not specify the Currency code explicitly. It is strongly recommended that the Currency code should be specified in the <Price> composite for each individual price.

      Jonix-Comment: this field is optional
    • addressees

      public ListOfOnixComposite<Addressee> addressees()

      A group of data elements which together specify the addressee of an ONIX for Books message. Optional, and repeatable if there are several addressees.

      Jonix-Comment: this list may be empty
    • messageNotes

      public ListOfOnixElement<MessageNote,String> messageNotes()

      Free text giving additional information about the message. Optional, and repeatable in order to provide a note in multiple languages. The language attribute is optional for a single instance of <MessageNote>, but must be included in each instance if <MessageNote> is repeated.

      Jonix-Comment: this list may be empty