Module jonix.onix3

Class Subject

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

public class Subject extends Object implements OnixComposite.OnixDataComposite<JonixSubject>, Serializable

Subject composite

An optional group of data elements which together specify a subject classification, category or subject heading. Repeatable, both to express multiple subject categories or headings in a scheme, and to specify subjects using multiple schemes.

Reference name <Subject>
Short tag <subject>
Cardinality 0…n

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • Subject

      public Subject()
    • Subject

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

      public void ifExists(Consumer<Subject> 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
    • subjectSchemeIdentifier

      public SubjectSchemeIdentifier subjectSchemeIdentifier()

      An ONIX code which identifies the category or subject heading scheme which is used in an occurrence of the <Subject> composite. Mandatory in each occurrence of the composite, and non-repeating.

      For category schemes that use code values, use the associated <SubjectCode> element to carry the value (if so required, the <SubjectHeadingText> element can be used simultaneously to carry the text equivalent of the code). For schemes that use text headings, use the <SubjectHeadingText> element to carry the text of the category heading.

      Jonix-Comment: this field is required
    • subjectCode

      public SubjectCode subjectCode()

      A single subject class or category code from the scheme specified in the <SubjectSchemeIdentifier> element. Either <SubjectCode> or <SubjectHeadingText> or both must be present in each occurrence of the <Subject> composite. Non-repeating.

      Jonix-Comment: this field is required
    • mainSubject

      public MainSubject mainSubject()

      An empty element that identifies an instance of the <Subject> composite as representing the primary or main subject category for the product. The main category may be expressed in more than one subject scheme, ie there may be two or more instances of the <Subject> composite, using different schemes, each carrying the <MainSubject/> flag, so long as there is only one main category per scheme (ie per value of <SubjectSchemeIdentifier>). Optional, though for some subject schemes (eg Thema), <MainSubject/> can be vital in order to prevent potential misinterpretation of a group of subject codes, and for other schemes which by their nature only allow one code (eg Dewey), <MainSubject> is not relevant. Non-repeating in each occurrence of the <Subject> composite.

      Jonix-Comment: this field is optional
    • isMainSubject

      public boolean isMainSubject()
    • subjectSchemeName

      public SubjectSchemeName subjectSchemeName()

      A name identifying a proprietary subject scheme (ie a scheme which is not a standard and for which there is no individual identifier code) when <SubjectSchemeIdentifier> is coded ‘24’. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • subjectSchemeVersion

      public SubjectSchemeVersion subjectSchemeVersion()

      A number which identifies a version or edition of the subject scheme specified in the associated <SubjectSchemeIdentifier> element. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • subjectHeadingTexts

      public ListOfOnixElement<SubjectHeadingText,String> subjectHeadingTexts()

      The text of a subject heading taken from the scheme specified in the <SubjectSchemeIdentifier> element, or of free language keywords if the scheme is specified as ‘keywords’; or the text equivalent to the <SubjectCode> value, if both code and text are sent. Either <SubjectCode> or <SubjectHeadingText> or both must be present in each occurrence of the <Subject> composite.

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

      Jonix-Comment: this list may be empty
    • asStruct

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