Module jonix.onix3

Class ProductIdentifier

java.lang.Object
com.tectonica.jonix.onix3.ProductIdentifier
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixDataComposite<JonixProductIdentifier>, OnixComposite.OnixDataCompositeWithKey<JonixProductIdentifier,ProductIdentifierTypes>, OnixTag, Serializable

Product identifier composite

A group of data elements which together specify an identifier of a product in accordance with a particular scheme. Mandatory within <Product>, and repeatable with different identifiers for the same product. As well as standard identifiers, the composite allows proprietary identifiers (for example SKUs assigned by wholesalers or vendors) to be sent as part of the ONIX record.

ISBN-13 numbers in their unhyphenated form constitute a range of GTIN-13 numbers that has been reserved for the international book trade. Effective from 1 January 2007, it was agreed by ONIX national groups that it should be mandatory in an ONIX <Product> record for any item carrying an ISBN-13 to include the ISBN-13 labelled as a GTIN-13 number (ie as <ProductIDType> code 03), since this is how the ISBN-13 will be used in book trade transactions. For many ONIX applications this will also be sufficient.

For some ONIX applications, however, particularly when data is to be supplied to the library sector, there may be reasons why the ISBN-13 must also be sent labelled distinctively as an ISBN-13 (ie as <ProductIDType> code 15). Users should consult ‘good practice’ guidelines and/or discuss with their trading partners.

Note that for some identifiers such as ISBN, punctuation (typically hyphens or spaces for ISBNs) is used to enhance readability when printed, but the punctuation is dropped when carried in ONIX data. But for other identifiers – for example DOI – the punctuation is an integral part of the identifier and must always be included.

Reference name <ProductIdentifier>
Short tag <productidentifier>
Cardinality 1…n

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • ProductIdentifier

      public ProductIdentifier()
    • ProductIdentifier

      public ProductIdentifier(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 (<ProductIdentifier> or <productidentifier>) is explicitly provided in the ONIX XML
    • ifExists

      public void ifExists(Consumer<ProductIdentifier> 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
    • productIDType

      public ProductIDType productIDType()

      An ONIX code identifying the scheme from which the identifier in the <IDValue> element is taken. Mandatory in each occurrence of the <ProductIdentifier> composite, and non-repeating.

      Jonix-Comment: this field is required
    • idValue

      public IDValue idValue()

      An identifier of the type specified in the <ProductIDType> element. Mandatory in each occurrence of the <ProductIdentifier> composite, and non-repeating.

      Jonix-Comment: this field is required
    • idTypeName

      public IDTypeName idTypeName()

      A name which identifies a proprietary identifier scheme (ie a scheme which is not a standard and for which there is no individual ID type code). Must be included when, and only when, the code in the <ProductIDType> element indicates a proprietary scheme, eg a wholesaler’s own code. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • asStruct

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

      public ProductIdentifierTypes structKey()
      Specified by:
      structKey in interface OnixComposite.OnixDataCompositeWithKey<JonixProductIdentifier,ProductIdentifierTypes>