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 Details

  • Method Details

    • 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
    • toString

      public String toString()
      Overrides:
      toString in class Object