Module jonix.onix3

Class Audience

java.lang.Object
com.tectonica.jonix.onix3.Audience
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixDataComposite<JonixAudience>, OnixComposite.OnixDataCompositeWithKey<JonixAudience,AudienceCodeTypes>, OnixTag, Serializable

Audience composite

An optional group of data elements which together describe an audience to which the product is directed. Repeatable, both to specify multiple distinct audiences, and to express audiences using multiple schemes.

Reference name <Audience>
Short tag <audience>
Cardinality 0…n

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • Audience

      public Audience()
    • Audience

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

      public void ifExists(Consumer<Audience> 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
    • audienceCodeType

      public AudienceCodeType audienceCodeType()

      An ONIX code which identifies the scheme from which the code in <AudienceCodeValue> is taken. Mandatory in each occurrence of the <Audience> composite, and non-repeating.

      Jonix-Comment: this field is required
    • audienceCodeValue

      public AudienceCodeValue audienceCodeValue()

      A code value taken from the scheme specified in <AudienceCodeType>. Either <AudienceCodeValue> or <AudienceHeadingText> or both must be present in each occurrence of the <Audience> composite. Non-repeating.

      Jonix-Comment: this field is required
    • mainAudience

      public MainAudience mainAudience()

      An empty element that identifies an instance of the <Audience> composite as representing the primary or main audience for the product. The main audience may be expressed in more than one audience scheme, ie there may be two or more instances of the <Audience> composite, using different schemes, each carrying the <MainAudience/> flag, so long as there is only one main audience per scheme (ie per value of <AudienceCodeType>). Optional and non-repeating in each occurrence of the <Audience> composite.

      Jonix-Comment: this field is optional
    • isMainAudience

      public boolean isMainAudience()
    • audienceCodeTypeName

      public AudienceCodeTypeName audienceCodeTypeName()

      A name which identifies a proprietary audience scheme when the code in <AudienceCodeType> indicates a proprietary scheme, eg a vendor’s own coding scheme. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • audienceHeadingTexts

      public ListOfOnixElement<AudienceHeadingText,String> audienceHeadingTexts()

      The text of an audience heading taken from the scheme specified in the <AudienceCodeType> element; or the text equivalent to the <AudienceCodeValue> if both code and text are sent. Either <AudienceCodeValue> or <AudienceHeadingText> or both must be present in each occurrence of the <Audience> composite.

      Optional, and repeatable if the text is sent in multiple languages. The language attribute is optional for a single instance of <AudienceHeadingText>, but must be included in each instance if <AudienceHeadingText> is repeated.

      Jonix-Comment: this list may be empty
    • asStruct

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

      public AudienceCodeTypes structKey()
      Specified by:
      structKey in interface OnixComposite.OnixDataCompositeWithKey<JonixAudience,AudienceCodeTypes>