edu.unh.sdb.datasource
Class TimeSeries

java.lang.Object
  extended by edu.unh.sdb.datasource.TimeSeries

public class TimeSeries
extends java.lang.Object

This class encapsulates time series data without imposing a particular data access interface on the series itself. It is primarily intended to support the TimeSeriesDataSource, but we thought there might be some advantage to provide a class to manage the members of the series without imposing the DataSource interface onto the manager. For now, we'll try to define the series as a series of DataCollections.

Author:
rdb ---------------------------- Edit history ---------------------------- 11/30/05 rdb: Fixed shared FDLDescriptor problem. Series DS no longer share FDLD 10/21/05 rdb: added getName() 06/01/05 rdb: Working version done 05/30/05 rdb: created

Constructor Summary
TimeSeries(java.lang.String name, DataCollection[] elements)
          Create a time series from an array of DataCollections
TimeSeries(java.lang.String name, DataCollection[] elements, float[] times)
          Create a time series from an array of DataCollections and a time mapping
TimeSeries(java.lang.String name, java.lang.String xfdlFile)
          Create a time series of DataSources from an xfdlFile.
 
Method Summary
 void deactivate()
          Close time series; deactivate all steps
 java.lang.String getName()
          return time series name
 int getNumSteps()
          return number of steps in time series
 DataCollection getStep(int i)
          Return an element in the series based on ordinal position
 float getTime(int i)
          Return the real time for an element in the series based on ordinal position
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeSeries

public TimeSeries(java.lang.String name,
                  java.lang.String xfdlFile)
Create a time series of DataSources from an xfdlFile.


TimeSeries

public TimeSeries(java.lang.String name,
                  DataCollection[] elements)
Create a time series from an array of DataCollections


TimeSeries

public TimeSeries(java.lang.String name,
                  DataCollection[] elements,
                  float[] times)
Create a time series from an array of DataCollections and a time mapping

Method Detail

getName

public java.lang.String getName()
return time series name


getNumSteps

public int getNumSteps()
return number of steps in time series


getStep

public DataCollection getStep(int i)
Return an element in the series based on ordinal position


getTime

public float getTime(int i)
Return the real time for an element in the series based on ordinal position


deactivate

public void deactivate()
Close time series; deactivate all steps


main

public static void main(java.lang.String[] args)