Module jonix.onix3

Class Measure

java.lang.Object
com.tectonica.jonix.onix3.Measure
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixDataComposite<JonixMeasure>, OnixComposite.OnixDataCompositeWithKey<JonixMeasure,MeasureTypes>, OnixTag, Serializable

Measure composite

An optional group of data elements which together identify a measurement and the units in which it is expressed; used to specify the overall dimensions of a physical product including its packaging (if any). Repeatable to provide multiple combinations of dimension and unit.

Reference name <Measure>
Short tag <measure>
Cardinality 0…n

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • Measure

      public Measure()
    • Measure

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

      public void ifExists(Consumer<Measure> 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
    • measureType

      public MeasureType measureType()

      An ONIX code indicating the dimension which is specified by an occurrence of the measure composite. Mandatory in each occurrence of the <Measure> composite, and non-repeating.

      Jonix-Comment: this field is required
    • measurement

      public Measurement measurement()

      The number which represents the dimension specified in <MeasureType> in the measure units specified in <MeasureUnitCode>. Mandatory in each occurrence of the <Measure> composite, and non-repeating.

      Jonix-Comment: this field is required
    • measureUnitCode

      public MeasureUnitCode measureUnitCode()

      An ONIX code indicating the measure unit in which dimensions are given. Mandatory in each occurrence of the <Measure> composite, and non-repeating. This element must follow the dimension to which the measure unit applies. See example below.

      Jonix-Comment: this field is required
    • asStruct

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

      public MeasureTypes structKey()
      Specified by:
      structKey in interface OnixComposite.OnixDataCompositeWithKey<JonixMeasure,MeasureTypes>