Class VersionDetails

java.lang.Object
io.ocfl.api.model.VersionDetails

public class VersionDetails extends Object
Details about a specific version of an object
  • Constructor Details

    • VersionDetails

      public VersionDetails()
  • Method Details

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

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object