Module jonix.onix2

Class Header

java.lang.Object
com.tectonica.jonix.onix2.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. The elements may alternatively be sent without being grouped into a composite, but the composite approach is recommended since it makes it easier to maintain a standard header “package” to drop into any new ONIX Product Information Message. Note that the Sender and Addressee Identifier composites can only be used within the Header composite, and future extensions to the Header will be defined only within the composite.

Reference name <Header>
Short tag <header>

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
    • fromEANNumber

      public FromEANNumber fromEANNumber()

      An EAN location number which identifies the sender of an ONIX message. Optional and non-repeating; but either the <FromCompany> element or a sender identifier using one or more elements from MH.1 to MH.5 must be included.

      Jonix-Comment: this field is required
    • sentDate

      public SentDate sentDate()

      The date on which the message is sent. Optionally, the time may be added, using the 24-hour clock. Mandatory and non-repeating.

      Jonix-Comment: this field is required
    • fromSAN

      public FromSAN fromSAN()

      A US book trade Standard Address Number which identifies the sender of an ONIX message. Optional and non-repeating; but either the <FromCompany> element or a sender identifier using one or more elements from MH.1 to MH.5 must be included.

      Jonix-Comment: this field is optional
    • fromCompany

      public FromCompany fromCompany()

      The name of the sender organization, which should always be stated in a standard form agreed with the addressee. Optional and non-repeating; but either the <FromCompany> element or a sender identifier using one or more elements from MH.1 to MH.5 must be included.

      The text is not limited to ASCII characters.

      Jonix-Comment: this field is optional
    • fromPerson

      public FromPerson fromPerson()

      Free text giving the name, department, phone number, etc for a contact person in the sender organization who is responsible for the content of the message. Optional and non-repeating.

      The text is not limited to ASCII characters.

      Jonix-Comment: this field is optional
    • fromEmail

      public FromEmail fromEmail()

      A text field giving the email address for a contact person in the sender organization who is responsible for the content of the message. Optional and non-repeating.

      The text is not limited to ASCII characters.

      Jonix-Comment: this field is optional
    • toEANNumber

      public ToEANNumber toEANNumber()

      An EAN location number which identifies the addressee of an ONIX message. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • toSAN

      public ToSAN toSAN()

      A US book trade Standard Address Number which identifies the addressee of an ONIX message. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • toCompany

      public ToCompany toCompany()

      The name of the addressee organization, which should always be stated in a standard form agreed with the addressee. Optional and non-repeating.

      The text is not limited to ASCII characters.

      Jonix-Comment: this field is optional
    • toPerson

      public ToPerson toPerson()

      Free text giving the name, department etc for a contact person in the addressee organization to whom the message is to be directed. Optional and non-repeating.

      The text is not limited to ASCII characters.

      Jonix-Comment: this field is optional
    • messageNumber

      public MessageNumber messageNumber()

      A 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
    • messageNote

      public MessageNote messageNote()

      Free text giving additional information about the message. Optional and non-repeating.

      The text is not limited to ASCII characters.

      Jonix-Comment: this field is optional
    • defaultLanguageOfText

      public DefaultLanguageOfText defaultLanguageOfText()

      An ISO standard code indicating the default language which is assumed for the text of products listed in the message, unless explicitly stated otherwise by sending a “language of text” element in the product record. This default will be assumed for all product records which do not specify a language in Group PR.11. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • defaultPriceTypeCode

      public DefaultPriceTypeCode defaultPriceTypeCode()

      An ONIX code indicating the default price type which is assumed for prices listed in the message, unless explicitly stated otherwise in a <Price> composite in the product record. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • defaultCurrencyCode

      public DefaultCurrencyCode defaultCurrencyCode()

      An ISO standard code indicating the currency which is assumed for prices listed in the message, unless explicitly stated otherwise in a <Price> composite in the product record. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • defaultLinearUnit

      public DefaultLinearUnit defaultLinearUnit()

      A code indicating the default unit which is assumed for linear measurements listed in the message, unless otherwise specified in the product record. This element is deprecated. For most implementations, explicit coding of measure units with each occurrence of a measurement is to be preferred. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • defaultWeightUnit

      public DefaultWeightUnit defaultWeightUnit()

      A code indicating the default unit which is assumed for weights listed in the message, unless otherwise specified in the product record. This element is deprecated. For most implementations, explicit coding of units with each occurrence of a weight is to be preferred. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • defaultClassOfTrade

      public DefaultClassOfTrade defaultClassOfTrade()

      Free text indicating the class of trade which is assumed for prices given in the message, unless explicitly stated otherwise specified in <j149>. For example: Institutional, General trade, Wholesale distributor, which may be represented by a suitable code or abbreviation agreed between trading partners. otherwise specified in the product record. Optional and non-repeating.

      The text is not limited to ASCII characters.

      Jonix-Comment: this field is optional
    • senderIdentifiers

      A group of data elements which together define the identifier of the sender within a specified namespace, used here to allow different party identifiers to be included without defining additional data elements. In particular the composite allows a proprietary identifier to be used by mutual agreement between parties to an exchange. The composite is optional and repeatable; but either the <FromCompany> element or a sender identifier using one or more elements from MH.1 to MH.5 must be included.

      Jonix-Comment: this list may be empty
    • addresseeIdentifiers

      A group of data elements which together define the identifier of the addressee within a specified namespace, used here to allow different party identifiers to be included without defining additional data elements. In particular the composite allows a proprietary identifier to be used by mutual agreement between parties to an exchange. The composite is optional and repeatable.

      Jonix-Comment: this list may be empty