All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TimeSeriesDataSetType.h
Go to the documentation of this file.
1 /* Copyright (C) 2001-2009 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18 */
19 
20 /*!
21  \file TimeSeriesDataSetType.h
22 
23  \brief This file contains a class called TimeSeriesDataSetType
24 */
25 
26 #ifndef __TERRALIB_ST_INTERNAL_TIMESERIESDATASETTYPE_H
27 #define __TERRALIB_ST_INTERNAL_TIMESERIESDATASETTYPE_H
28 
29 //ST
30 #include "../observation/ObservationDataSetType.h"
31 
32 //STL
33 #include <string>
34 #include <vector>
35 
36 namespace te
37 {
38  namespace st
39  {
40  /*!
41  \class TimeSeriesDataSetType
42 
43  \brief A class that contains complemental information
44  about a DataSet that holds observations of a time series.
45 
46  A time series represents the variation of the values of a property over time.
47 
48  \sa ObservationDataSet ObservationDataSetType
49  */
51  {
52  public:
53 
54  /*!
55  \brief Constructor.
56 
57  \param tPropIdx The index of the property that contains the times of a time series.
58  \param vPropIdx The index of the property that contains the values of the time series.
59  \param gPropIdx The index of the property that contains the location of the time series.
60  \param idPropIdx The index of the property that contains the identity of the time series.
61  \param id The trajectory id.
62  */
63  TimeSeriesDataSetType(int tPropIdx, int vPropIdx, int gPropIdx, int idPropIdx,
64  const std::string& id);
65 
66  /*!
67  \brief Constructor.
68 
69  \param tPropIdxs The indexes of the properties that contains the beginning and final times of a time series.
70  \param vPropIdxs The indexes of the properties that contains the values of a time series.
71  \param gPropIdx The index of the property that contains the geometries of a time series.
72  \param idPropIdx The index of the property that contains the identity of the time series.
73  \param id The trajectory id.
74  */
75  TimeSeriesDataSetType(const std::vector<int>& tPropIdxs, const std::vector<int>& vPropIdxs,
76  int gPropIdx, int idPropIdx, const std::string& id);
77 
78  /*!
79  \brief Constructor.
80 
81  \param type The ObservationSetType
82  \param vPropIdxs The indexes of the properties that contains the values of a time series.
83  \param idPropIdx The property index that contains the time series identification.
84  \param id The time series id.
85 
86  \note idPropIdx equal to "-1" means that the DataSet contains observations of only one time series.
87  */
88  TimeSeriesDataSetType(const ObservationDataSetType& type, const std::vector<int>& vPropIdxs,
89  int idPropIdx, const std::string& id);
90 
91  /*!
92  \brief It returns the observation data set type.
93 
94  \return The observation set type.
95  */
96  const ObservationDataSetType& getType() const;
97 
98  /*!
99  \brief It returns the property index that contains the times associated to the time series.
100 
101  \return The property index that contains the times associated to the time series.
102  */
103  int getTimePropIdx() const;
104 
105  /*!
106  \brief It returns the property index that contains the begin time associated to the time series.
107 
108  \return The property index that contains the begin times associated to the time series.
109  */
110  int getBeginTimePropIdx() const;
111 
112  /*!
113  \brief It returns the property index that contains the final time associated to the time series.
114 
115  \return The property index that contains the end time associated to the time series.
116  */
117  int getEndTimePropIdx() const;
118 
119  /*!
120  \brief It returns the indexes of the properties that contains the values associated to the time series.
121 
122  \return The indexes of the properties that contains the observed values.
123  */
124  const std::vector<int>& getValuePropIdx() const;
125 
126  /*!
127  \brief It returns the property index that contains the time series location.
128 
129  \return The property index that contains the time series location.
130  */
131  int getGeomPropIdx() const;
132 
133  /*!
134  \brief It returns the property index that contains the time series identifications.
135 
136  \return The property index that contains the time series identifications.
137  */
138  int getIdPropIdx() const;
139 
140  /*!
141  \brief It sets the property index that contains the time series identifications.
142 
143  \param idx The property index that contains the time series identifications.
144  */
145  void setIdPropIdx(int idx);
146 
147  /*!
148  \brief It returns the time series id.
149 
150  \return The time series id.
151  */
152  std::string getId() const;
153 
154  /*!
155  \brief It sets the time series id.
156 
157  \param id The time series id.
158  */
159  void setId(const std::string& id);
160 
161  /*! \brief Virtual destructor. */
162  virtual ~TimeSeriesDataSetType();
163 
164  protected:
165 
166  ObservationDataSetType m_obsType; //!< The internal observation data set type
167  std::vector<int> m_vlPropIdxs; //!< The indexes of the properties that contain the time series values.
168  int m_idPropIdx; //!< The property index that contains the identification of each time series.
169  std::string m_id; //!< The time series id
170  };
171  } // end namespace st
172 } // end namespace te
173 
174 #endif // __TERRALIB_ST_INTERNAL_TIMESERIESDATASETTYPE_H
175 
#define TESTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:90
std::string m_id
The time series id.
ObservationDataSetType m_obsType
The internal observation data set type.
A class that contains complemental information about a DataSet that holds observations of a time seri...
int m_idPropIdx
The property index that contains the identification of each time series.
A class that contains complemental DataSetType information about a DataSet that holds observations...
std::vector< int > m_vlPropIdxs
The indexes of the properties that contain the time series values.