org.deegree_impl.model.cs
Class TemporalCoordinateSystem

java.lang.Object
  extended byorg.deegree_impl.model.cs.Info
      extended byorg.deegree_impl.model.cs.CoordinateSystem
          extended byorg.deegree_impl.model.cs.TemporalCoordinateSystem
All Implemented Interfaces:
Dimensioned, java.io.Serializable

public class TemporalCoordinateSystem
extends CoordinateSystem

A one-dimensional coordinate system suitable for time measurements.

Version:
1.0
Author:
Martin Desruisseaux
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class org.deegree_impl.model.cs.CoordinateSystem
CoordinateSystem.Export
 
Nested classes inherited from class org.deegree_impl.model.cs.Info
Info.AngularUnit, Info.LinearUnit
 
Field Summary
private  AxisInfo axis
          Axis details for time dimension within coordinate system.
private  TemporalDatum datum
          The temporal datum.
private  long epoch
          The epoch, in milliseconds since January 1, 1970, 00:00:00 UTC.
private static long serialVersionUID
          Serial number for interoperability with different versions.
private  Unit unit
          Units used along the time axis.
 
Fields inherited from class org.deegree_impl.model.cs.Info
pool
 
Constructor Summary
(package private) TemporalCoordinateSystem(java.util.Map properties, TemporalDatum datum, Unit unit, java.util.Date epoch, AxisInfo axis)
          Creates a temporal coordinate system from a datum and time units.
  TemporalCoordinateSystem(java.lang.String name, java.util.Date epoch)
          Creates a temporal coordinate system.
  TemporalCoordinateSystem(java.lang.String name, TemporalDatum datum, Unit unit, java.util.Date epoch, AxisInfo axis)
          Creates a temporal coordinate system from a datum and time units.
 
Method Summary
(package private)  java.lang.String addString(java.lang.StringBuffer buffer)
          Fill the part inside "[...]".
 boolean equivalents(CoordinateSystem cs)
          Returns true if this coordinate system is equivalents to the specified coordinate system.
 AxisInfo getAxis(int dimension)
          Gets axis details for temporal dimension within coordinate system.
(package private)  Datum getDatum()
          Override CoordinateSystem.getDatum().
 int getDimension()
          Returns the dimension of this coordinate system, which is 1.
 java.util.Date getEpoch()
          Returns the epoch.
 TemporalDatum getTemporalDatum()
          Gets the temporal datum, which indicates the measurement method.
 Unit getUnits(int dimension)
          Gets units for dimension within coordinate system.
 
Methods inherited from class org.deegree_impl.model.cs.CoordinateSystem
checkAxis, equals, getDefaultEnvelope, getUnits, toOpenGIS
 
Methods inherited from class org.deegree_impl.model.cs.Info
addUnit, cachedOpenGIS, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, getAbbreviation, getAlias, getAuthority, getAuthorityCode, getName, getRemarks, hashCode, readResolve, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial number for interoperability with different versions.

See Also:
Constant Field Values

datum

private final TemporalDatum datum
The temporal datum.


axis

private final AxisInfo axis
Axis details for time dimension within coordinate system.


unit

private final Unit unit
Units used along the time axis.


epoch

private final long epoch
The epoch, in milliseconds since January 1, 1970, 00:00:00 UTC.

Constructor Detail

TemporalCoordinateSystem

public TemporalCoordinateSystem(java.lang.String name,
                                java.util.Date epoch)
Creates a temporal coordinate system. Datum is UTC, units are days and values are increasing toward future.

Parameters:
name - Name to give new object.
epoch - The epoch (i.e. date of origin).

TemporalCoordinateSystem

public TemporalCoordinateSystem(java.lang.String name,
                                TemporalDatum datum,
                                Unit unit,
                                java.util.Date epoch,
                                AxisInfo axis)
Creates a temporal coordinate system from a datum and time units.

Parameters:
name - Name to give new object.
datum - Datum to use for new coordinate system.
unit - Units to use for new coordinate system.
epoch - The epoch (i.e. date of origin).
axis - Axis to use for new coordinate system.

TemporalCoordinateSystem

TemporalCoordinateSystem(java.util.Map properties,
                         TemporalDatum datum,
                         Unit unit,
                         java.util.Date epoch,
                         AxisInfo axis)
Creates a temporal coordinate system from a datum and time units.

Parameters:
properties - The set of properties (see Info).
datum - Datum to use for new coordinate system.
unit - Units to use for new coordinate system.
epoch - The epoch (i.e. date of origin).
axis - Axis to use for new coordinate system.
Method Detail

getDimension

public final int getDimension()
Returns the dimension of this coordinate system, which is 1.

Specified by:
getDimension in interface Dimensioned
Specified by:
getDimension in class CoordinateSystem
See Also:
CS_CoordinateSystem.getDimension()

getDatum

final Datum getDatum()
Override CoordinateSystem.getDatum().

Overrides:
getDatum in class CoordinateSystem

getTemporalDatum

public TemporalDatum getTemporalDatum()
Gets the temporal datum, which indicates the measurement method.


getEpoch

public java.util.Date getEpoch()
Returns the epoch. The epoch is the origin of the time axis, i.e. the date for value zero.


getAxis

public AxisInfo getAxis(int dimension)
Gets axis details for temporal dimension within coordinate system. A temporal coordinate system have only one axis, always at index 0.

Specified by:
getAxis in class CoordinateSystem
Parameters:
dimension - Zero based index of axis.
See Also:
CS_CoordinateSystem.getAxis(int)

getUnits

public Unit getUnits(int dimension)
Gets units for dimension within coordinate system. A temporal coordinate system have only one unit, always at index 0.

Specified by:
getUnits in class CoordinateSystem
Parameters:
dimension - Must be 0.
See Also:
CS_CoordinateSystem.getUnits(int)

equivalents

public boolean equivalents(CoordinateSystem cs)
Returns true if this coordinate system is equivalents to the specified coordinate system. Two coordinate systems are considered equivalent if the CoordinateTransformation from this to cs would be the identity transform. The default implementation compare datum, units and axis, but ignore name, alias and other meta-data informations.

Overrides:
equivalents in class CoordinateSystem
Parameters:
cs - The coordinate system (may be null).
Returns:
true if both coordinate systems are equivalent.

addString

java.lang.String addString(java.lang.StringBuffer buffer)
Fill the part inside "[...]". Used for formatting Well Know Text (WKT).

Overrides:
addString in class Info
Parameters:
buffer - The buffer to add string to.
Returns:
The WKT code name (e.g. "GEOGCS").