Module jonix.onix2

Class MainSubject

java.lang.Object
com.tectonica.jonix.onix2.MainSubject
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixDataComposite<JonixMainSubject>, OnixTag, Serializable

public class MainSubject extends Object implements OnixComposite.OnixDataComposite<JonixMainSubject>, Serializable

Main subject composite

An optional and repeatable group of data elements which together describe a main subject classification or subject heading which is taken from a recognized scheme other than BISAC or BIC.

Reference name <MainSubject>
Short tag <mainsubject>

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • MainSubject

      public MainSubject()
    • MainSubject

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

      public void ifExists(Consumer<MainSubject> 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
    • mainSubjectSchemeIdentifier

      public MainSubjectSchemeIdentifier mainSubjectSchemeIdentifier()

      An ONIX code which identifies a subject scheme which is designated for use in a <MainSubject> composite. Mandatory in each occurrence of the composite, and non-repeating.

      When the scheme listed in the code list display is annotated “Code”, 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). When the scheme is annotated “Text”, use the <SubjectHeadingText> element to carry the text of the subject heading.

      Jonix-Comment: this field is required
    • subjectCode

      public SubjectCode subjectCode()

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

      Jonix-Comment: this field is required
    • subjectSchemeVersion

      public SubjectSchemeVersion subjectSchemeVersion()

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

      Jonix-Comment: this field is optional
    • subjectHeadingText

      public SubjectHeadingText subjectHeadingText()

      The text of a heading taken from the scheme specified in the <MainSubjectSchemeIdentifier> element; 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 <MainSubject> composite. Non-repeating.

      Jonix-Comment: this field is optional
    • asStruct

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