Class Version

  • public final class Version
    extends Object
    Union type class for the Version Union type in FES 2.0.

    The union is actually captured as a union inside a single long field.

    • Constructor Detail

      • Version

        public Version()
        The empty Version constructor.
      • Version

        public Version​(Integer index)
        index - a positive integer > 0, representing the 1 based index of the requested feature in its version history.
      • Version

        public Version​(Date dateTime)
    • Method Detail

      • valueOf

        public static Version valueOf​(long union)
      • isEmpty

        public boolean isEmpty()
      • isVersionAction

        public boolean isVersionAction()
      • union

        public long union()
        Access to the union memento; this may be stored as an encoding of the Version in memory sensitive settings where the over head of an object is not desired.

        To restore please use new Version( union )

        memento holding the contents of a Version object
      • getVersionAction

        public Version.Action getVersionAction()
        Version requested using a predefined constant.

        The versionAction attribute may also be the strings FIRST, LATEST, PREVIOUS, NEXT and ALL. The token FIRST shall select the first version of a resource. The token LATEST shall select the most recent version of a resource. The PREVIOUS and NEXT tokens shall select the previous or next version of a resource relative to the version specified using the rid attribute. The token ALL shall select all available version of a resource.

        Version requested using a predefined constant.
      • isIndex

        public boolean isIndex()
        Version index requested.
        true if the Version is supplied by an index
      • getIndex

        public Integer getIndex()
        Version requested as defined by an index (from 1 through to the latest).

        The version attribute may be an integer N indicating that the Nth version of the resource shall be selected. The first version of a resource shall be numbered 1. If N exceeds the number of versions available, the latest version of the resource shall be selected.

        index of version requested (from 1 through to the latest)
      • isDateTime

        public boolean isDateTime()
      • getDateTime

        public Date getDateTime()
        Version requested as the closest to the provided date.

        The version attribute may also be date indicating that the version of the resource closest to the specified date shall be selected.

        date of version requested
      • hashCode

        public int hashCode()
        hashCode in class Object