Module jonix.onix2

Class RelatedProduct

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

public class RelatedProduct extends Object implements OnixComposite.OnixSuperComposite, Serializable

Related product composite

A repeatable group of data elements which together describe a product which has a specified relationship to the product which is described in the ONIX record. Although for reasons of upwards compatibility the composite includes individual fields for ISBN and EAN-13 number, use of the nested <ProductIdentifier> composite is to be preferred, since it allows any recognized identifier scheme (eg DOI) to be used.

The minimum required content of an occurrence of the <RelatedProduct> composite is a <RelationCode> and either a product identifier or a <ProductForm> value. In other words, it is valid to list related products by relationship and identifier only, or by relationship and form only.

Reference name <RelatedProduct>
Short tag <relatedproduct>

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • RelatedProduct

      public RelatedProduct()
    • RelatedProduct

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

      public void ifExists(Consumer<RelatedProduct> 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
    • relationCode

      public RelationCode relationCode()

      An ONIX code which identifies the nature of the relationship between two products, eg “replaced-by”. Mandatory in each occurrence of the <RelatedProduct> composite, and non-repeating.

      Jonix-Comment: this field is required
    • isbn

      public ISBN isbn()

      10-character ISBN of the related product. Optional and non-repeating. The <ProductIdentifier> composite provides a more general method of handling identifiers, and is to be preferred. The <ISBN> element is on no account to be used to carry a 13-digit ISBN.

      Jonix-Comment: this field is required
    • ean13

      public EAN13 ean13()

      EAN.UCC-13 number of the related product. Optional and non-repeating. The <ProductIdentifier> composite provides a more general method of handling identifiers, and is to be preferred.

      Jonix-Comment: this field is optional
    • productForm

      public ProductForm productForm()

      An ONIX code which indicates the primary form of the product. Optional and non-repeating; required in any occurrence of the <RelatedProduct> composite that does not carry a product identifier.

      Jonix-Comment: this field is optional
    • productPackaging

      public ProductPackaging productPackaging()

      An ONIX code which indicates the type of packaging used for the product. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • productFormDescription

      public ProductFormDescription productFormDescription()

      If product form codes do not adequately describe the product, a short text description may be added. The text may include the number and type of pieces contained in a multiple product, and/or a more detailed specification of the product form. The field is optional and non-repeating.

      Jonix-Comment: this field is optional
    • numberOfPieces

      public NumberOfPieces numberOfPieces()

      If the product is homogeneous (ie all items or pieces which constitute the product have the same form), the number of items or pieces may be included here. If the product consists of a number of items or pieces of different forms (eg books and audio cassettes), the <ContainedItem> composite should be used – see below. This field is optional and non-repeating.

      Jonix-Comment: this field is optional
    • tradeCategory

      public TradeCategory tradeCategory()

      An ONIX code which indicates a trade category which is somewhat related to but not properly an attribute of product form. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • epubType

      public EpubType epubType()

      An ONIX code identifying the type of an epublication. This element is mandatory if and only if the <ProductForm> code for the product is DG.

      Jonix-Comment: this field is optional
    • epubTypeVersion

      public EpubTypeVersion epubTypeVersion()

      A version number which applies to a specific epublication type. Optional and non-repeating, and can occur only if the <EpubType> field is present.

      Jonix-Comment: this field is optional
    • epubTypeDescription

      public EpubTypeDescription epubTypeDescription()

      A free text description of an epublication type. Optional and non-repeating, and can occur only if the <EpubType> field is present.

      Jonix-Comment: this field is optional
    • epubFormat

      public EpubFormat epubFormat()

      An ONIX code identifying the underlying format of an epublication. Optional and non-repeating, and can occur only if the <EpubType> field is present. Note that where the epublication type is wholly defined by the delivery format, this element effectively duplicates the <EpubType> field.

      Jonix-Comment: this field is optional
    • epubFormatVersion

      public EpubFormatVersion epubFormatVersion()

      A version number which applies to an epublication format. Optional and non-repeating, and can occur only if the <EpubFormat> field is present.

      Jonix-Comment: this field is optional
    • epubFormatDescription

      public EpubFormatDescription epubFormatDescription()

      A free text description of an epublication format. Optional and non-repeating, and can occur only if the <EpubType> field is present, but it does not require the presence of the <EpubFormat> field.

      Jonix-Comment: this field is optional
    • epubTypeNote

      public EpubTypeNote epubTypeNote()

      A free text description of features of a product which are specific to its appearance as a particular epublication type. Optional and non-repeatable, and can occur only if the <EpubType> field is present.

      Jonix-Comment: this field is optional
    • productIdentifiers

      A repeatable group of data elements which together define the identifier of a product in accordance with a specified scheme, and allowing other types of product identifier for a related product to be included without defining additional data elements. See notes on the <ProductIdentifier> composite in section PR.2 for details of the handling of ISBN-13.

      Jonix-Comment: this list may be empty
    • websites

      An optional and repeatable group of data elements which together identify and provide pointers to a website which is relevant to the product identified in an occurrence of the <RelatedProduct> composite.

      Jonix-Comment: this list may be empty
    • productFormDetails

      An ONIX code which provides added detail of the medium and/or format of the product. Optional and repeatable.

      Jonix-Comment: this list may be empty
    • productFormFeatures

      A repeatable group of data elements which together describe an aspect of product form that is too specific to be covered in the <ProductForm> and <ProductFormDetail> elements. Optional.

      Jonix-Comment: this list may be empty
    • bookFormDetails

      An ONIX code specifying more detail of the product format when the product is a book. Repeatable when two or more coded characteristics apply. This field is optional, but must only be included when the code in the <ProductForm> element begins with letter B. Note that this field has been superseded by the new element <ProductFormDetail>, and the code list will not be further developed. The field is retained only for purposes of upwards compatibility, and its use is now to be deprecated.

      Jonix-Comment: this list may be empty
    • productContentTypes

      An ONIX code which indicates certain types of content which are closely related to but not strictly an attribute of product form, eg audiobook. Optional and repeatable. The element is intended to be used with products where content is delivered in the form of a digital or analogue recording. It is not expected to be used for books.

      Jonix-Comment: this list may be empty
    • publishers

      public ListOfOnixComposite<Publisher> publishers()

      A repeatable group of data elements which together identify an entity which is associated with the publishing of a related product. The composite will allow additional publishing roles to be introduced without adding new fields. Each occurrence of the composite must carry a publishing role code and either a name code or a name or both. Please see Group PR.19 for details.

      Jonix-Comment: this list may be empty