Class Range.Item
- java.lang.Object
-
- info.freelibrary.iiif.presentation.v3.Range.Item
-
- Enclosing class:
- Range
public static class Range.Item extends Object
A wrapper for the types of resources that can be put into a range's items:Canvas
,Range
, andSpecificResource
.
-
-
Constructor Summary
Constructors Constructor Description Item(Canvas aCanvas)
Creates a new range item from a canvas.Item(Canvas aCanvas, boolean aEmbeddedCanvas)
Creates a new range item from a canvas; the canvas is either embedded or referenced depending on the boolean flag passed to the constructor.Item(Range aRange)
Creates a new range item from another range.Item(SpecificResource aSpecificResource)
Creates a new range item from a specific resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URI
getID()
Gets the ID from the resource wrapped by this item.Object
getResource()
Gets the resource wrapped by this item.String
getType()
Gets the type of the resource wrapped by this item.
-
-
-
Constructor Detail
-
Item
public Item(Canvas aCanvas)
Creates a new range item from a canvas. The range item represents a reference to the canvas rather than an embedded canvas.- Parameters:
aCanvas
- A canvas to use as a range item
-
Item
public Item(Canvas aCanvas, boolean aEmbeddedCanvas)
Creates a new range item from a canvas; the canvas is either embedded or referenced depending on the boolean flag passed to the constructor.- Parameters:
aCanvas
- A canvas to use as a range itemaEmbeddedCanvas
- Whether a canvas should be embedded or a reference to it created
-
Item
public Item(Range aRange)
Creates a new range item from another range.- Parameters:
aRange
- A range item created from another range
-
Item
public Item(SpecificResource aSpecificResource)
Creates a new range item from a specific resource.- Parameters:
aSpecificResource
- A range item created from a specific resource
-
-
Method Detail
-
getID
public URI getID()
Gets the ID from the resource wrapped by this item.- Returns:
- A resource ID
-
getType
public String getType()
Gets the type of the resource wrapped by this item.- Returns:
- The resource type
-
getResource
public Object getResource()
Gets the resource wrapped by this item.- Returns:
- The item's resource
-
-