Module jonix.onix2

Class ProductClassification

java.lang.Object
com.tectonica.jonix.onix2.ProductClassification
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixDataComposite<JonixProductClassification>, OnixComposite.OnixDataCompositeWithKey<JonixProductClassification,ProductClassificationTypes>, OnixTag, Serializable

Product classification composite

A repeatable group of data elements which together define a product classification (NOT to be confused with a subject classification). The intended use is to enable national or international trade classifications (aka commodity codes) to be carried in an ONIX record.

Reference name <ProductClassification>
Short tag <productclassification>

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • ProductClassification

      public ProductClassification()
    • ProductClassification

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

      public void ifExists(Consumer<ProductClassification> 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
    • productClassificationType

      public ProductClassificationType productClassificationType()

      An ONIX code identifying the scheme from which the identifier in <ProductClassificationCode> is taken. Mandatory in any instance of the <ProductClassification> composite, and non-repeating.

      Jonix-Comment: this field is required
    • productClassificationCode

      public ProductClassificationCode productClassificationCode()

      A classification code from the scheme specified in <ProductClassificationType>. Mandatory in any instance of the <ProductClassification> composite, and non-repeating.

      Jonix-Comment: this field is required
    • percent

      public Percent percent()

      The percentage of the unit value of the product that is assignable to a designated product classification. Optional and non-repeating. Used when a mixed product (eg book and CD) belongs partly to two or more product classifications.

      Jonix-Comment: this field is optional
    • asStruct

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

      public ProductClassificationTypes structKey()
      Specified by:
      structKey in interface OnixComposite.OnixDataCompositeWithKey<JonixProductClassification,ProductClassificationTypes>