Module jonix.onix3

Class Barcode

java.lang.Object
com.tectonica.jonix.onix3.Barcode
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixDataComposite<JonixBarcode>, OnixTag, Serializable

public class Barcode extends Object implements OnixComposite.OnixDataComposite<JonixBarcode>, Serializable

Barcode composite

A group of data elements which together specify a barcode type and its position on a product. Optional: expected to be used only in North America. Repeatable if more than one type of barcode is carried on a single product. The absence of this composite does not mean that a product is not bar-coded.

Reference name <Barcode>
Short tag <barcode>
Cardinality 0…n

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • Barcode

      public Barcode()
    • Barcode

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

      public void ifExists(Consumer<Barcode> 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
    • barcodeType

      public BarcodeType barcodeType()

      An ONIX code indicating whether, and in what form, a barcode is carried on a product. Mandatory in any instance of the <Barcode> composite, and non-repeating.

      Jonix-Comment: this field is required
    • positionOnProduct

      public PositionOnProduct positionOnProduct()

      An ONIX code indicating a position on a product; in this case, the position in which a barcode appears. Required if the <BarcodeType> element indicates that the barcode appears on the product, even if the position is ‘unknown’. Omitted if the <BarcodeType> element specifies that the product does not carry a barcode. Non-repeating.

      Jonix-Comment: this field is optional
    • asStruct

      public JonixBarcode asStruct()
      Specified by:
      asStruct in interface OnixComposite.OnixDataComposite<JonixBarcode>