anl.aida.data
Class DataFrameTimeAxis

java.lang.Object
  extended by anl.aida.data.AxisRange
      extended by anl.aida.data.DataFrameAxis
          extended by anl.aida.data.DataFrameTimeAxis
All Implemented Interfaces:
CoordAxis, TimeCoordAxis

public class DataFrameTimeAxis
extends DataFrameAxis
implements TimeCoordAxis

Time axis for a DataFrame.

Version:
$Revision$ $Date$

Field Summary
 
Fields inherited from class anl.aida.data.AxisRange
axis, range
 
Constructor Summary
DataFrameTimeAxis(DataFrameTimeAxis axis, int index)
          Creates a DataFrameAxis from the specified axis and index.
DataFrameTimeAxis(TimeCoordAxis axis, int index)
          Creates a DataFrameAxis for the specified axis with origin and extent equal to that of the axis.
DataFrameTimeAxis(TimeCoordAxis axis, int origin, int extent, int index)
          Creates a DataFrameAxis for the specified axis with the specified origin and extent.
 
Method Summary
 java.util.Date getDate(int timestep)
          Returns the Date for the specified timestep, or null if the timestep is invalid.
 int getTimeStep(java.util.Date date)
          Gets the timestep that corresponds to the specified date.
 
Methods inherited from class anl.aida.data.DataFrameAxis
createDataFrameAxis, createDataFrameAxis, createDataFrameAxis, getArrayIndex
 
Methods inherited from class anl.aida.data.AxisRange
getAttribute, getAxis, getAxisType, getDescription, getExtent, getName, getOrigin, getRange, getUnits, getValue, getValueAsString, isCompatible
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface anl.aida.data.CoordAxis
getAttribute, getAxisType, getDescription, getName, getRange, getUnits, getValue, getValueAsString, isCompatible
 

Constructor Detail

DataFrameTimeAxis

public DataFrameTimeAxis(TimeCoordAxis axis,
                         int index)
Creates a DataFrameAxis for the specified axis with origin and extent equal to that of the axis.

Parameters:
axis - the axis
index - the array index of this axis

DataFrameTimeAxis

public DataFrameTimeAxis(TimeCoordAxis axis,
                         int origin,
                         int extent,
                         int index)
Creates a DataFrameAxis for the specified axis with the specified origin and extent.

Parameters:
origin - the origin of the range
extent - the extent of the range
axis - the axis
index - the array index of this axis

DataFrameTimeAxis

public DataFrameTimeAxis(DataFrameTimeAxis axis,
                         int index)
Creates a DataFrameAxis from the specified axis and index. This DataFrameAxis will have the same origin and extent as the specified axis.

Parameters:
axis - the axis to create this DataFrameAxis from
index - the array index of this axis
Method Detail

getDate

public java.util.Date getDate(int timestep)
Returns the Date for the specified timestep, or null if the timestep is invalid.

Specified by:
getDate in interface TimeCoordAxis
Parameters:
timestep - the time step we want the date for.
Returns:
the Date for the specified timestep

getTimeStep

public int getTimeStep(java.util.Date date)
Gets the timestep that corresponds to the specified date. If no such timestep is found then return Axes.TIME_STEP_NOT_FOUND.

Specified by:
getTimeStep in interface TimeCoordAxis
Parameters:
date - the date whose time step we want
Returns:
the timestep that corresponds to the specified date. If no such timestep is found then return Axes.TIME_STEP_NOT_FOUND.