Class ResourceHeadersAdapter

java.lang.Object
org.fcrepo.persistence.ocfl.impl.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 Details

    • ResourceHeadersAdapter

      Default constructor
    • 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 Details

    • 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

      Specified by:
      getStateToken in interface org.fcrepo.kernel.api.models.ResourceHeaders
    • setStateToken

      public void setStateToken(String stateToken)
      Parameters:
      stateToken - the stateToken to set
    • 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

      Specified by:
      getDigests in interface org.fcrepo.kernel.api.models.ResourceHeaders
    • setDigests

      public void setDigests(Collection<URI> digests)
      Parameters:
      digests - the digests to set
    • 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

      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

      Specified by:
      getLastModifiedDate in interface org.fcrepo.kernel.api.models.ResourceHeaders
    • setLastModifiedDate

      public void setLastModifiedDate(Instant lastModifiedDate)
      Parameters:
      lastModifiedDate - the lastModifiedDate to set
    • 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

      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

      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

      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

      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

      Specified by:
      getStorageRelativePath in interface org.fcrepo.kernel.api.models.ResourceHeaders