Module jonix.onix3

Class CoverResource

java.lang.Object
com.tectonica.jonix.onix3.CoverResource
All Implemented Interfaces:
OnixComposite, OnixComposite.OnixSuperComposite, OnixTag, Serializable

public class CoverResource extends Object implements OnixComposite.OnixSuperComposite, Serializable

Cover resource composite

A group of data elements that together provide details of a single file or resource of which the cover is composed. At least one resource is required in each <CoverManifest>, and the <CoverResource> composite is repeatable to describe multiple resources.

The composite must contain either a Resource file link or a No resource indicator.

Reference name <CoverResource>
Short tag <coverresource>
Cardinality 1…n

This tag may be included in the following composites:

Possible placements within ONIX message:

Since:
Onix-3.08
See Also:
  • Field Details

  • Constructor Details

    • CoverResource

      public CoverResource()
    • CoverResource

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

      public void ifExists(Consumer<CoverResource> 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
    • resourceFileLinks

      public ListOfOnixElement<ResourceFileLink,String> resourceFileLinks()

      A URL which provides a link to a resource. Mandatory in each occurrence of the <CoverResource> composite unless <NoResource/> is present, and repeatable if the resource can be linked in more than one way, eg by HTTP, FTP and DOI URLs.

      Jonix-Comment: this list is required to contain at least one item
    • sequenceNumber

      public SequenceNumber sequenceNumber()

      A number which (in combination with any <SalesOutlet> composite) specifies a single overall sequence of cover resources. Optional and non-repeating. It is strongly recommended that each occurrence of the <CoverResource> composite should carry a <SequenceNumber>.

      Note that with <SalesOutlet> below, the provision of vendor-specific resources can require the use of duplicate sequence numbers.

      Jonix-Comment: this field is optional
    • resourceRole

      public ResourceRole resourceRole()

      An ONIX code which identifies the role or purpose of the resource file which is specified in <ResourceFileLink>. Optional and non-repeating, and may only be used when <ResourceFileLink> is present.

      Jonix-Comment: this field is optional
    • noResource

      public NoResource noResource()

      An empty element that provides a positive indication that there is no alternative ‘generic’ resource to be used in cases where there is a vendor-specific resource (indicated using <SalesOutlet>) with the same <SequenceNumber> specified within the manifest. The empty <NoResource/> must be used – and must only be used – when no <ResourceFileLink> is present.

      Jonix-Comment: this field is optional
    • isNoResource

      public boolean isNoResource()
    • salesOutlets

      public ListOfOnixComposite<SalesOutlet> salesOutlets()

      A group of data elements which together identify a specific retail outlet. Optional in each occurrence of the <CoverResource> composite, and repeatable with multiple outlets.

      Normally omitted, but for vendor-specific resources, the <SalesOutlet> composite lists an outlet for which the resource is relevant. The <SalesOutlet> composite may be repeated where a single resource is relevant for multiple outlets. Where <SalesOutlet> is omitted, the resource is appropriate for all – or all other – outlets, depending on the use of the resource’s Sequence number.

      Manifest consisting of three resources: Manifest consisting of two or three resources:
      • sequence number 1 – no sales outlet
      • sequence number 2 – exclusive to Amazon
      • sequence number 2 – no sales outlet (ie alternative resource for third parties other than Amazon)
      • sequence number 3 – no sales outlet
      • sequence number 1 – no sales outlet
      • sequence number 2 – exclusive to Amazon/Kobo
      • sequence number 2 – exclusive to publisher’s direct sales
      • sequence number 2 – no sales outlet and <NoResource/> (ie no alternative resource for third parties other than Amazon, Kobo and the publisher’s direct sales)
      • sequence number 3 – no sales outlet

      In the first example, the insert always consists of three resources. Resources #1 and #3 are used for all vendors, with the vendor-specific resource #2 for Amazon replacing resource #2 used for all other vendors. In the second example, the same vendor-specific resource #2 is used for Amazon and Kobo, a different #2 resource is used for the publisher’s own direct sales, whereas the cover for other vendors consists of only two resources (#1 and #3).

      Jonix-Comment: this list may be empty
    • resourceIdentifiers

      A group of data elements which together specify an identifier of the resource, in accordance with the specified scheme. The composite is optional, and repeatable to specify multiple identifiers for the resource, but may only be used when <ResourceFileLink> is present.

      Jonix-Comment: this list may be empty
    • resourceFileDetails

      An ONIX code which provides added detail of the resource file which is specified in <ResourceFileLink>, eg the file type of the resource. Optional, and repeatable in order to provide multiple additional details, but may only be used when <ResourceFileLink> is present.

      Jonix-Comment: this list may be empty
    • resourceFileFeatures

      An optional group of data elements which together describe an aspect of a resource file specified in <ResourceFileLink> that is too specific to be covered in the <ResourceFileDetail> element. It may only be used when <ResourceFileLink> is present, and is repeatable in order to describe different aspects of the resource file.

      Jonix-Comment: this list may be empty
    • resourceFileDescriptions

      public ListOfOnixElement<ResourceFileDescription,String> resourceFileDescriptions()

      If the Resource file details and features do not adequately describe the resource, a short text description may be added to give a more detailed description. The field is optional but may only be used when <ResourceFileLink> is present, and is repeatable to provide parallel specifications in multiple languages. The language attribute is optional for a single instance of <ResourceFileDescription>, but must be included in each instance if <ResourceFileDescription> is repeated to provide parallel descriptions in multiple languages.

      Jonix-Comment: this list may be empty
    • resourceFileContentDescriptions

      public ListOfOnixElement<ResourceFileContentDescription,String> resourceFileContentDescriptions()

      The content contained in the resource may be described, for manual confirmation – for example ‘Foil block overlay’ or ‘CMYK separations of rear cover’.

      Note that individual resources do not need to be aligned with the physical organization of the book (eg with the folded signatures of a print-on-demand product), nor with the logical organization (eg with the chapters in the work).

      The field is optional but may only be used when <ResourceFileLink> is present, and is repeatable to provide parallel descriptions in multiple languages. The language attribute is optional for a single instance of <ResourceFileContentDescription>, but must be included in each instance if <ResourceFileContentDescription> is repeated to provide parallel descriptions in multiple languages.

      Jonix-Comment: this list may be empty
    • resourceFileDates

      An optional group of data elements which together specify a date associated with the resource file specified in <ResourceFileLink>, eg date when the resource was last updated. Repeatable to specify different dates with their various roles, but may only be used when <ResourceFileLink> is present.

      Jonix-Comment: this list may be empty