Module jonix.onix2

Class MediaFile

java.lang.Object
com.tectonica.jonix.onix2.MediaFile
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixDataComposite<JonixMediaFile>, OnixComposite.OnixDataCompositeWithKey<JonixMediaFile,ImageAudioVideoFileTypes>, OnixTag, Serializable

Image/audio/video file link composite

A repeatable group of data elements which together identify and provide pointers to, an image, audio or video file related to the product.

Reference name <MediaFile>
Short tag <mediafile>

This tag may be included in the following composites:

Possible placements within ONIX message:

See Also:
  • Field Details

  • Constructor Details

    • MediaFile

      public MediaFile()
    • MediaFile

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

      public void ifExists(Consumer<MediaFile> 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
    • mediaFileTypeCode

      public MediaFileTypeCode mediaFileTypeCode()

      An ONIX code which identifies the type of image/audio/video file which is linked by the <MediaFileLink> element. Mandatory in each occurrence of the <MediaFile> composite, and non-repeating.

      Jonix-Comment: this field is required
    • mediaFileLinkTypeCode

      public MediaFileLinkTypeCode mediaFileLinkTypeCode()

      An ONIX code which identifies the type of link which is given in the <MediaFileLink> element, for example a URL, DOI, filename etc. Mandatory in each occurrence of the <MediaFile> composite, and non-repeating.

      Jonix-Comment: this field is required
    • mediaFileLink

      public MediaFileLink mediaFileLink()

      A link to the image/audio/video file specified by the <MediaFileTypeCode>, using the link type specified by the <MediaFileLinkTypeCode>. Mandatory in each occurrence of the <MediaFile> composite, and non-repeating.

      Jonix-Comment: this field is required
    • downloadCaption

      public DownloadCaption downloadCaption()

      Text of a caption associated with a download file, and intended to be displayed whenever the file content is used. Optional and non-repeating. The <DownloadCaption> element may be sent together with either or both of fields <DownloadCredit>, or <DownloadCopyrightNotice>.

      Jonix-Comment: this field is required
    • mediaFileFormatCode

      public MediaFileFormatCode mediaFileFormatCode()

      An ONIX code which identifies the format of the image/audio/video file which is linked by the <MediaFileLink> element. For image files, JPEG, GIF and TIF are supported. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • imageResolution

      public ImageResolution imageResolution()

      The resolution of an image file which is linked by the <MediaFileLink> element, expressed as dots or pixels per inch. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • textWithDownload

      public TextWithDownload textWithDownload()

      Unstructured text associated with a file which is available for download, and intended to be displayed whenever the file content is used. Optional and non-repeating. Text may include credits, copyright notice, etc. If this field is sent, the individual elements <DownloadCaption>, <DownloadCredit>, and <DownloadCopyrightNotice> must not be sent, and vice versa.

      Jonix-Comment: this field is optional
    • downloadCredit

      public DownloadCredit downloadCredit()

      Text of a personal or corporate credit associated with a download file, and intended to be displayed whenever the file content is used. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • downloadCopyrightNotice

      public DownloadCopyrightNotice downloadCopyrightNotice()

      Text of a copyright notice associated with a download file, and intended to be displayed whenever the file content is used. Optional and non-repeating.

      Jonix-Comment: this field is optional
    • downloadTerms

      public DownloadTerms downloadTerms()

      Text of any terms and conditions associated with a download file. Optional and non-repeating. This field may be sent alone, or with the <TextWithDownload> element, or with any combination of the <DownloadCaption>, <DownloadCredit>, and <DownloadCopyrightNotice> elements.

      Jonix-Comment: this field is optional
    • mediaFileDate

      public MediaFileDate mediaFileDate()

      The date when the image referenced by the <MediaFileLink> element was last changed. Optional and non-repeating. This element is intended to allow the receiver of an updated ONIX record to determine whether it is necessary to download a new copy of the file.

      Jonix-Comment: this field is optional
    • asStruct

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

      public ImageAudioVideoFileTypes structKey()
      Specified by:
      structKey in interface OnixComposite.OnixDataCompositeWithKey<JonixMediaFile,ImageAudioVideoFileTypes>