All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TimeSeriesDataSetType.cpp
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.cpp
22 
23  \brief This file contains a class called TimeSeriesDataSetType
24 */
25 
26 //ST
27 #include "TimeSeriesDataSetType.h"
28 #include "../observation/ObservationDataSetType.h"
29 
30 te::st::TimeSeriesDataSetType::TimeSeriesDataSetType(int tPropIdx, int vPropIdx, int gPropIdx,
31  int idPropIdx, const std::string& id)
32  : m_obsType(tPropIdx, vPropIdx, gPropIdx),
33  m_vlPropIdxs(1,vPropIdx),
34  m_idPropIdx(idPropIdx),
35  m_id(id)
36 {
37 }
38 
39 te::st::TimeSeriesDataSetType::TimeSeriesDataSetType(const std::vector<int>& tPropIdxs,
40  const std::vector<int>& vPropIdxs,
41  int gPropIdx, int idPropIdx, const std::string& id)
42  : m_obsType(tPropIdxs, vPropIdxs, gPropIdx),
43  m_vlPropIdxs(vPropIdxs),
44  m_idPropIdx(idPropIdx),
45  m_id(id)
46 {
47 }
48 
50  const std::vector<int>& vPropIdxs,
51  int idPropIdx, const std::string& id)
52  : m_obsType(type),
53  m_vlPropIdxs(vPropIdxs),
54  m_idPropIdx(idPropIdx),
55  m_id(id)
56 {
57 }
58 
61 {
62  return m_obsType;
63 }
64 
66 {
67  return m_obsType.getBeginTimePropIdx();
68 }
69 
71 {
72  return m_obsType.getBeginTimePropIdx();
73 }
74 
76 {
77  return m_obsType.getEndTimePropIdx();
78 }
79 
80 const std::vector<int>&
82 {
83  return m_vlPropIdxs;
84 }
85 
87 {
88  return m_obsType.getGeomPropIdx();
89 }
90 
92 {
93  return m_idPropIdx;
94 }
95 
97 {
98  m_idPropIdx=idx;
99 }
100 
102 {
103  return m_id;
104 }
105 
106 void te::st::TimeSeriesDataSetType::setId(const std::string& id)
107 {
108  m_id = id;
109 }
110 
112 {
113 }
114 
int getTimePropIdx() const
It returns the property index that contains the times associated to the time series.
TimeSeriesDataSetType(int tPropIdx, int vPropIdx, int gPropIdx, int idPropIdx, const std::string &id)
Constructor.
void setId(const std::string &id)
It sets the time series id.
const ObservationDataSetType & getType() const
It returns the observation data set type.
std::string getId() const
It returns the time series id.
void setIdPropIdx(int idx)
It sets the property index that contains the time series identifications.
This file contains a class called TimeSeriesDataSetType.
int getIdPropIdx() const
It returns the property index that contains the time series identifications.
const std::vector< int > & getValuePropIdx() const
It returns the indexes of the properties that contains the values associated to the time series...
int getEndTimePropIdx() const
It returns the property index that contains the final time associated to the time series...
A class that contains complemental DataSetType information about a DataSet that holds observations...
virtual ~TimeSeriesDataSetType()
Virtual destructor.
int getBeginTimePropIdx() const
It returns the property index that contains the begin time associated to the time series...
int getGeomPropIdx() const
It returns the property index that contains the time series location.