Class LinkedResource

java.lang.Object
com.adobe.epubcheck.opf.LinkedResource

public final class LinkedResource extends Object
Represents a linked resource in a Package Document, i.e. a resource referenced from a link element (either at the package level or in collections).
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A builder for LinkedResource.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final com.google.common.base.Optional<String>
     
    private final com.google.common.base.Optional<String>
     
    private final com.google.common.base.Optional<String>
     
    private final Set<Property>
     
    private final io.mola.galimatias.URL
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    io.mola.galimatias.URL
    Returns the URL of the linked resource document, i.e.
    com.google.common.base.Optional<String>
    Returns an Optional containing the value of the ID of the link , or Optional.absent() if the element has no ID.
    com.google.common.base.Optional<String>
    Returns an Optional containing the declared media type of this resource as specified in the media-type attribute, or Optional.absent() if the media type is not declared.
    com.google.common.base.Optional<String>
    Returns an Optional containing the value of the refines attribute of the link , or Optional.absent() if the element has no such attribute.
    Returns the set of properties defining the nature of the resource, as defined in the rel attribute.
    io.mola.galimatias.URL
    Returns the URL of the linked resource as defined in the href attribute of the link element.
    private static com.google.common.base.Optional<String>
    optional(String string)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • id

      private final com.google.common.base.Optional<String> id
    • url

      private final io.mola.galimatias.URL url
    • rel

      private final Set<Property> rel
    • refines

      private final com.google.common.base.Optional<String> refines
    • mimetype

      private final com.google.common.base.Optional<String> mimetype
  • Constructor Details

  • Method Details

    • getId

      public com.google.common.base.Optional<String> getId()
      Returns an Optional containing the value of the ID of the link , or Optional.absent() if the element has no ID.
    • getURL

      public io.mola.galimatias.URL getURL()
      Returns the URL of the linked resource as defined in the href attribute of the link element. Guaranteed non-null.
    • getDocumentURL

      public io.mola.galimatias.URL getDocumentURL()
      Returns the URL of the linked resource document, i.e. the linked URL minus a possible fragment. Guaranteed non-null.
    • getRel

      public Set<Property> getRel()
      Returns the set of properties defining the nature of the resource, as defined in the rel attribute.
      Returns:
      the set of rel properties (may be empty for collection resources). Guaranteed non-null.
    • getRefines

      public com.google.common.base.Optional<String> getRefines()
      Returns an Optional containing the value of the refines attribute of the link , or Optional.absent() if the element has no such attribute.
    • getMimeType

      public com.google.common.base.Optional<String> getMimeType()
      Returns an Optional containing the declared media type of this resource as specified in the media-type attribute, or Optional.absent() if the media type is not declared.
    • optional

      private static com.google.common.base.Optional<String> optional(String string)