public abstract class Resource extends Object
Abstract IIIF resource, most other resources are based on this.
| Modifier and Type | Field and Description |
|---|---|
String |
_context
Only used during serialization,
|
static String |
CONTEXT |
public static final String CONTEXT
public String _context
Only used during serialization,
SerializerModifierpublic Resource()
public Resource(String identifier)
public String getType()
public URI getIdentifier()
protected void setIdentifier(URI identifier)
public List<ImageContent> getThumbnails()
public ImageContent getThumbnail()
public void setThumbnails(List<ImageContent> thumbnails)
public Resource addThumbnail(ImageContent... thumbnails)
public List<MetadataEntry> getMetadata()
public Resource addMetadata(MetadataEntry... meta)
public PropertyValue getLabel()
public String getLabelString()
public void setLabel(PropertyValue label)
public PropertyValue getDescription()
public String getDescriptionString()
public void setDescription(PropertyValue description)
public PropertyValue getAttribution()
public String getAttributionString()
public void setAttribution(PropertyValue attribution)
public URI getFirstLicense()
public List<ImageContent> getLogos()
public URI getLogoUri()
public void setLogos(List<ImageContent> logos)
public Resource addLogo(ImageContent first, ImageContent... rest)
public Set<ViewingHint.Type> getSupportedViewingHintTypes()
public List<ViewingHint> getViewingHints()
public void setViewingHints(List<ViewingHint> viewingHints) throws IllegalArgumentException
Set the viewing hints for this resource.
viewingHints - list of viewing hintsIllegalArgumentException - if the resources not not support one of the viewing hints.public Resource addViewingHint(ViewingHint first, ViewingHint... rest) throws IllegalArgumentException
Add one or more viewing hints for this resource.
first - first viewing hint to addrest - list of second and more viewing hintsIllegalArgumentException - if the resources not not support one of the viewing hints.public List<OtherContent> getRelated()
public void setRelated(List<OtherContent> related)
public Resource addRelated(OtherContent first, OtherContent... rest)
public List<OtherContent> getRenderings()
public void setRenderings(List<OtherContent> renderings) throws IllegalArgumentException
Sets the renderings. All renderings must have both a profile and a format.
IllegalArgumentException - if at least one rendering does not have both a profile and a format.public Resource addRendering(OtherContent first, OtherContent... rest)
Add one or more renderings. All renderings must have both a profile and a format.
IllegalArgumentException - if at least one rendering does not have both a profile and a format.public void verifyRendering(OtherContent content)
public List<OtherContent> getSeeAlso()
public void setSeeAlso(List<OtherContent> seeAlso)
public Resource addSeeAlso(OtherContent first, OtherContent... rest)
Copyright © 2018. All rights reserved.