Package io.ocfl.api.model
Class VersionDetails
- java.lang.Object
-
- io.ocfl.api.model.VersionDetails
-
public class VersionDetails extends Object
Details about a specific version of an object
-
-
Constructor Summary
Constructors Constructor Description VersionDetails()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsFile(String path)
Returns true if the version contains a file at the specified pathboolean
equals(Object o)
OffsetDateTime
getCreated()
The timestamp of when the version was createdFileDetails
getFile(String path)
Returns the FileDetails for the file at the given path or null if it does not existMap<String,FileDetails>
getFileMap()
Returns a map of logical paths to file details that represents the state of the object at this version.Collection<FileDetails>
getFiles()
Collection of all of the files in this version of the objectString
getObjectId()
The object's idOcflVersion
getObjectOcflVersion()
ObjectVersionId
getObjectVersionId()
The ObjectVersionId of the versionVersionInfo
getVersionInfo()
Description of the versionVersionNum
getVersionNum()
The version number of this versionint
hashCode()
boolean
isMutable()
Returns true only if the version is a mutable HEAD version that is used to stage changes.VersionDetails
setCreated(OffsetDateTime created)
VersionDetails
setFileMap(Map<String,FileDetails> fileMap)
VersionDetails
setMutable(boolean mutable)
VersionDetails
setObjectOcflVersion(OcflVersion objectOcflVersion)
VersionDetails
setObjectVersionId(ObjectVersionId objectVersionId)
VersionDetails
setVersionInfo(VersionInfo versionInfo)
String
toString()
-
-
-
Method Detail
-
getObjectVersionId
public ObjectVersionId getObjectVersionId()
The ObjectVersionId of the version- Returns:
- the ObjectVersionId of the version
-
setObjectVersionId
public VersionDetails setObjectVersionId(ObjectVersionId objectVersionId)
-
getObjectId
public String getObjectId()
The object's id- Returns:
- the object's id
-
getVersionNum
public VersionNum getVersionNum()
The version number of this version- Returns:
- the version number
-
getCreated
public OffsetDateTime getCreated()
The timestamp of when the version was created- Returns:
- created timestamp
-
setCreated
public VersionDetails setCreated(OffsetDateTime created)
-
getVersionInfo
public VersionInfo getVersionInfo()
Description of the version- Returns:
- VersionInfo
-
setVersionInfo
public VersionDetails setVersionInfo(VersionInfo versionInfo)
-
isMutable
public boolean isMutable()
Returns true only if the version is a mutable HEAD version that is used to stage changes.- Returns:
- true if mutable HEAD
-
setMutable
public VersionDetails setMutable(boolean mutable)
-
getObjectOcflVersion
public OcflVersion getObjectOcflVersion()
- Returns:
- the OCFL version the object adheres to
-
setObjectOcflVersion
public VersionDetails setObjectOcflVersion(OcflVersion objectOcflVersion)
-
getFiles
public Collection<FileDetails> getFiles()
Collection of all of the files in this version of the object- Returns:
- all of the files in the version
-
containsFile
public boolean containsFile(String path)
Returns true if the version contains a file at the specified path- Parameters:
path
- logical path to an object file- Returns:
- true if the version contains the file
-
getFile
public FileDetails getFile(String path)
Returns the FileDetails for the file at the given path or null if it does not exist- Parameters:
path
- logical path to the file- Returns:
- FileDetails or null
-
setFileMap
public VersionDetails setFileMap(Map<String,FileDetails> fileMap)
-
getFileMap
public Map<String,FileDetails> getFileMap()
Returns a map of logical paths to file details that represents the state of the object at this version.- Returns:
- file state map
-
-