public final class Version extends Object
Version
Union type in FES 2.0.
The union is actually captured as a union inside a single long field.
Modifier and Type | Class and Description |
---|---|
static class |
Version.Action
The VersionAction attribute may also be the strings FIRST, LATEST, PREVIOUS, NEXT and ALL.
|
Constructor and Description |
---|
Version()
The
empty Version constructor. |
Version(Date dateTime) |
Version(Integer index) |
Version(Version.Action action) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Date |
getDateTime()
Version requested as the closest to the provided date.
|
Integer |
getIndex()
Version requested as defined by an index (from 1 through to the latest).
|
Version.Action |
getVersionAction()
Version requested using a predefined constant.
|
int |
hashCode() |
boolean |
isDateTime() |
boolean |
isEmpty() |
boolean |
isIndex()
Version index requested.
|
boolean |
isVersionAction() |
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.
|
static Version |
valueOf(long union) |
public Version()
empty
Version constructor.public Version(Version.Action action)
public Version(Integer index)
index
- a positive integer > 0, representing the 1 based index of the requested feature
in its version history.public Version(Date dateTime)
public static Version valueOf(long union)
public boolean isEmpty()
public boolean isVersionAction()
public long union()
To restore please use new Version( union )
public Version.Action getVersionAction()
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.
public boolean isIndex()
public Integer getIndex()
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.
public boolean isDateTime()
public Date getDateTime()
The version attribute may also be date indicating that the version of the resource closest to the specified date shall be selected.
Copyright © 1996–2019 Geotools. All rights reserved.