org.opengis.filter.identity
Class Version

Object
  extended by 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.


Nested Class Summary
static class Version.Action
          The VersionAction attribute may also be the strings FIRST, LATEST, PREVIOUS, NEXT and ALL.
 
Constructor Summary
Version()
          The empty Version constructor.
Version(Date dateTime)
           
Version(Integer index)
           
Version(Version.Action action)
           
 
Method Summary
 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)
           
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Version

public Version()
The empty Version constructor.


Version

public Version(Version.Action action)

Version

public Version(Integer index)
Parameters:
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 )

Returns:
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.

Returns:
Version requested using a predefined constant.

isIndex

public boolean isIndex()
Version index requested.

Returns:
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.

Returns:
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.

Returns:
date of version requested

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 1996-2014 Geotools. All Rights Reserved.