All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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::AbstractData
getValue (std::size_t idx) const
 It returns the idx-th observed value pointed by the internal cursor. More...
 
std::auto_ptr
< te::dt::AbstractData
getValue () 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.

Definition at line 43 of file TimeSeriesDataSet.cpp.

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.

Definition at line 51 of file TimeSeriesDataSet.cpp.

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.

Definition at line 59 of file TimeSeriesDataSet.cpp.

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.

Definition at line 272 of file TimeSeriesDataSet.cpp.

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.

Definition at line 159 of file TimeSeriesDataSet.cpp.

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.

Definition at line 164 of file TimeSeriesDataSet.cpp.

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.

Definition at line 179 of file TimeSeriesDataSet.cpp.

std::string te::st::TimeSeriesDataSet::getId ( ) const

It returns the identifier associated to the time series.

Returns
The identifier associated to the time series.

Definition at line 82 of file TimeSeriesDataSet.cpp.

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.

Definition at line 169 of file TimeSeriesDataSet.cpp.

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.

Definition at line 174 of file TimeSeriesDataSet.cpp.

te::st::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.

Definition at line 67 of file TimeSeriesDataSet.cpp.

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.

Definition at line 188 of file TimeSeriesDataSet.cpp.

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.

Definition at line 142 of file TimeSeriesDataSet.cpp.

std::auto_ptr< te::st::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.

Definition at line 193 of file TimeSeriesDataSet.cpp.

std::auto_ptr< te::st::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.

Definition at line 199 of file TimeSeriesDataSet.cpp.

References te::da::DataSet::getDateTime(), te::da::DataSet::getValue(), and te::da::DataSet::moveNext().

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.

Definition at line 231 of file TimeSeriesDataSet.cpp.

References te::da::DataSet::getDateTime(), te::da::DataSet::getValue(), and te::da::DataSet::moveNext().

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.

Definition at line 149 of file TimeSeriesDataSet.cpp.

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.

Definition at line 154 of file TimeSeriesDataSet.cpp.

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.

Definition at line 72 of file TimeSeriesDataSet.cpp.

bool te::st::TimeSeriesDataSet::isAfterEnd ( ) const

Definition at line 137 of file TimeSeriesDataSet.cpp.

bool te::st::TimeSeriesDataSet::isAtBegin ( ) const

Definition at line 122 of file TimeSeriesDataSet.cpp.

bool te::st::TimeSeriesDataSet::isAtEnd ( ) const

Definition at line 132 of file TimeSeriesDataSet.cpp.

bool te::st::TimeSeriesDataSet::isBeforeBegin ( ) const

Definition at line 127 of file TimeSeriesDataSet.cpp.

bool te::st::TimeSeriesDataSet::moveBeforeFirst ( )

Definition at line 112 of file TimeSeriesDataSet.cpp.

bool te::st::TimeSeriesDataSet::moveFirst ( )

Definition at line 107 of file TimeSeriesDataSet.cpp.

bool te::st::TimeSeriesDataSet::moveLast ( )

Definition at line 117 of file TimeSeriesDataSet.cpp.

bool te::st::TimeSeriesDataSet::moveNext ( )

Definition at line 97 of file TimeSeriesDataSet.cpp.

bool te::st::TimeSeriesDataSet::movePrevious ( )

Definition at line 102 of file TimeSeriesDataSet.cpp.

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.

Definition at line 266 of file TimeSeriesDataSet.cpp.

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.

Definition at line 87 of file TimeSeriesDataSet.cpp.

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.

Definition at line 77 of file TimeSeriesDataSet.cpp.

std::size_t te::st::TimeSeriesDataSet::size ( void  ) const

It returns the size of the time series observation set.

Returns
The observation set size of the time series.

Definition at line 92 of file TimeSeriesDataSet.cpp.

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 files: