Class 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:
    VersionBuilder
    • Constructor Detail

      • Version

        public Version​(OffsetDateTime created,
                       String message,
                       User user,
                       Map<String,​Set<String>> state)
        Parameters:
        created - timestamp the version was created
        message - version message
        user - user who created the version
        state - version state
        See Also:
        VersionBuilder
    • Method Detail

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

        public int hashCode()
        Overrides:
        hashCode in class Object