Package edu.wisc.library.ocfl.api.model
Class VersionDetails
- java.lang.Object
-
- edu.wisc.library.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 booleancontainsFile(String path)Returns true if the version contains a file at the specified pathbooleanequals(Object o)OffsetDateTimegetCreated()The timestamp of when the version was createdFileDetailsgetFile(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 objectStringgetObjectId()The object's idObjectVersionIdgetObjectVersionId()The ObjectVersionId of the versionVersionInfogetVersionInfo()Description of the versionVersionNumgetVersionNum()The version number of this versioninthashCode()booleanisMutable()Returns true only if the version is a mutable HEAD version that is used to stage changes.VersionDetailssetCreated(OffsetDateTime created)VersionDetailssetFileMap(Map<String,FileDetails> fileMap)VersionDetailssetMutable(boolean mutable)VersionDetailssetObjectVersionId(ObjectVersionId objectVersionId)VersionDetailssetVersionInfo(VersionInfo versionInfo)StringtoString()
-
-
-
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)
-
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
-
-