Time series data is stored and retrieved using "TimeSeriesContainers. TimeSeriesContainers are database independent and are implemented to store or retrieve data from the CWMS Oracle database or HEC-DSS without any modifications. You can provide a TimeSeriesContainers to an HEC graphing or table or math object, and that object knows how to operate with it.
The primary components of a TimeSeriesContainer are:
- The dataset full name (pathname or Time Series ID)
- Start date / time and end date / time
- Data, the "values" array
- The time array, if the data is irregular-interval or random reporting
- Data quality array
A time series pathname has the following 6 parts:
- Group or Basin
- Location
- Parameter
- Block start date (determined by DSS)
- Time interval (restricted to only those supported)
- Version (user definable)
The D (date) part is generated by the DSS software according to the start date and end date, and the E (time interval) part is restricted to the allowed intervals. Generally, the pathname is formed using the class "DSSPathname", and the E part is obtained from HecTimeSeries getEPartFromInterval (int intervalMins).
Reading and writing data from a DSS file is done using the HecTimeSeries class and passing the TimeSereisContainer as an argument.
Do not reuse TimeSeriesContainer or HecTimeSeries objects, but create a new object for every read or write. Time series containers should not be re-used given that the class is mutable and has public access to the variables without encapsulation through accessor methods.. If you do re-use time series containers it is up to you to implement controls on modification, change notification, and multi-threaded synchronization as the class does not provide for this.