Package io.ocfl.api.model
Class OcflObjectVersion
- java.lang.Object
-
- io.ocfl.api.model.OcflObjectVersion
-
public class OcflObjectVersion extends Object
View of a specific version of an OCFL object that allows its files to be lazy-loaded.
-
-
Constructor Summary
Constructors Constructor Description OcflObjectVersion(VersionDetails versionDetails, Map<String,OcflObjectVersionFile> fileMap)
-
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 pathOffsetDateTimegetCreated()The timestamp of when the version was createdOcflObjectVersionFilegetFile(String path)Returns the OcflObjectVersionFile for the file at the given path or null if it does not existCollection<OcflObjectVersionFile>getFiles()Collection of all of the files in this version of the objectStringgetObjectId()The object's idObjectVersionIdgetObjectVersionId()The ObjectId of the versionVersionInfogetVersionInfo()Optional description of the versionVersionNumgetVersionNum()The version numberbooleanisMutable()Returns true only if the version is a mutable HEAD version that is used to stage changes.StringtoString()
-
-
-
Constructor Detail
-
OcflObjectVersion
public OcflObjectVersion(VersionDetails versionDetails, Map<String,OcflObjectVersionFile> fileMap)
-
-
Method Detail
-
getObjectVersionId
public ObjectVersionId getObjectVersionId()
The ObjectId of the version- Returns:
- the ObjectVersionId of the version
-
getObjectId
public String getObjectId()
The object's id- Returns:
- the object's id
-
getVersionNum
public VersionNum getVersionNum()
The version number- Returns:
- the version number
-
getCreated
public OffsetDateTime getCreated()
The timestamp of when the version was created- Returns:
- created timestamp
-
getVersionInfo
public VersionInfo 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
public Collection<OcflObjectVersionFile> 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 OcflObjectVersionFile getFile(String path)
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
-
-