Package org.fcrepo.persistence.common
Class ResourceHeadersImpl
- java.lang.Object
-
- org.fcrepo.persistence.common.ResourceHeadersImpl
-
- All Implemented Interfaces:
ResourceHeaders
public class ResourceHeadersImpl extends Object implements ResourceHeaders
Common implementation of resource headers- Author:
- bbpennel
-
-
Field Summary
-
Fields inherited from interface org.fcrepo.kernel.api.models.ResourceHeaders
V1_0
-
-
Constructor Summary
Constructors Constructor Description ResourceHeadersImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FedoraIdgetArchivalGroupId()Get the identifier of the archival group resource that contains this resource, or null if the resource is not an archival part resourceStringgetContentPath()Returns the path to the content file the resource headers are associated withlonggetContentSize()Get the size in bytes of the content of this resource.StringgetCreatedBy()Get the created by for the resourceInstantgetCreatedDate()Get the date this resource was createdCollection<URI>getDigests()Get the list of all digest URIs recorded for this resourceStringgetExternalHandling()Get the handling type for external content associated with this resource.StringgetExternalUrl()Get the url of external content associated with this resource.StringgetFilename()Get the filename for the content of this resourceStringgetHeadersVersion()FedoraIdgetId()Get the identifier for the described resource.StringgetInteractionModel()Get the interaction model for the resourceStringgetLastModifiedBy()Get the last modified by value for the resourceInstantgetLastModifiedDate()Get the date this resource was last modifiedInstantgetMementoCreatedDate()Get the date a memento for this resource was created.StringgetMimeType()Get the mimetype describing the content contained by this resourceFedoraIdgetParent()Get the identifier of the parent of the resourceStringgetStateToken()Get the State Token value for the resource.booleanisArchivalGroup()Determine whether a resource is an Archival GroupbooleanisDeleted()Determine if the resource is now a tombstone.booleanisObjectRoot()Determine whether a resource is the object rootvoidsetArchivalGroup(boolean flag)voidsetArchivalGroupId(FedoraId archivalGroupId)voidsetContentPath(String contentPath)Sets the path to the content file associated with the header filevoidsetContentSize(long contentSize)voidsetCreatedBy(String createdBy)voidsetCreatedDate(Instant createdDate)voidsetDeleted(boolean deleted)Set deleted status flag.voidsetDigests(Collection<URI> digests)voidsetExternalHandling(String externalHandling)voidsetExternalUrl(String externalUrl)voidsetFilename(String filename)voidsetHeadersVersion(String headersVersion)voidsetId(FedoraId id)voidsetInteractionModel(String interactionModel)voidsetLastModifiedBy(String lastModifiedby)voidsetLastModifiedDate(Instant lastModifiedDate)voidsetMementoCreatedDate(Instant mementoCreatedDate)voidsetMimeType(String mimeType)voidsetObjectRoot(boolean flag)voidsetParent(FedoraId parent)voidsetStateToken(String stateToken)StringtoString()
-
-
-
Constructor Detail
-
ResourceHeadersImpl
public ResourceHeadersImpl()
-
-
Method Detail
-
getId
public FedoraId getId()
Description copied from interface:ResourceHeadersGet the identifier for the described resource.- Specified by:
getIdin interfaceResourceHeaders- Returns:
- identifier for the resource.
-
getParent
public FedoraId getParent()
Description copied from interface:ResourceHeadersGet the identifier of the parent of the resource- Specified by:
getParentin interfaceResourceHeaders- Returns:
- identifier of the parent
-
getArchivalGroupId
public FedoraId getArchivalGroupId()
Description copied from interface:ResourceHeadersGet the identifier of the archival group resource that contains this resource, or null if the resource is not an archival part resource- Specified by:
getArchivalGroupIdin interfaceResourceHeaders- Returns:
- identifier of the containing archival group resource or null
-
setArchivalGroupId
public void setArchivalGroupId(FedoraId archivalGroupId)
- Parameters:
archivalGroupId- the archivalGroupId to set
-
getStateToken
public String getStateToken()
Description copied from interface:ResourceHeadersGet the State Token value for the resource.- Specified by:
getStateTokenin interfaceResourceHeaders- Returns:
- state-token value
-
setStateToken
public void setStateToken(String stateToken)
- Parameters:
stateToken- the stateToken to set
-
getInteractionModel
public String getInteractionModel()
Description copied from interface:ResourceHeadersGet the interaction model for the resource- Specified by:
getInteractionModelin interfaceResourceHeaders- Returns:
- interaction model URI
-
setInteractionModel
public void setInteractionModel(String interactionModel)
- Parameters:
interactionModel- the interactionModel to set
-
getMimeType
public String getMimeType()
Description copied from interface:ResourceHeadersGet the mimetype describing the content contained by this resource- Specified by:
getMimeTypein interfaceResourceHeaders- Returns:
- mimetype
-
setMimeType
public void setMimeType(String mimeType)
- Parameters:
mimeType- the mimeType to set
-
getFilename
public String getFilename()
Description copied from interface:ResourceHeadersGet the filename for the content of this resource- Specified by:
getFilenamein interfaceResourceHeaders- Returns:
- filename
-
setFilename
public void setFilename(String filename)
- Parameters:
filename- the filename to set
-
getContentSize
public long getContentSize()
Description copied from interface:ResourceHeadersGet the size in bytes of the content of this resource. May be -1 if the size is unknown or there is no content.- Specified by:
getContentSizein interfaceResourceHeaders- Returns:
- size
-
setContentSize
public void setContentSize(long contentSize)
- Parameters:
contentSize- the contentSize to set
-
getDigests
public Collection<URI> getDigests()
Description copied from interface:ResourceHeadersGet the list of all digest URIs recorded for this resource- Specified by:
getDigestsin interfaceResourceHeaders- Returns:
- digest URIs
-
setDigests
public void setDigests(Collection<URI> digests)
- Parameters:
digests- the digests to set
-
getExternalHandling
public String getExternalHandling()
Description copied from interface:ResourceHeadersGet the handling type for external content associated with this resource.- Specified by:
getExternalHandlingin interfaceResourceHeaders- Returns:
- external handling value
-
setExternalHandling
public void setExternalHandling(String externalHandling)
- Parameters:
externalHandling- the externalHandling to set
-
getCreatedDate
public Instant getCreatedDate()
Description copied from interface:ResourceHeadersGet the date this resource was created- Specified by:
getCreatedDatein interfaceResourceHeaders- Returns:
- created date
-
setCreatedDate
public void setCreatedDate(Instant createdDate)
- Parameters:
createdDate- the createdDate to set
-
getCreatedBy
public String getCreatedBy()
Description copied from interface:ResourceHeadersGet the created by for the resource- Specified by:
getCreatedByin interfaceResourceHeaders- Returns:
- created by
-
setCreatedBy
public void setCreatedBy(String createdBy)
- Parameters:
createdBy- the createdBy to set
-
getLastModifiedDate
public Instant getLastModifiedDate()
Description copied from interface:ResourceHeadersGet the date this resource was last modified- Specified by:
getLastModifiedDatein interfaceResourceHeaders- Returns:
- last modified date
-
setLastModifiedDate
public void setLastModifiedDate(Instant lastModifiedDate)
- Parameters:
lastModifiedDate- the lastModifiedDate to set
-
getLastModifiedBy
public String getLastModifiedBy()
Description copied from interface:ResourceHeadersGet the last modified by value for the resource- Specified by:
getLastModifiedByin interfaceResourceHeaders- Returns:
- last modified by
-
setLastModifiedBy
public void setLastModifiedBy(String lastModifiedby)
- Parameters:
lastModifiedby- the lastModifiedby to set
-
getMementoCreatedDate
public Instant getMementoCreatedDate()
Description copied from interface:ResourceHeadersGet the date a memento for this resource was created. This field should generally be kept in sync with the last modified date, but they may not be the same, in the case that a memento was created as a result of an update to a different resource. Additionally, this date is NOT the same as the actual memento timestamp, which is determined by the timestamp on the OCFL version.- Specified by:
getMementoCreatedDatein interfaceResourceHeaders- Returns:
- memento created date
-
setMementoCreatedDate
public void setMementoCreatedDate(Instant mementoCreatedDate)
- Parameters:
mementoCreatedDate- the mementoCreateDate to set
-
setExternalUrl
public void setExternalUrl(String externalUrl)
- Parameters:
externalUrl- the externalUrl to set
-
getExternalUrl
public String getExternalUrl()
Description copied from interface:ResourceHeadersGet the url of external content associated with this resource.- Specified by:
getExternalUrlin interfaceResourceHeaders- Returns:
- external url
-
setArchivalGroup
public void setArchivalGroup(boolean flag)
- Parameters:
flag- boolean flag
-
isArchivalGroup
public boolean isArchivalGroup()
Description copied from interface:ResourceHeadersDetermine whether a resource is an Archival Group- Specified by:
isArchivalGroupin interfaceResourceHeaders- Returns:
- Archival Group status
-
setObjectRoot
public void setObjectRoot(boolean flag)
- Parameters:
flag- boolean flag
-
isObjectRoot
public boolean isObjectRoot()
Description copied from interface:ResourceHeadersDetermine whether a resource is the object root- Specified by:
isObjectRootin interfaceResourceHeaders- Returns:
- true if the resource is at the root of a persistence object
-
setDeleted
public void setDeleted(boolean deleted)
Set deleted status flag.- Parameters:
deleted- true if deleted (a tombstone).
-
isDeleted
public boolean isDeleted()
Determine if the resource is now a tombstone.- Specified by:
isDeletedin interfaceResourceHeaders- Returns:
- Deleted status.
-
getContentPath
public String getContentPath()
Returns the path to the content file the resource headers are associated with- Specified by:
getContentPathin interfaceResourceHeaders- Returns:
- path the content file
-
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:
getHeadersVersionin interfaceResourceHeaders- Returns:
- the header version
-
setHeadersVersion
public void setHeadersVersion(String headersVersion)
- Parameters:
headersVersion- the headers version
-
-