Class Version

java.lang.Object
io.ocfl.core.model.Version

public class Version extends Object
OCFL version object. A Version describes the state of an object at a particular point in time. Versions are immutable.
See Also:
  • Constructor Details

  • Method Details

    • builder

      public static VersionBuilder builder()
    • builder

      public static VersionBuilder builder(Version original)
    • getCreated

      public OffsetDateTime getCreated()
      Returns:
      the timestamp when this version of the object was created.
    • getMessage

      public String getMessage()
      Returns:
      a human readable message describing the version.
    • getUser

      public User getUser()
      Returns:
      the person who created this version of the object.
    • getState

      public Map<String,Set<String>> getState()
      A map of all of the files that are part of this version of the object. The map is keyed on file digest ids, and the values are paths that describe where the file is located in this specific version.
      Returns:
      version state
    • getFileId

      public String getFileId(String path)
      Returns the file id associated to the given logical path.
      Parameters:
      path - logical path
      Returns:
      associated file id
    • getPaths

      public Set<String> getPaths(String fileId)
      Returns the logical paths associated with the given file id
      Parameters:
      fileId - file id
      Returns:
      associated logical paths
    • 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