Class ResourceHeadersAdapter

  • All Implemented Interfaces:
    org.fcrepo.kernel.api.models.ResourceHeaders

    public class ResourceHeadersAdapter
    extends Object
    implements org.fcrepo.kernel.api.models.ResourceHeaders
    Adapter for converting between different ResourceHeader implementations.
    Author:
    pwinckles
    • Constructor Detail

      • ResourceHeadersAdapter

        public ResourceHeadersAdapter​(org.fcrepo.storage.ocfl.ResourceHeaders storageHeaders)
        Parameters:
        storageHeaders - storage headers to adapt
      • ResourceHeadersAdapter

        public ResourceHeadersAdapter​(org.fcrepo.persistence.common.ResourceHeadersImpl kernelHeaders)
        Parameters:
        kernelHeaders - kernel headers to adapt
    • Method Detail

      • asStorageHeaders

        public org.fcrepo.storage.ocfl.ResourceHeaders asStorageHeaders()
        Returns:
        the headers as storage headers
      • asKernelHeaders

        public org.fcrepo.persistence.common.ResourceHeadersImpl asKernelHeaders()
        Returns:
        the headers as kernel headers
      • getId

        public org.fcrepo.kernel.api.identifiers.FedoraId getId()
        Specified by:
        getId in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setId

        public void setId​(org.fcrepo.kernel.api.identifiers.FedoraId id)
        Parameters:
        id - the fedora id to set
      • getParent

        public org.fcrepo.kernel.api.identifiers.FedoraId getParent()
        Specified by:
        getParent in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setParent

        public void setParent​(org.fcrepo.kernel.api.identifiers.FedoraId parent)
        Parameters:
        parent - the parent to set
      • getArchivalGroupId

        public org.fcrepo.kernel.api.identifiers.FedoraId getArchivalGroupId()
        Specified by:
        getArchivalGroupId in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setArchivalGroupId

        public void setArchivalGroupId​(org.fcrepo.kernel.api.identifiers.FedoraId archivalGroupId)
        Parameters:
        archivalGroupId - the archivalGroupId to set
      • getStateToken

        public String getStateToken()
        Specified by:
        getStateToken in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setStateToken

        public void setStateToken​(String stateToken)
        Parameters:
        stateToken - the stateToken to set
      • getInteractionModel

        public String getInteractionModel()
        Specified by:
        getInteractionModel in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setInteractionModel

        public void setInteractionModel​(String interactionModel)
        Parameters:
        interactionModel - the interactionModel to set
      • getMimeType

        public String getMimeType()
        Specified by:
        getMimeType in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setMimeType

        public void setMimeType​(String mimeType)
        Parameters:
        mimeType - the mimeType to set
      • getFilename

        public String getFilename()
        Specified by:
        getFilename in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setFilename

        public void setFilename​(String filename)
        Parameters:
        filename - the filename to set
      • getContentSize

        public long getContentSize()
        Specified by:
        getContentSize in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setContentSize

        public void setContentSize​(Long contentSize)
        Parameters:
        contentSize - the contentSize to set
      • getDigests

        public Collection<URIgetDigests()
        Specified by:
        getDigests in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • getExternalHandling

        public String getExternalHandling()
        Specified by:
        getExternalHandling in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setExternalHandling

        public void setExternalHandling​(String externalHandling)
        Parameters:
        externalHandling - the externalHandling to set
      • getCreatedDate

        public Instant getCreatedDate()
        Specified by:
        getCreatedDate in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setCreatedDate

        public void setCreatedDate​(Instant createdDate)
        Parameters:
        createdDate - the createdDate to set
      • getCreatedBy

        public String getCreatedBy()
        Specified by:
        getCreatedBy in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setCreatedBy

        public void setCreatedBy​(String createdBy)
        Parameters:
        createdBy - the createdBy to set
      • getLastModifiedDate

        public Instant getLastModifiedDate()
        Specified by:
        getLastModifiedDate in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setLastModifiedDate

        public void setLastModifiedDate​(Instant lastModifiedDate)
        Parameters:
        lastModifiedDate - the lastModifiedDate to set
      • getLastModifiedBy

        public String getLastModifiedBy()
        Specified by:
        getLastModifiedBy in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setLastModifiedBy

        public void setLastModifiedBy​(String lastModifiedBy)
        Parameters:
        lastModifiedBy - the lastModifiedBy to set
      • getMementoCreatedDate

        public Instant getMementoCreatedDate()
        Specified by:
        getMementoCreatedDate in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setMementoCreatedDate

        public void setMementoCreatedDate​(Instant mementoCreatedDate)
        Parameters:
        mementoCreatedDate - the mementoCreatedDate to set
      • setExternalUrl

        public void setExternalUrl​(String externalUrl)
        Parameters:
        externalUrl - the externalUrl to set
      • getExternalUrl

        public String getExternalUrl()
        Specified by:
        getExternalUrl in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setArchivalGroup

        public void setArchivalGroup​(boolean flag)
        Parameters:
        flag - boolean flag
      • isArchivalGroup

        public boolean isArchivalGroup()
        Specified by:
        isArchivalGroup in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setObjectRoot

        public void setObjectRoot​(boolean flag)
        Parameters:
        flag - boolean flag
      • isObjectRoot

        public boolean isObjectRoot()
        Specified by:
        isObjectRoot in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setDeleted

        public void setDeleted​(boolean deleted)
        Set deleted status flag.
        Parameters:
        deleted - true if deleted (a tombstone).
      • isDeleted

        public boolean isDeleted()
        Specified by:
        isDeleted in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • getContentPath

        public String getContentPath()
        Specified by:
        getContentPath in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setContentPath

        public void setContentPath​(String contentPath)
        Sets the path to the content file associated with the header file
        Parameters:
        contentPath - path to content file
      • getHeadersVersion

        public String getHeadersVersion()
        Specified by:
        getHeadersVersion in interface org.fcrepo.kernel.api.models.ResourceHeaders
      • setHeadersVersion

        public void setHeadersVersion​(String headersVersion)
        Parameters:
        headersVersion - the headers version to set
      • getStorageRelativePath

        public String getStorageRelativePath()
        Specified by:
        getStorageRelativePath in interface org.fcrepo.kernel.api.models.ResourceHeaders