A class to represent a time series data set. More...
#include <TimeSeriesDataSet.h>
Public Member Functions | |
std::string | getId () const |
It returns the identifier associated to the time series. More... | |
ObservationDataSet * | getObservationSet () const |
It returns the data set that contains the time series observations. More... | |
const te::dt::DateTimePeriod * | getTemporalExtent () const |
It returns the temporal extent of the time series observations. More... | |
std::auto_ptr< TimeSeries > | getTimeSeries (te::st::AbstractTimeSeriesInterp *interp) |
It returns the time series from the DataSet. More... | |
std::auto_ptr< TimeSeries > | getTimeSeries (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::DateTime > | getTime () 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::Geometry > | getGeometry () const |
It returns the geometry pointed by the internal cursor. More... | |
Protected Member Functions | |
std::auto_ptr< te::da::DataSet > | release () |
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< ObservationDataSet > | m_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 |
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.
Definition at line 69 of file TimeSeriesDataSet.h.
te::st::TimeSeriesDataSet::TimeSeriesDataSet | ( | te::da::DataSet * | ds, |
const ObservationDataSetType & | type, | ||
const std::vector< std::string > & | propNames | ||
) |
Constructor.
ds | The data set that contains the time series observations. |
type | The observation data set type. |
propNames | The names of the properties that contains the time series values |
te::st::TimeSeriesDataSet::TimeSeriesDataSet | ( | te::da::DataSet * | ds, |
const ObservationDataSetType & | type, | ||
const std::vector< std::string > & | propNames, | ||
const std::string & | id | ||
) |
Constructor.
ds | The data set that contains the time series observations. |
type | The observation data set type. |
propNames | The names of the properties that contains the time series values |
id | The time series id |
te::st::TimeSeriesDataSet::TimeSeriesDataSet | ( | ObservationDataSet * | obs, |
const std::vector< std::string > & | propNames, | ||
const std::string & | id | ||
) |
Constructor.
obs | The data set that contains the time series observations. |
propNames | The names of the properties that contains the time series values |
id | The time series id |
|
virtual |
It returns the trajectory geometry property.
It returns the trajectory datetime property.
Virtual destructor.
double te::st::TimeSeriesDataSet::getDouble | ( | std::size_t | idx | ) | const |
It returns 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.
std::auto_ptr<te::gm::Geometry> te::st::TimeSeriesDataSet::getGeometry | ( | ) | const |
It returns the geometry pointed by the internal cursor.
std::string te::st::TimeSeriesDataSet::getId | ( | ) | const |
It 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.
int te::st::TimeSeriesDataSet::getInt | ( | ) | const |
It returns the observed value as double pointed by the internal cursor.
ObservationDataSet* te::st::TimeSeriesDataSet::getObservationSet | ( | ) | const |
It returns the data set that contains the time series observations.
const te::dt::DateTimePeriod* te::st::TimeSeriesDataSet::getTemporalExtent | ( | ) | const |
It returns the temporal extent of the time series observations.
std::auto_ptr<te::dt::DateTime> te::st::TimeSeriesDataSet::getTime | ( | ) | const |
It returns the time pointed by the internal cursor.
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.
interp | The time series interpolator. |
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.
propName | The name of the observed property to be considered |
interp | The time series interpolator. |
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.
interp | The time series interpolator. |
vPropName | The property name that contains the attribute values associated to a time series |
result | The returned set of time series. |
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.
std::auto_ptr<te::dt::AbstractData> te::st::TimeSeriesDataSet::getValue | ( | ) | const |
It returns the observed value pointed by the internal cursor.
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.
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 | ( | ) |
|
protected |
It releases all internal pointers, returning its internal DataSet and invalidating itself.
void te::st::TimeSeriesDataSet::setId | ( | const std::string & | id | ) |
It sets the identifier associated to the time series.
id | The 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.
n | The 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.
|
friend |
Definition at line 71 of file TimeSeriesDataSet.h.
|
private |
The time series identification.
Definition at line 340 of file TimeSeriesDataSet.h.
|
private |
The data set that contains the trajectory observations.
Definition at line 338 of file TimeSeriesDataSet.h.
|
private |
The names of the properties that contain the time series values.
Definition at line 339 of file TimeSeriesDataSet.h.