Package com.adobe.epubcheck.opf
Class LinkedResource
- java.lang.Object
-
- com.adobe.epubcheck.opf.LinkedResource
-
public final class LinkedResource extends java.lang.ObjectRepresents a linked resource in a Package Document, i.e. a resource referenced from alinkelement (either at the package level or in collections).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLinkedResource.BuilderA builder forLinkedResource.
-
Field Summary
Fields Modifier and Type Field Description private com.google.common.base.Optional<java.lang.String>idprivate com.google.common.base.Optional<java.lang.String>mimetypeprivate com.google.common.base.Optional<java.lang.String>refinesprivate java.util.Set<Property>relprivate io.mola.galimatias.URLurl
-
Constructor Summary
Constructors Modifier Constructor Description privateLinkedResource(LinkedResource.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description io.mola.galimatias.URLgetDocumentURL()Returns the URL of the linked resource document, i.e.com.google.common.base.Optional<java.lang.String>getId()Returns anOptionalcontaining the value of the ID of thelink, orOptional.absent()if the element has no ID.com.google.common.base.Optional<java.lang.String>getMimeType()Returns anOptionalcontaining the declared media type of this resource as specified in themedia-typeattribute, orOptional.absent()if the media type is not declared.com.google.common.base.Optional<java.lang.String>getRefines()Returns anOptionalcontaining the value of therefinesattribute of thelink, orOptional.absent()if the element has no such attribute.java.util.Set<Property>getRel()Returns the set of properties defining the nature of the resource, as defined in therelattribute.io.mola.galimatias.URLgetURL()Returns the URL of the linked resource as defined in thehrefattribute of thelinkelement.private static com.google.common.base.Optional<java.lang.String>optional(java.lang.String string)
-
-
-
Field Detail
-
id
private final com.google.common.base.Optional<java.lang.String> id
-
url
private final io.mola.galimatias.URL url
-
rel
private final java.util.Set<Property> rel
-
refines
private final com.google.common.base.Optional<java.lang.String> refines
-
mimetype
private final com.google.common.base.Optional<java.lang.String> mimetype
-
-
Constructor Detail
-
LinkedResource
private LinkedResource(LinkedResource.Builder builder)
-
-
Method Detail
-
getId
public com.google.common.base.Optional<java.lang.String> getId()
Returns anOptionalcontaining the value of the ID of thelink, orOptional.absent()if the element has no ID.
-
getURL
public io.mola.galimatias.URL getURL()
Returns the URL of the linked resource as defined in thehrefattribute of thelinkelement. 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 java.util.Set<Property> getRel()
Returns the set of properties defining the nature of the resource, as defined in therelattribute.- Returns:
- the set of rel properties (may be empty for collection resources). Guaranteed non-null.
-
getRefines
public com.google.common.base.Optional<java.lang.String> getRefines()
Returns anOptionalcontaining the value of therefinesattribute of thelink, orOptional.absent()if the element has no such attribute.
-
getMimeType
public com.google.common.base.Optional<java.lang.String> getMimeType()
Returns anOptionalcontaining the declared media type of this resource as specified in themedia-typeattribute, orOptional.absent()if the media type is not declared.
-
optional
private static com.google.common.base.Optional<java.lang.String> optional(java.lang.String string)
-
-