Class Collection.Item
- java.lang.Object
-
- info.freelibrary.iiif.presentation.v3.Collection.Item
-
- Enclosing class:
- Collection
public static class Collection.Item extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Collection.Item.Type
The type of collection item.
-
Constructor Summary
Constructors Constructor Description Item(Collection aCollection)
Create a brief collection child from a full collection.Item(Collection.Item.Type aType, String aID)
Create a new collection item from a type and ID in string form.Item(Collection.Item.Type aType, String aID, Label aLabel)
Create a new item from the supplied ID and label.Item(Collection.Item.Type aType, String aID, String aLabel)
Create a new item from the supplied ID and label.Item(Collection.Item.Type aType, URI aID)
Create a new collection item from a type and URI ID.Item(Collection.Item.Type aType, URI aID, Label aLabel)
Create a new item from the supplied ID and label.Item(Manifest aManifest)
Create a brief collection manifest from a full work manifest.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URI
getID()
Gets the item ID.Label
getLabel()
Gets the item label.NavDate
getNavDate()
Gets a navigation date.List<ContentResource<?>>
getThumbnails()
Gets a list of item thumbnails, initializing the list if this hasn't been done already.Collection.Item.Type
getType()
Gets the item type.Collection.Item
setID(String aID)
Sets the item ID.Collection.Item
setID(URI aID)
Sets the item ID.Collection.Item
setLabel(Label aLabel)
Sets the item label.Collection.Item
setLabel(String aLabel)
Sets the item label.Collection.Item
setNavDate(NavDate aNavDate)
Sets a navigation date.Collection.Item
setThumbnails(ContentResource<?>... aThumbnailArray)
Sets the thumbnails for this item.Collection.Item
setType(Collection.Item.Type aType)
Sets the type for this item.
-
-
-
Constructor Detail
-
Item
public Item(Collection.Item.Type aType, String aID)
Create a new collection item from a type and ID in string form.- Parameters:
aID
- An ID in string formaType
- A type of resource referenced from the collection
-
Item
public Item(Collection.Item.Type aType, URI aID)
Create a new collection item from a type and URI ID.- Parameters:
aID
- An IDaType
- A type of resource referenced from the collection
-
Item
public Item(Manifest aManifest)
Create a brief collection manifest from a full work manifest.- Parameters:
aManifest
- A full manifest
-
Item
public Item(Collection aCollection)
Create a brief collection child from a full collection.- Parameters:
aCollection
- A full collection
-
Item
public Item(Collection.Item.Type aType, String aID, String aLabel)
Create a new item from the supplied ID and label.- Parameters:
aID
- An item ID in string formaType
- A type of resource referenced from the collectionaLabel
- An item label in string form
-
Item
public Item(Collection.Item.Type aType, String aID, Label aLabel)
Create a new item from the supplied ID and label.- Parameters:
aID
- An item ID in string formaType
- A type of resource referenced from the collectionaLabel
- An item label
-
Item
public Item(Collection.Item.Type aType, URI aID, Label aLabel)
Create a new item from the supplied ID and label.- Parameters:
aID
- An item IDaType
- A type of resource referenced from the collectionaLabel
- An item label
-
-
Method Detail
-
getID
public URI getID()
Gets the item ID.- Returns:
- The item ID
-
setID
public Collection.Item setID(URI aID)
Sets the item ID.- Parameters:
aID
- An item ID- Returns:
- This item
-
setID
public Collection.Item setID(String aID)
Sets the item ID.- Parameters:
aID
- An item ID in string form- Returns:
- This item
-
getType
public Collection.Item.Type getType()
Gets the item type.- Returns:
- The item type
-
setType
public Collection.Item setType(Collection.Item.Type aType)
Sets the type for this item.- Parameters:
aType
- A type of resource referenced from the collection- Returns:
- The item type
-
getThumbnails
public List<ContentResource<?>> getThumbnails()
Gets a list of item thumbnails, initializing the list if this hasn't been done already.- Returns:
- The items's thumbnails
-
setThumbnails
public Collection.Item setThumbnails(ContentResource<?>... aThumbnailArray)
Sets the thumbnails for this item.- Parameters:
aThumbnailArray
- The thumbnails to set for this item- Returns:
- The resource
-
getLabel
public Label getLabel()
Gets the item label.- Returns:
- The item label
-
setLabel
public Collection.Item setLabel(Label aLabel)
Sets the item label.- Parameters:
aLabel
- The item label- Returns:
- This item
-
setLabel
public Collection.Item setLabel(String aLabel)
Sets the item label.- Parameters:
aLabel
- The item label in string form- Returns:
- The item
-
getNavDate
public NavDate getNavDate()
Gets a navigation date.- Returns:
- The navigation date
-
setNavDate
public Collection.Item setNavDate(NavDate aNavDate)
Sets a navigation date.- Parameters:
aNavDate
- The navigation date- Returns:
- The navigable resource
-
-