All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ObservationDataSetType.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 ObservationDataSetType.h
22 
23  \brief This file contains a class called ObservationDataSetType
24 */
25 
26 #ifndef __TERRALIB_ST_INTERNAL_OBSERVATIONDATASETTYPE_H
27 #define __TERRALIB_ST_INTERNAL_OBSERVATIONDATASETTYPE_H
28 
29 //ST
30 #include "../../Config.h"
31 
32 //STL
33 #include <string>
34 #include <vector>
35 
36 namespace te { namespace da { class DataSetType; } }
37 namespace te { namespace dt { class Property; class DateTimeProperty; } }
38 
39 namespace te
40 {
41  namespace st
42  {
43  /*!
44  \class ObservationDataSetType
45 
46  \brief A class that contains complemental DataSetType information about a DataSet
47  that holds observations.
48 
49  This class contains complemental DataSetType information about a
50  DataSet that holds observations.
51 
52  An observation is a result of a measurement associated to a discrete
53  time instant or period which assigns values to a phenomenon. It follows
54  the OGC's Observation and Measurement (O&M) specification.
55  An observation is composed of: (1) a phenomenon time, (2) a valid time,
56  (3) a result time and (4) observed values.
57 
58  Thus, this class has the indexes of the DataSet properties that contains the
59  phenomenon time, the valid time, the result time and the observed values.
60 
61  \sa Observation ObservationDataSet
62  */
63 
65  {
66  public:
67 
68  /*!
69  \brief Constructor.
70 
71  \param phTimeIdx The index of the property that contains the phenomenon time.
72  \param obsPropIdx The index of the property that is observed.
73  \param geomPropIdx The index of the observed property that contains the geometry.
74  */
75  ObservationDataSetType(int phTimeIdx, int obsPropIdx, int geomPropIdx = -1);
76 
77  /*!
78  \brief Constructor.
79 
80  \param phTimeIdx The index of the property that contains the phenomenon time.
81  \param obsPropIdx The indexes of the properties that are observed.
82  \param geomPropIdx The index of the observed property that contains the geometry.
83  */
84  ObservationDataSetType(int phTimeIdx, const std::vector<int>& obsPropIdx, int geomPropIdx = -1);
85 
86  /*!
87  \brief Constructor.
88 
89  This constructor is used when the DataSet uses two properties to store a period,
90  one for its begining and the other for its end.
91 
92  \param phTimeIdx The indexes of the properties that contain the phenomenon time.
93  \param obsPropIdx The indexes of the properties that are observed.
94  \param geomPropIdx The index of the observed property that contains the geometry.
95  */
96  ObservationDataSetType( const std::vector<int>& phTimeIdx, const std::vector<int>& obsPropIdx,
97  int geomPropIdx = -1);
98 
99  /*!
100  \brief Constructor.
101 
102  \param phTimeIdx The indexes of the properties that contains the phenomen time.
103  \param obsPropIdx The indexes of the property that are observed.
104  \param geomPropIdx The index of the observed property that contains the geometry.
105  \param valTimeIdx The indexes of the properties that contains the valid time.
106  \param resTimeIdx The index of the property that contains the result time.
107  */
108  ObservationDataSetType( const std::vector<int>& phTimeIdx, const std::vector<int>& obsPropIdx,
109  int geomPropIdx, const std::vector<int>& valTimeIdx, int resTimeIdx);
110 
111  /*!
112  \brief It returns the indexes of the DataSetType properties that contains the phenomenon time.
113 
114  \return The indexes of the DataSetType properties that contains the phenomenon time.
115  */
116  const std::vector<int>& getTimePropIdxs() const;
117 
118  /*!
119  \brief It returns the index of the DataSet property that contains the phenomenon beginning time.
120 
121  \return The index of the DataSet property that contains the phenomenon beginning time.
122  */
123  int getBeginTimePropIdx() const;
124 
125  /*!
126  \brief It returns the index of the DataSet property that contains the phenomenon end time.
127 
128  \return The index of the DataSet property that contains the phenomenon end time.
129 
130  \note It returns -1 when there is no a phenomenon end time.
131  */
132  int getEndTimePropIdx() const;
133 
134  /*!
135  \brief It sets the indexes of the DataSet properties that contains the phenomenon time.
136 
137  \param idxs The indexes of the DataSet properties that contains the phenomenon time.
138  */
139  void setTimePropIdxs(const std::vector<int>& idxs);
140 
141  /*!
142  \brief It sets the index of the DataSet property that contains the phenomenon beginning time.
143 
144  \param idx The index of the DataSet property that contains the phenomenon beginning time.
145  */
146  void setBeginTimePropIdx(int idx);
147 
148  /*!
149  \brief It sets the index of the DataSet property that contains the phenomenon end time.
150 
151  \param idx The index of the DataSet property that contains the phenomenon end time.
152  */
153  void setEndTimePropIdx(int idx);
154 
155  /*!
156  \brief It returns the indexes of the DataSetType properties that are observed over time.
157 
158  \return The indexes of the DataSetType properties that are observed over time.
159  */
160  const std::vector<int>& getObsPropIdxs() const;
161 
162  /*!
163  \brief It sets the indexes of the DataSetType properties that are observed over time.
164 
165  \param props The indexes of the DataSetType properties that are observed over time.
166  */
167  void setObsPropIdxs(const std::vector<int>& props);
168 
169  /*!
170  \brief It returns the index of the observed property that is a geometry property.
171 
172  \return The index of the observed property that is a geometry property.
173  */
174  int getGeomPropIdx() const;
175 
176  /*!
177  \brief It sets the index of the observed property that is a geometry property.
178 
179  \param idx The index of the observed property that is a geometry property.
180  */
181  void setGeomPropIdx(int idx);
182 
183  /*!
184  \brief It returns the index of the DataSet property that contains the valid beginning time.
185 
186  \return The index of the DataSet property that contains the valid beginning time.
187 
188  \note It returns -1 when there is no a valid beginning time.
189  */
190  int getVlBeginTimePropIdx() const;
191 
192  /*!
193  \brief It returns the index of the DataSet property that contains the valid end time.
194 
195  \return The index of the DataSet property that contains the valid end time.
196 
197  \note It returns -1 when there is no a valid end time.
198  */
199  int getVlEndTimePropIdx() const;
200 
201  /*!
202  \brief It returns the indexes of the DataSet properties that contains the valid time.
203 
204  \return The indexes of the DataSet properties that contains the valid time.
205  */
206  const std::vector<int>& getVlTimePropIdxs() const;
207 
208  /*!
209  \brief It sets the index of the DataSet property that contains the valid beginning time.
210 
211  \param idx The index of the DataSet property that contains the valid beginning time.
212  */
213  void setVlBeginTimePropIdx(int idx);
214 
215  /*!
216  \brief It sets the index of the DataSet property that contains the valid end time.
217 
218  \param idx The index of the DataSet property that contains the valid end time.
219  */
220  void setVlEndTimePropIdx(int idx);
221 
222  /*!
223  \brief It sets the indexes of the DataSet properties that contains the valid time.
224 
225  \param idxs The indexes of the DataSet properties that contains the valid time.
226  */
227  void setVlTimePropIdxs(const std::vector<int>& idxs);
228 
229  /*!
230  \brief It returns the index of the DataSet property that contains the result time.
231 
232  \return The index of the DataSet properties that contains the result time.
233  */
234  int getRsTimePropIdx() const;
235 
236  /*!
237  \brief It sets the index of the DataSet property that contains the result time.
238 
239  \param idx The index of the DataSet property that contains the result time.
240  */
241  void setRsTimePropIdx(int idx);
242 
243  /*! \brief Virtual destructor. */
244  virtual ~ObservationDataSetType();
245 
246  private:
247 
248  std::vector<int> m_phTimePropIdx; //!< The indexes of DataSet properties that contain the phenomenon time.
249  std::vector<int> m_observedPropIdx; //!< The indexes of DataSet properties that are observed.
250  int m_geomPropIdx; //!< The index of the observed property that contains the spatial information.
251  std::vector<int> m_validTimePropIdx; //!< The indexes of DataSet properties that contain the valid time.
252  int m_resultTimePropIdx; //!< The index of DataSet property that contains the result time.
253  };
254  } // end namespace st
255 } // end namespace te
256 
257 #endif // __TERRALIB_ST_INTERNAL_OBSERVATIONDATASETTYPE_H
258 
std::vector< int > m_phTimePropIdx
The indexes of DataSet properties that contain the phenomenon time.
#define TESTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:136
std::vector< int > m_observedPropIdx
The indexes of DataSet properties that are observed.
A class that contains complemental DataSetType information about a DataSet that holds observations...
int m_resultTimePropIdx
The index of DataSet property that contains the result time.
int m_geomPropIdx
The index of the observed property that contains the spatial information.
std::vector< int > m_validTimePropIdx
The indexes of DataSet properties that contain the valid time.