te::st::TimeSeriesDataSet Class Reference

A class to represent a time series data set. More...

#include <TimeSeriesDataSet.h>

Inheritance diagram for te::st::TimeSeriesDataSet:

Public Member Functions

std::string getId () const
 It returns the identifier associated to the time series. More...
 
ObservationDataSetgetObservationSet () const
 It returns the data set that contains the time series observations. More...
 
const te::dt::DateTimePeriodgetTemporalExtent () const
 It returns the temporal extent of the time series observations. More...
 
std::auto_ptr< TimeSeriesgetTimeSeries (te::st::AbstractTimeSeriesInterp *interp)
 It returns the time series from the DataSet. More...
 
std::auto_ptr< TimeSeriesgetTimeSeries (const std::string &propName, te::st::AbstractTimeSeriesInterp *interp)
 It returns the time series from the DataSet. More...
 
void getTimeSeriesSet (te::st::AbstractTimeSeriesInterp *interp, const std::string &vPropName, std::vector< te::st::TimeSeries * > &result)
 It returns all time series from the DataSet. More...
 
const std::vector< std::string > & getValuePropNames () const
 It returns the indexes of the DataSet properties that contains the values associated to the time series. More...
 
void setId (const std::string &id)
 It sets the identifier associated to the time series. More...
 
void setValuePropNames (const std::vector< std::string > &n)
 It sets the names of the DataSet properties that contains the values associated to the time series. More...
 
std::size_t size () const
 It returns the size of the time series observation set. More...
 
 TimeSeriesDataSet (te::da::DataSet *ds, const ObservationDataSetType &type, const std::vector< std::string > &propNames)
 Constructor. More...
 
 TimeSeriesDataSet (te::da::DataSet *ds, const ObservationDataSetType &type, const std::vector< std::string > &propNames, const std::string &id)
 Constructor. More...
 
 TimeSeriesDataSet (ObservationDataSet *obs, const std::vector< std::string > &propNames, const std::string &id)
 Constructor. More...
 
virtual ~TimeSeriesDataSet ()
 It returns the trajectory geometry property. More...
 
Methods to traverse the trajectory observations and to check the

internal cursor pointer

bool moveNext ()
 
bool movePrevious ()
 
bool moveFirst ()
 
bool moveBeforeFirst ()
 
bool moveLast ()
 
bool isAtBegin () const
 
bool isBeforeBegin () const
 
bool isAtEnd () const
 
bool isAfterEnd () const
 
Methods to get values pointed by the internal cursor.
std::auto_ptr< te::dt::DateTimegetTime () const
 It returns the time pointed by the internal cursor. More...
 
std::auto_ptr< te::dt::AbstractDatagetValue (std::size_t idx) const
 It returns the idx-th observed value pointed by the internal cursor. More...
 
std::auto_ptr< te::dt::AbstractDatagetValue () const
 It returns the observed value pointed by the internal cursor. More...
 
double getDouble (std::size_t idx) const
 It returns the idx-th observed value as double pointed by the internal cursor. More...
 
double getDouble () const
 It returns the observed value as double pointed by the internal cursor. More...
 
int getInt (std::size_t idx) const
 It returns the idx-th observed value as integer pointed by the internal cursor. More...
 
int getInt () const
 It returns the observed value as double pointed by the internal cursor. More...
 
std::auto_ptr< te::gm::GeometrygetGeometry () const
 It returns the geometry pointed by the internal cursor. More...
 

Protected Member Functions

std::auto_ptr< te::da::DataSetrelease ()
 It releases all internal pointers, returning its internal DataSet and invalidating itself. More...
 

Private Attributes

std::string m_id
 The time series identification. More...
 
std::auto_ptr< ObservationDataSetm_obsDs
 The data set that contains the trajectory observations. More...
 
std::vector< std::string > m_vlPropNames
 The names of the properties that contain the time series values. More...
 

Friends

class TimeSeriesDataSetLayer
 

Detailed Description

A class to represent a time series data set.

This class represents a view on a DataSet that contains observations of time series. A time series represents the variation of the values of a property over time.

A TimeSeriesDataSet can contain one or more properties observed over time.

See also
ObservationDataSet ObservationDatasSetType TimeSeriesDataSetType

Definition at line 69 of file TimeSeriesDataSet.h.

Constructor & Destructor Documentation

te::st::TimeSeriesDataSet::TimeSeriesDataSet ( te::da::DataSet ds,
const ObservationDataSetType type,
const std::vector< std::string > &  propNames 
)

Constructor.

Parameters
dsThe data set that contains the time series observations.
typeThe observation data set type.
propNamesThe names of the properties that contains the time series values
Note
It will take the ownership of the input pointer.
te::st::TimeSeriesDataSet::TimeSeriesDataSet ( te::da::DataSet ds,
const ObservationDataSetType type,
const std::vector< std::string > &  propNames,
const std::string &  id 
)

Constructor.

Parameters
dsThe data set that contains the time series observations.
typeThe observation data set type.
propNamesThe names of the properties that contains the time series values
idThe time series id
Note
It will take the ownership of the input pointer.
te::st::TimeSeriesDataSet::TimeSeriesDataSet ( ObservationDataSet obs,
const std::vector< std::string > &  propNames,
const std::string &  id 
)

Constructor.

Parameters
obsThe data set that contains the time series observations.
propNamesThe names of the properties that contains the time series values
idThe time series id
Note
It will take the ownership of the given pointer.
virtual te::st::TimeSeriesDataSet::~TimeSeriesDataSet ( )
virtual

It returns the trajectory geometry property.

Returns
The trajectory geometry property.
Note
The caller will NOT take the ownership of the returned pointer.

It returns the trajectory datetime property.

Returns
The trajectory datetime property.
Note
The caller will NOT take the ownership of the returned pointer.

Virtual destructor.

Member Function Documentation

double te::st::TimeSeriesDataSet::getDouble ( std::size_t  idx) const

It returns the idx-th observed value as double pointed by the internal cursor.

Returns
A pointer to the idx-th observed value as double pointed by the internal cursor.
double te::st::TimeSeriesDataSet::getDouble ( ) const

It returns the observed value as double pointed by the internal cursor.

Returns
A pointer to the observed value as double pointed by the internal cursor.
std::auto_ptr<te::gm::Geometry> te::st::TimeSeriesDataSet::getGeometry ( ) const

It returns the geometry pointed by the internal cursor.

Returns
A pointer to the geometry pointed by the internal cursor.
Note
The caller will take the ownership of the returned pointer.
std::string te::st::TimeSeriesDataSet::getId ( ) const

It returns the identifier associated to the time series.

Returns
The identifier associated to the time series.
int te::st::TimeSeriesDataSet::getInt ( std::size_t  idx) const

It returns the idx-th observed value as integer pointed by the internal cursor.

Returns
A pointer to the idx-th observed value as integer pointed by the internal cursor.
Note
It returns a 32-bit integer.
int te::st::TimeSeriesDataSet::getInt ( ) const

It returns the observed value as double pointed by the internal cursor.

Returns
A pointer to the observed value as double pointed by the internal cursor.
Note
It returns a 32-bit integer.
ObservationDataSet* te::st::TimeSeriesDataSet::getObservationSet ( ) const

It returns the data set that contains the time series observations.

Returns
A pointer to the data set that contains the time series observations.
Note
The caller will NOT take the ownership of the input pointer.
const te::dt::DateTimePeriod* te::st::TimeSeriesDataSet::getTemporalExtent ( ) const

It returns the temporal extent of the time series observations.

Returns
The temporal extent of the trajectory observations.
Note
The caller will NOT take the ownership of the output pointer.
std::auto_ptr<te::dt::DateTime> te::st::TimeSeriesDataSet::getTime ( ) const

It returns the time pointed by the internal cursor.

Returns
A pointer to the time pointed by the internal cursor.
Note
The caller will take the ownership of the returned pointer.
std::auto_ptr<TimeSeries> te::st::TimeSeriesDataSet::getTimeSeries ( te::st::AbstractTimeSeriesInterp interp)

It returns the time series from the DataSet.

This method encapsulates all observations of this DataSet as a TimeSeries type associated to a given interpolator.

Parameters
interpThe time series interpolator.
Returns
The time series associated to a given interpolator.
Note
The caller will take the ownership of the returned pointer.
It uses the first observed property to generate the time series.
std::auto_ptr<TimeSeries> te::st::TimeSeriesDataSet::getTimeSeries ( const std::string &  propName,
te::st::AbstractTimeSeriesInterp interp 
)

It returns the time series from the DataSet.

This method encapsulates all observations of this DataSet as a TimeSeries type associated to a given interpolator.

Parameters
propNameThe name of the observed property to be considered
interpThe time series interpolator.
Returns
The time series associated to a given interpolator.
Note
The caller will take the ownership of the returned pointer.
void te::st::TimeSeriesDataSet::getTimeSeriesSet ( te::st::AbstractTimeSeriesInterp interp,
const std::string &  vPropName,
std::vector< te::st::TimeSeries * > &  result 
)

It returns all time series from the DataSet.

This method encapsulates all observations of this DataSet as a set of TimeSeries associated to a given interpolator.

Parameters
interpThe time series interpolator.
vPropNameThe property name that contains the attribute values associated to a time series
resultThe returned set of time series.
Note
The caller will take the ownership of the returned pointers.
std::auto_ptr<te::dt::AbstractData> te::st::TimeSeriesDataSet::getValue ( std::size_t  idx) const

It returns the idx-th observed value pointed by the internal cursor.

Returns
A pointer to the idx-th observed value pointed by the internal cursor.
Note
The caller will take the ownership of the returned pointer.
std::auto_ptr<te::dt::AbstractData> te::st::TimeSeriesDataSet::getValue ( ) const

It returns the observed value pointed by the internal cursor.

Returns
A pointer to the observed value pointed by the internal cursor.
Note
The caller will take the ownership of the returned pointer.
const std::vector<std::string>& te::st::TimeSeriesDataSet::getValuePropNames ( ) const

It returns the indexes of the DataSet properties that contains the values associated to the time series.

Returns
The indexes of the DataSet properties that contains the observed values.
bool te::st::TimeSeriesDataSet::isAfterEnd ( ) const
bool te::st::TimeSeriesDataSet::isAtBegin ( ) const
bool te::st::TimeSeriesDataSet::isAtEnd ( ) const
bool te::st::TimeSeriesDataSet::isBeforeBegin ( ) const
bool te::st::TimeSeriesDataSet::moveBeforeFirst ( )
bool te::st::TimeSeriesDataSet::moveFirst ( )
bool te::st::TimeSeriesDataSet::moveLast ( )
bool te::st::TimeSeriesDataSet::moveNext ( )
bool te::st::TimeSeriesDataSet::movePrevious ( )
std::auto_ptr<te::da::DataSet> te::st::TimeSeriesDataSet::release ( )
protected

It releases all internal pointers, returning its internal DataSet and invalidating itself.

Returns
A pointer to the internal DataSet that contains the observations.
Note
This method is used when the user is interested only in its internal DataSet
The caller will take the ownership of the returned pointer.
void te::st::TimeSeriesDataSet::setId ( const std::string &  id)

It sets the identifier associated to the time series.

Parameters
idThe identifier associated to the time series.
void te::st::TimeSeriesDataSet::setValuePropNames ( const std::vector< std::string > &  n)

It sets the names of the DataSet properties that contains the values associated to the time series.

Parameters
nThe names of the DataSet properties that contains the time series values.
std::size_t te::st::TimeSeriesDataSet::size ( ) const

It returns the size of the time series observation set.

Returns
The observation set size of the time series.

Friends And Related Function Documentation

friend class TimeSeriesDataSetLayer
friend

Definition at line 71 of file TimeSeriesDataSet.h.

Member Data Documentation

std::string te::st::TimeSeriesDataSet::m_id
private

The time series identification.

Definition at line 340 of file TimeSeriesDataSet.h.

std::auto_ptr<ObservationDataSet> te::st::TimeSeriesDataSet::m_obsDs
private

The data set that contains the trajectory observations.

Definition at line 338 of file TimeSeriesDataSet.h.

std::vector<std::string> te::st::TimeSeriesDataSet::m_vlPropNames
private

The names of the properties that contain the time series values.

Definition at line 339 of file TimeSeriesDataSet.h.


The documentation for this class was generated from the following file: