Package io.ocfl.api.model
Class OcflObjectVersion
java.lang.Object
io.ocfl.api.model.OcflObjectVersion
View of a specific version of an OCFL object that allows its files to be lazy-loaded.
-
Constructor Summary
ConstructorsConstructorDescriptionOcflObjectVersion
(VersionDetails versionDetails, Map<String, OcflObjectVersionFile> fileMap) -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsFile
(String path) Returns true if the version contains a file at the specified pathThe timestamp of when the version was createdReturns the OcflObjectVersionFile for the file at the given path or null if it does not existgetFiles()
Collection of all of the files in this version of the objectThe object's idThe ObjectId of the versionOptional description of the versionThe version numberboolean
Returns true only if the version is a mutable HEAD version that is used to stage changes.toString()
-
Constructor Details
-
OcflObjectVersion
-
-
Method Details
-
getObjectVersionId
The ObjectId of the version- Returns:
- the ObjectVersionId of the version
-
getObjectId
The object's id- Returns:
- the object's id
-
getVersionNum
The version number- Returns:
- the version number
-
getCreated
The timestamp of when the version was created- Returns:
- created timestamp
-
getVersionInfo
Optional description of the version- Returns:
- VersionInfo or null
-
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
-
getFiles
Collection of all of the files in this version of the object- Returns:
- all of the files in the version
-
containsFile
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
Returns the OcflObjectVersionFile for the file at the given path or null if it does not exist- Parameters:
path
- logical path to the file- Returns:
- OcflObjectVersionFile or null if it does not exist
-
toString
-