Class Range
- java.lang.Object
-
- de.digitalcollections.iiif.model.sharedcanvas.Resource<Range>
-
- de.digitalcollections.iiif.model.sharedcanvas.Range
-
public class Range extends Resource<Range>
An ordered list of canvases, and/or further ranges.Ranges allow canvases, or parts thereof, to be grouped together in some way. This could be for textual reasons, such as to distinguish books, chapters, verses, sections, non-content-bearing pages, the table of contents or similar. Equally, physical features might be important such as quires or gatherings, sections that have been added later and so forth.
See http://iiif.io/api/presentation/2.1/#range
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RangeaddCanvas(Canvas first, Canvas... rest)RangeaddCanvas(String idOfFirst, String... idsOfRest)RangeaddMember(Resource first, Resource... rest)Adds one or more member resources.RangeaddRange(Range first, Range... rest)RangeaddRange(String first, String... rest)List<Canvas>getCanvases()LayergetContentLayer()List<Resource>getMembers()List<Range>getRanges()URIgetStartCanvas()Set<ViewingHint.Type>getSupportedViewingHintTypes()StringgetType()ViewingDirectiongetViewingDirection()voidsetCanvases(List<Canvas> canvases)voidsetContentLayer(Layer contentLayer)voidsetContentLayer(String identifier)voidsetMembers(List<Resource> members)Sets the member resources.voidsetRanges(List<Range> ranges)voidsetStartCanvas(URI startCanvas)voidsetViewingDirection(ViewingDirection viewingDirection)-
Methods inherited from class de.digitalcollections.iiif.model.sharedcanvas.Resource
addAttribution, addDescription, addLabel, addLicense, addLogo, addLogo, addMetadata, addMetadata, addRelated, addRendering, addSeeAlso, addService, addThumbnail, addViewingHint, addWithin, getAlternatives, getAttribution, getAttributionString, getDescription, getDescriptionString, getFirstLicense, getIdentifier, getLabel, getLabelString, getLicenses, getLogos, getLogoUri, getMetadata, getRelated, getRenderings, getSeeAlso, getServices, getThumbnail, getThumbnails, getViewingHints, getWithin, isDefaultChoice, setAlternatives, setAttribution, setDescription, setIdentifier, setIsDefaultChoice, setLabel, setLicenses, setLogos, setRelated, setRenderings, setSeeAlso, setServices, setThumbnails, setViewingHints, setWithin, toString, verifyRendering
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.digitalcollections.iiif.model.openannotation.Choice
addAlternative
-
-
-
-
Field Detail
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getViewingDirection
public ViewingDirection getViewingDirection()
-
setViewingDirection
public void setViewingDirection(ViewingDirection viewingDirection)
-
getSupportedViewingHintTypes
public Set<ViewingHint.Type> getSupportedViewingHintTypes()
- Overrides:
getSupportedViewingHintTypesin classResource<Range>
-
getStartCanvas
public URI getStartCanvas()
-
setStartCanvas
public void setStartCanvas(URI startCanvas)
-
getContentLayer
public Layer getContentLayer()
-
setContentLayer
public void setContentLayer(Layer contentLayer)
-
setContentLayer
public void setContentLayer(String identifier)
-
setMembers
public void setMembers(List<Resource> members)
Sets the member resources. Must be either instances ofRangeorCanvas. All members must have an identifier and a label.- Parameters:
members- member resources- Throws:
IllegalArgumentException- if at least one member is not aRangeorCanvasor does not have an identifier and a label;
-
addMember
public Range addMember(Resource first, Resource... rest) throws IllegalArgumentException
Adds one or more member resources. Must be either instances ofRangeorCanvas. All members must have an identifier and a label.- Parameters:
first- first memberrest- other members- Returns:
- this instance with added members
- Throws:
IllegalArgumentException- if at least one member is not aRangeorCanvasor does not have an identifier and a label;
-
-