Class DatasetContent
- java.lang.Object
-
- info.freelibrary.iiif.presentation.v3.DatasetContent
-
- All Implemented Interfaces:
AnnotationBody<DatasetContent>
,ContentResource<DatasetContent>
,EmbeddedResource<DatasetContent>
,Localized<DatasetContent>
,Resource<DatasetContent>
public class DatasetContent extends Object implements AnnotationBody<DatasetContent>, ContentResource<DatasetContent>, Resource<DatasetContent>
Dataset content that can be associated with an annotation or set as a thumbnail.
-
-
Constructor Summary
Constructors Constructor Description DatasetContent(String aID)
Creates a dataset content resource from the supplied ID.DatasetContent(URI aID)
Creates a dataset content resource from the supplied ID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DatasetContent
addBehaviors(Behavior... aBehaviorArray)
Adds behaviors to the resource.DatasetContent
addBehaviors(List<Behavior> aBehaviorList)
Adds behaviors to the resource.DatasetContent
clearBehaviors()
Removes the behaviors associated with this resource.List<Behavior>
getBehaviors()
Gets the resource's behaviors in an unmodifiable list.Optional<MediaType>
getFormat()
Gets the media type format of the content resource.List<Homepage>
getHomepages()
Gets a list of resource homepages, initializing the list if this hasn't been done already.URI
getID()
Gets the ID.Label
getLabel()
Gets the label.List<String>
getLanguages()
Gets the content resource's languages.List<Metadata>
getMetadata()
Gets the metadata.List<PartOf>
getPartOfs()
Gets a list of resource partOfs, initializing the list if this hasn't been done already.List<Provider>
getProviders()
Gets a list of resource providers, initializing the list if this hasn't been done already.List<Rendering>
getRenderings()
Gets a list of resource renderings, initializing the list if this hasn't been done already.RequiredStatement
getRequiredStatement()
Gets the required statement.URI
getRights()
Gets the rights.List<SeeAlso>
getSeeAlsoRefs()
Gets see also reference(s).List<Service<?>>
getServices()
Gets a list of resource services, initializing the list if this hasn't been done already.Summary
getSummary()
Gets the summary.List<ContentResource<?>>
getThumbnails()
Gets a list of resource thumbnails, initializing the list if this hasn't been done already.String
getType()
Gets the type.DatasetContent
setBehaviors(Behavior... aBehaviorArray)
Sets the behaviors for this resource.DatasetContent
setBehaviors(List<Behavior> aBehaviorList)
Sets the behaviors for this resource.DatasetContent
setFormat(MediaType aMediaType)
Sets the format of the content resource.DatasetContent
setFormat(String aMediaType)
Sets the format of the resource from a file extension or media type.DatasetContent
setHomepages(Homepage... aHomepageArray)
Sets the homepages for this resource.DatasetContent
setHomepages(List<Homepage> aHomepageList)
Sets the homepages for this resource.DatasetContent
setID(String aID)
Sets the annotation body ID from its string form.DatasetContent
setID(URI aID)
Sets the annotation body ID.DatasetContent
setLabel(Label aLabel)
Sets the resource label.DatasetContent
setLabel(String aLabel)
Sets the resource label from the supplied string.DatasetContent
setMetadata(Metadata... aMetadataArray)
Sets the resource metadata.DatasetContent
setMetadata(List<Metadata> aMetadataList)
Sets the resource metadata.DatasetContent
setPartOfs(PartOf... aPartOfArray)
Sets the partOfs for this resource.DatasetContent
setPartOfs(List<PartOf> aPartOfList)
Sets the partOfs for this resource.DatasetContent
setProviders(Provider... aProviderArray)
Sets the providers for this resource.DatasetContent
setProviders(List<Provider> aProviderList)
Sets the providers for this resource.DatasetContent
setRenderings(Rendering... aRenderingArray)
Sets the renderings for this resource.DatasetContent
setRenderings(List<Rendering> aRenderingList)
Sets the renderings for this resource.DatasetContent
setRequiredStatement(RequiredStatement aStatement)
Sets the resource's required statement.DatasetContent
setRights(String aRights)
Sets the resource's rights URI from the supplied string.DatasetContent
setRights(URI aRights)
Sets the resource's rights URI.DatasetContent
setSeeAlsoRefs(SeeAlso... aSeeAlsoArray)
Sets see also reference(s).DatasetContent
setSeeAlsoRefs(List<SeeAlso> aSeeAlsoList)
Sets see also reference(s).DatasetContent
setServices(Service<?>... aServiceArray)
Sets the services for this resource.DatasetContent
setServices(List<Service<?>> aServiceList)
Sets the services for this resource.DatasetContent
setSummary(Summary aSummary)
Sets the resource summary.DatasetContent
setSummary(String aSummary)
Sets the resource summary.DatasetContent
setThumbnails(ContentResource<?>... aThumbnailArray)
Sets the thumbnails for this resource.DatasetContent
setThumbnails(List<ContentResource<?>> aThumbnailList)
Sets the thumbnails for this resource.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface info.freelibrary.iiif.presentation.v3.AnnotationBody
getID, getType
-
Methods inherited from interface info.freelibrary.iiif.presentation.v3.ContentResource
getFormat
-
Methods inherited from interface info.freelibrary.iiif.presentation.v3.properties.Localized
setLanguages
-
Methods inherited from interface info.freelibrary.iiif.presentation.v3.Resource
getBehaviors, getHomepages, getID, getLabel, getMetadata, getPartOfs, getProviders, getRenderings, getRequiredStatement, getRights, getSeeAlsoRefs, getServices, getSummary, getThumbnails, getType
-
-
-
-
Constructor Detail
-
DatasetContent
public DatasetContent(String aID)
Creates a dataset content resource from the supplied ID.- Parameters:
aID
- An dataset content resource ID in string form
-
DatasetContent
public DatasetContent(URI aID)
Creates a dataset content resource from the supplied ID.- Parameters:
aID
- An dataset content resource ID
-
-
Method Detail
-
setFormat
public DatasetContent setFormat(MediaType aMediaType)
Description copied from interface:ContentResource
Sets the format of the content resource.- Specified by:
setFormat
in interfaceContentResource<DatasetContent>
- Parameters:
aMediaType
- A media type- Returns:
- The content resource
-
setFormat
public DatasetContent setFormat(String aMediaType)
Description copied from interface:ContentResource
Sets the format of the resource from a file extension or media type.- Specified by:
setFormat
in interfaceContentResource<DatasetContent>
- Parameters:
aMediaType
- A string representation of media type or file extension- Returns:
- The content resource
-
setProviders
public DatasetContent setProviders(Provider... aProviderArray)
Description copied from interface:Resource
Sets the providers for this resource.- Specified by:
setProviders
in interfaceResource<DatasetContent>
- Parameters:
aProviderArray
- The providers to set for this resource- Returns:
- The resource
-
setProviders
public DatasetContent setProviders(List<Provider> aProviderList)
Description copied from interface:Resource
Sets the providers for this resource.- Specified by:
setProviders
in interfaceResource<DatasetContent>
- Parameters:
aProviderList
- The providers to set for this resource- Returns:
- The resource
-
clearBehaviors
public DatasetContent clearBehaviors()
Description copied from interface:Resource
Removes the behaviors associated with this resource.- Specified by:
clearBehaviors
in interfaceResource<DatasetContent>
- Returns:
- The resource
-
setBehaviors
public DatasetContent setBehaviors(Behavior... aBehaviorArray)
Description copied from interface:Resource
Sets the behaviors for this resource. Different types of resources allow different types of behaviors. For instance, on aManifest
resource thesetBehaviors(Behavior aBehavior)
method only allows a ManifestBehavior to be passed. If a CollectionBehavior, for instance, is passed, anIllegalArgumentException
will be thrown. Manifests, collections, canvases, and ranges have their own behaviors. Other resources use theResourceBehavior
class.- Specified by:
setBehaviors
in interfaceResource<DatasetContent>
- Parameters:
aBehaviorArray
- The behaviors to set for this resource- Returns:
- The resource
-
setBehaviors
public DatasetContent setBehaviors(List<Behavior> aBehaviorList)
Description copied from interface:Resource
Sets the behaviors for this resource. Different types of resources allow different types of behaviors. For instance, on aManifest
resource thesetBehaviors(List<Behavior> aBehaviorList)
method only allows a ManifestBehavior to be passed. If a CollectionBehavior, for instance, is passed, anIllegalArgumentException
will be thrown. Manifests, collections, canvases, and ranges have their own behaviors. Other resources use theResourceBehavior
class.- Specified by:
setBehaviors
in interfaceResource<DatasetContent>
- Parameters:
aBehaviorList
- The behaviors to set for this resource- Returns:
- The resource
-
addBehaviors
public DatasetContent addBehaviors(Behavior... aBehaviorArray)
Description copied from interface:Resource
Adds behaviors to the resource.- Specified by:
addBehaviors
in interfaceResource<DatasetContent>
- Parameters:
aBehaviorArray
- An array of behaviors to add to the resource- Returns:
- The resource
-
addBehaviors
public DatasetContent addBehaviors(List<Behavior> aBehaviorList)
Description copied from interface:Resource
Adds behaviors to the resource.- Specified by:
addBehaviors
in interfaceResource<DatasetContent>
- Parameters:
aBehaviorList
- A list of behaviors to add to the resource- Returns:
- The resource
-
setSeeAlsoRefs
public DatasetContent setSeeAlsoRefs(SeeAlso... aSeeAlsoArray)
Description copied from interface:Resource
Sets see also reference(s).- Specified by:
setSeeAlsoRefs
in interfaceResource<DatasetContent>
- Parameters:
aSeeAlsoArray
- See also reference(s)- Returns:
- The resource
-
setSeeAlsoRefs
public DatasetContent setSeeAlsoRefs(List<SeeAlso> aSeeAlsoList)
Description copied from interface:Resource
Sets see also reference(s).- Specified by:
setSeeAlsoRefs
in interfaceResource<DatasetContent>
- Parameters:
aSeeAlsoList
- See also reference(s)- Returns:
- The resource
-
setServices
@SafeVarargs public final DatasetContent setServices(Service<?>... aServiceArray)
Description copied from interface:Resource
Sets the services for this resource.- Specified by:
setServices
in interfaceResource<DatasetContent>
- Parameters:
aServiceArray
- The services to set for this resource- Returns:
- The resource
-
setServices
public DatasetContent setServices(List<Service<?>> aServiceList)
Description copied from interface:Resource
Sets the services for this resource.- Specified by:
setServices
in interfaceResource<DatasetContent>
- Parameters:
aServiceList
- The services to set for this resource- Returns:
- The resource
-
setPartOfs
public DatasetContent setPartOfs(PartOf... aPartOfArray)
Description copied from interface:Resource
Sets the partOfs for this resource.- Specified by:
setPartOfs
in interfaceResource<DatasetContent>
- Parameters:
aPartOfArray
- The partOfs to set for this resource- Returns:
- The resource
-
setPartOfs
public DatasetContent setPartOfs(List<PartOf> aPartOfList)
Description copied from interface:Resource
Sets the partOfs for this resource.- Specified by:
setPartOfs
in interfaceResource<DatasetContent>
- Parameters:
aPartOfList
- The partOfs to set for this resource- Returns:
- The resource
-
setRenderings
public DatasetContent setRenderings(Rendering... aRenderingArray)
Description copied from interface:Resource
Sets the renderings for this resource.- Specified by:
setRenderings
in interfaceResource<DatasetContent>
- Parameters:
aRenderingArray
- The renderings to set for this resource- Returns:
- The resource
-
setRenderings
public DatasetContent setRenderings(List<Rendering> aRenderingList)
Description copied from interface:Resource
Sets the renderings for this resource.- Specified by:
setRenderings
in interfaceResource<DatasetContent>
- Parameters:
aRenderingList
- The renderings to set for this resource- Returns:
- The resource
-
setHomepages
public DatasetContent setHomepages(Homepage... aHomepageArray)
Description copied from interface:Resource
Sets the homepages for this resource.- Specified by:
setHomepages
in interfaceResource<DatasetContent>
- Parameters:
aHomepageArray
- The homepages to set for this resource- Returns:
- The resource
-
setHomepages
public DatasetContent setHomepages(List<Homepage> aHomepageList)
Description copied from interface:Resource
Sets the homepages for this resource.- Specified by:
setHomepages
in interfaceResource<DatasetContent>
- Parameters:
aHomepageList
- The homepages to set for this resource- Returns:
- The resource
-
setThumbnails
public DatasetContent setThumbnails(ContentResource<?>... aThumbnailArray)
Description copied from interface:Resource
Sets the thumbnails for this resource. A thumbnail can be any type of content resource, not justImageContent
.- Specified by:
setThumbnails
in interfaceResource<DatasetContent>
- Parameters:
aThumbnailArray
- The thumbnails to set for this resource- Returns:
- The resource
-
setThumbnails
public DatasetContent setThumbnails(List<ContentResource<?>> aThumbnailList)
Description copied from interface:Resource
Sets the thumbnails for this resource. A thumbnail can be any type of content resource, not justImageContent
.- Specified by:
setThumbnails
in interfaceResource<DatasetContent>
- Parameters:
aThumbnailList
- The thumbnails to set for this resource- Returns:
- The resource
-
setID
public DatasetContent setID(String aID)
Description copied from interface:AnnotationBody
Sets the annotation body ID from its string form.- Specified by:
setID
in interfaceAnnotationBody<DatasetContent>
- Specified by:
setID
in interfaceContentResource<DatasetContent>
- Specified by:
setID
in interfaceEmbeddedResource<DatasetContent>
- Specified by:
setID
in interfaceResource<DatasetContent>
- Parameters:
aID
- An annotation body's ID in string form- Returns:
- The annotation body
-
setID
public DatasetContent setID(URI aID)
Description copied from interface:AnnotationBody
Sets the annotation body ID.- Specified by:
setID
in interfaceAnnotationBody<DatasetContent>
- Specified by:
setID
in interfaceContentResource<DatasetContent>
- Specified by:
setID
in interfaceEmbeddedResource<DatasetContent>
- Specified by:
setID
in interfaceResource<DatasetContent>
- Parameters:
aID
- An annotation body's ID- Returns:
- The annotation body
-
setRights
public DatasetContent setRights(String aRights)
Description copied from interface:Resource
Sets the resource's rights URI from the supplied string.- Specified by:
setRights
in interfaceResource<DatasetContent>
- Parameters:
aRights
- A resource's rights URI in string form- Returns:
- The resource
-
setRights
public DatasetContent setRights(URI aRights)
Description copied from interface:Resource
Sets the resource's rights URI.- Specified by:
setRights
in interfaceResource<DatasetContent>
- Parameters:
aRights
- A rights URI- Returns:
- The resource
-
setRequiredStatement
public DatasetContent setRequiredStatement(RequiredStatement aStatement)
Description copied from interface:Resource
Sets the resource's required statement.- Specified by:
setRequiredStatement
in interfaceResource<DatasetContent>
- Parameters:
aStatement
- A required statement- Returns:
- The resource
-
setSummary
public DatasetContent setSummary(String aSummary)
Description copied from interface:Resource
Sets the resource summary.- Specified by:
setSummary
in interfaceResource<DatasetContent>
- Parameters:
aSummary
- A summary in string form- Returns:
- The resource
-
setSummary
public DatasetContent setSummary(Summary aSummary)
Description copied from interface:Resource
Sets the resource summary.- Specified by:
setSummary
in interfaceResource<DatasetContent>
- Parameters:
aSummary
- A resource's summary- Returns:
- The resource
-
setMetadata
public DatasetContent setMetadata(Metadata... aMetadataArray)
Description copied from interface:Resource
Sets the resource metadata.- Specified by:
setMetadata
in interfaceResource<DatasetContent>
- Parameters:
aMetadataArray
- An array of metadata properties- Returns:
- The resource
-
setMetadata
public DatasetContent setMetadata(List<Metadata> aMetadataList)
Description copied from interface:Resource
Sets the resource metadata.- Specified by:
setMetadata
in interfaceResource<DatasetContent>
- Parameters:
aMetadataList
- A list of metadata properties- Returns:
- The resource
-
setLabel
public DatasetContent setLabel(String aLabel)
Description copied from interface:Resource
Sets the resource label from the supplied string.- Specified by:
setLabel
in interfaceResource<DatasetContent>
- Parameters:
aLabel
- The string form of the label to set- Returns:
- The resource
-
setLabel
public DatasetContent setLabel(Label aLabel)
Description copied from interface:Resource
Sets the resource label.- Specified by:
setLabel
in interfaceResource<DatasetContent>
- Parameters:
aLabel
- The resource's label- Returns:
- The resource
-
getLanguages
public List<String> getLanguages()
Gets the content resource's languages.- Specified by:
getLanguages
in interfaceLocalized<T extends info.freelibrary.iiif.presentation.v3.AbstractResource<info.freelibrary.iiif.presentation.v3.AbstractContentResource<T>>>
- Returns:
- A list of languages
-
getFormat
public Optional<MediaType> getFormat()
Gets the media type format of the content resource.- Returns:
- The media type format of the content resource
-
getLabel
public Label getLabel()
Gets the label.- Returns:
- The label
-
getSummary
public Summary getSummary()
Gets the summary.- Returns:
- The summary
-
getThumbnails
public List<ContentResource<?>> getThumbnails()
Gets a list of resource thumbnails, initializing the list if this hasn't been done already.- Returns:
- The resource's thumbnails
-
getRequiredStatement
public RequiredStatement getRequiredStatement()
Gets the required statement.- Returns:
- The required statement
-
getRights
public URI getRights()
Gets the rights.- Returns:
- The rights
-
getHomepages
public List<Homepage> getHomepages()
Gets a list of resource homepages, initializing the list if this hasn't been done already.- Returns:
- The resource's homepages
-
getProviders
public List<Provider> getProviders()
Gets a list of resource providers, initializing the list if this hasn't been done already.- Returns:
- The resource's providers
-
getRenderings
public List<Rendering> getRenderings()
Gets a list of resource renderings, initializing the list if this hasn't been done already.- Returns:
- The resource's renderings
-
getID
public URI getID()
Gets the ID.- Returns:
- The ID
-
getPartOfs
public List<PartOf> getPartOfs()
Gets a list of resource partOfs, initializing the list if this hasn't been done already.- Returns:
- The resource's partOfs
-
getType
public String getType()
Gets the type.- Returns:
- The type
-
getBehaviors
public List<Behavior> getBehaviors()
Gets the resource's behaviors in an unmodifiable list.- Returns:
- The resource's behaviors
-
getSeeAlsoRefs
public List<SeeAlso> getSeeAlsoRefs()
Gets see also reference(s).- Returns:
- The see also reference(s)
-
-