Module jonix.onix3

Class ReviewRating

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

public class ReviewRating extends Object implements OnixComposite.OnixDataComposite<JonixReviewRating>, Serializable

Review rating composite

An optional group of data elements which together specify a ‘star rating’ awarded as part of a review of the publication, used when <TextType> indicates the text is a review. Not repeatable.

Reference name <ReviewRating>
Short tag <reviewrating>
Cardinality 0…1

This tag may be included in the following composites:

Possible placements within ONIX message:

Since:
Onix-3.03
See Also:
  • Field Details

  • Constructor Details

    • ReviewRating

      public ReviewRating()
    • ReviewRating

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

      public void ifExists(Consumer<ReviewRating> 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
    • rating

      public Rating rating()

      The ‘star rating’ awarded as part of a review of the publication. Mandatory within an occurrence of the <ReviewRating> composite, and non-repeating.

      Jonix-Comment: this field is required
    • ratingLimit

      public RatingLimit ratingLimit()

      The maximum possible rating that may be awarded as part of a review of the publication. Optional, but where used, it must be greater than or equal to the specified <Rating>.

      Jonix-Comment: this field is optional
    • ratingUnitss

      public ListOfOnixElement<RatingUnits,String> ratingUnitss()

      The ‘units’ used by a rating, eg stars, tomatoes etc. Optional, and repeatable to provide the units in multiple languages. The language attribute is optional for a single instance of <RatingUnits>, but must be included in each instance if <RatingUnits> is repeated.

      Jonix-Comment: this list may be empty
    • asStruct

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