Module jonix.onix3

Class ComparisonProductPrice

java.lang.Object
com.tectonica.jonix.onix3.ComparisonProductPrice
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixSuperComposite, OnixTag, Serializable

public class ComparisonProductPrice extends Object implements OnixComposite.OnixSuperComposite, Serializable

Comparison product price composite

Optional group of data elements that together define a price for a directly comparable product, to facilitate supply of price data to retailers who do not receive a full ONIX record for that comparable product. This is primarily intended for use within a <Product> record for a digital product, to provide a price for a comparable physical product. The composite is repeatable in order to define multiple comparison prices.

Those using this composite should be wary of the volatile nature of product prices: special note should be taken of the risk of stale data being stored in data recipients’ systems when prices for the comparison product are updated, as those updates to the comparison product may occur outside the context of the main product being described in the <Product> record. Because of this, ONIX suppliers are cautioned of the risk of contradictory data in separate data feeds. This composite should not be supplied unless specifically requested by a particular recipient.

The inclusion of a comparison price in itself implies nothing about the availability or status of the comparable product. However, there may be legal requirements in particular territories relating to the use of comparison prices in promotion that users of this data must comply with.

Note that the comparison product price composite does not include all the features of the <Price> composite: for example, <PriceQualifier> is not included. Thus data providers should ensure that any conditions attached to the comparison product price are such that it is directly comparable to the price of the main product being described.

Reference name <ComparisonProductPrice>
Short tag <comparisonproductprice>
Cardinality 0…n

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • ComparisonProductPrice

      public ComparisonProductPrice()
    • ComparisonProductPrice

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

      public void ifExists(Consumer<ComparisonProductPrice> 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
    • priceAmount

      public PriceAmount priceAmount()

      The amount of the comparison product price. Mandatory and non-repeating within any occurrence of the <ComparisonProductPrice> composite.

      Jonix-Comment: this field is required
    • productIdentifiers

      A group of data elements which together define an identifier for a comparison product in accordance with a specified scheme. At least one <ProductIdentifier> composite is mandatory within an occurrence of <ComparisonProductPrice>, to identify the product to which the comparison price applies. Repeatable with different identifiers for the same product.

      It is strongly advised that the relationship between the comparison product and the product described in the <Product> record is defined in a <RelatedProduct> composite in P.23 – typically this might be <ProductRelationCode> 06 (related product is alternative format with same content as product) and may in many circumstances also be 13 (product is e-publication based on related product).

      Jonix-Comment: this list is required to contain at least one item
    • priceType

      public PriceType priceType()

      An ONIX code indicating the type of the comparison price in the <PriceAmount> element within the <ComparisonProductPrice> composite. Mandatory, unless a <DefaultPriceType> has been specified in the message header although use of such a default is deprecated. Non-repeating.

      Jonix-Comment: this field is optional
    • currencyCode

      public CurrencyCode currencyCode()

      An ONIX code identifying the currency in which the <PriceAmount> in an occurrence of the <ComparisonProductPrice> composite is stated. Optional and non-repeating, but required if the currency is not the default currency for the ONIX message. To avoid any possible ambiguity, it is strongly recommended that the currency should be stated here.

      Jonix-Comment: this field is optional