Class ModelContent

    • Constructor Detail

      • ModelContent

        public ModelContent​(String aID)
        Creates a model content resource from the supplied ID.
        Parameters:
        aID - An model content resource ID in string form
      • ModelContent

        public ModelContent​(URI aID)
        Creates a model content resource from the supplied ID.
        Parameters:
        aID - An model content ID
    • Method Detail

      • setFormat

        public ModelContent 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 interface ContentResource<ModelContent>
        Parameters:
        aMediaType - A string representation of media type or file extension
        Returns:
        The content resource
      • setProviders

        public ModelContent setProviders​(Provider... aProviderArray)
        Description copied from interface: Resource
        Sets the providers for this resource.
        Specified by:
        setProviders in interface Resource<ModelContent>
        Parameters:
        aProviderArray - The providers to set for this resource
        Returns:
        The resource
      • setProviders

        public ModelContent setProviders​(List<Provider> aProviderList)
        Description copied from interface: Resource
        Sets the providers for this resource.
        Specified by:
        setProviders in interface Resource<ModelContent>
        Parameters:
        aProviderList - The providers to set for this resource
        Returns:
        The resource
      • setBehaviors

        public ModelContent 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 a Manifest resource the setBehaviors(Behavior aBehavior) method only allows a ManifestBehavior to be passed. If a CollectionBehavior, for instance, is passed, an IllegalArgumentException will be thrown. Manifests, collections, canvases, and ranges have their own behaviors. Other resources use the ResourceBehavior class.
        Specified by:
        setBehaviors in interface Resource<ModelContent>
        Parameters:
        aBehaviorArray - The behaviors to set for this resource
        Returns:
        The resource
      • setBehaviors

        public ModelContent 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 a Manifest resource the setBehaviors(List<Behavior> aBehaviorList) method only allows a ManifestBehavior to be passed. If a CollectionBehavior, for instance, is passed, an IllegalArgumentException will be thrown. Manifests, collections, canvases, and ranges have their own behaviors. Other resources use the ResourceBehavior class.
        Specified by:
        setBehaviors in interface Resource<ModelContent>
        Parameters:
        aBehaviorList - The behaviors to set for this resource
        Returns:
        The resource
      • addBehaviors

        public ModelContent addBehaviors​(Behavior... aBehaviorArray)
        Description copied from interface: Resource
        Adds behaviors to the resource.
        Specified by:
        addBehaviors in interface Resource<ModelContent>
        Parameters:
        aBehaviorArray - An array of behaviors to add to the resource
        Returns:
        The resource
      • setServices

        public ModelContent setServices​(List<Service<?>> aServiceList)
        Description copied from interface: Resource
        Sets the services for this resource.
        Specified by:
        setServices in interface Resource<ModelContent>
        Parameters:
        aServiceList - The services to set for this resource
        Returns:
        The resource
      • setPartOfs

        public ModelContent setPartOfs​(PartOf... aPartOfArray)
        Description copied from interface: Resource
        Sets the partOfs for this resource.
        Specified by:
        setPartOfs in interface Resource<ModelContent>
        Parameters:
        aPartOfArray - The partOfs to set for this resource
        Returns:
        The resource
      • setPartOfs

        public ModelContent setPartOfs​(List<PartOf> aPartOfList)
        Description copied from interface: Resource
        Sets the partOfs for this resource.
        Specified by:
        setPartOfs in interface Resource<ModelContent>
        Parameters:
        aPartOfList - The partOfs to set for this resource
        Returns:
        The resource
      • setRenderings

        public ModelContent setRenderings​(Rendering... aRenderingArray)
        Description copied from interface: Resource
        Sets the renderings for this resource.
        Specified by:
        setRenderings in interface Resource<ModelContent>
        Parameters:
        aRenderingArray - The renderings to set for this resource
        Returns:
        The resource
      • setHomepages

        public ModelContent setHomepages​(Homepage... aHomepageArray)
        Description copied from interface: Resource
        Sets the homepages for this resource.
        Specified by:
        setHomepages in interface Resource<ModelContent>
        Parameters:
        aHomepageArray - The homepages to set for this resource
        Returns:
        The resource
      • setHomepages

        public ModelContent setHomepages​(List<Homepage> aHomepageList)
        Description copied from interface: Resource
        Sets the homepages for this resource.
        Specified by:
        setHomepages in interface Resource<ModelContent>
        Parameters:
        aHomepageList - The homepages to set for this resource
        Returns:
        The resource
      • setThumbnails

        public ModelContent setThumbnails​(ContentResource<?>... aThumbnailArray)
        Description copied from interface: Resource
        Sets the thumbnails for this resource. A thumbnail can be any type of content resource, not just ImageContent.
        Specified by:
        setThumbnails in interface Resource<ModelContent>
        Parameters:
        aThumbnailArray - The thumbnails to set for this resource
        Returns:
        The resource
      • setRights

        public ModelContent setRights​(String aRights)
        Description copied from interface: Resource
        Sets the resource's rights URI from the supplied string.
        Specified by:
        setRights in interface Resource<ModelContent>
        Parameters:
        aRights - A resource's rights URI in string form
        Returns:
        The resource
      • setMetadata

        public ModelContent setMetadata​(Metadata... aMetadataArray)
        Description copied from interface: Resource
        Sets the resource metadata.
        Specified by:
        setMetadata in interface Resource<ModelContent>
        Parameters:
        aMetadataArray - An array of metadata properties
        Returns:
        The resource
      • setLabel

        public ModelContent setLabel​(String aLabel)
        Description copied from interface: Resource
        Sets the resource label from the supplied string.
        Specified by:
        setLabel in interface Resource<ModelContent>
        Parameters:
        aLabel - The string form of the label to set
        Returns:
        The resource
      • getLanguages

        public List<String> getLanguages()
        Gets the content resource's languages.
        Specified by:
        getLanguages in interface Localized<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
      • getMetadata

        public List<Metadata> getMetadata()
        Gets the metadata.
        Returns:
        The metadata
      • 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)
      • getServices

        public List<Service<?>> getServices()
        Gets a list of resource services, initializing the list if this hasn't been done already.
        Returns:
        The resource's services