All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
TimeSeriesDataSetInfo.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 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 TimeSeriesDataSetInfo.cpp
22 
23  \brief This file contains a class called TimeSeriesDataSetInfo
24 */
25 
26 //TerraLib
27 #include "../../../dataaccess/datasource/DataSourceInfo.h"
28 #include "../../../common/StringUtils.h"
29 #include "../../../geometry/GeometryProperty.h"
30 #include "../../../datatype/DateTimeProperty.h"
31 
32 //ST
33 #include "TimeSeriesDataSetInfo.h"
34 
35 
37  const std::string& tPropName, const std::string& vPropName,
38  const std::string& gPropName, const std::string& idPropName,
39  const std::string& id)
40  : m_obsDsInfo(dsinfo, dsName),
41  m_vlPropNames()
42 {
43  m_vlPropNames.push_back(vPropName);
44 
45  //create properties
48 
51 
52  std::vector<std::string> aux;
53  aux.push_back(vPropName);
55 
56  m_obsDsInfo.setIdPropInfo(idPropName);
57  m_obsDsInfo.setId(id);
58 }
59 
61  const std::string& tPropName, const std::vector<std::string>& vPropNames,
62  const std::string& gPropName, const std::string& idPropName,
63  const std::string& id)
64  : m_obsDsInfo(dsinfo, dsName),
65  m_vlPropNames(vPropNames)
66 {
67  //create properties
70 
73 
74  m_obsDsInfo.setObsPropInfo(vPropNames);
75 
76  m_obsDsInfo.setIdPropInfo(idPropName);
77  m_obsDsInfo.setId(id);
78 }
79 
80 
82  const std::vector<std::string>& valPropNames)
83  : m_obsDsInfo(info),
84  m_vlPropNames(valPropNames)
85 {
86 }
87 
90 {
91  return m_obsDsInfo;
92 }
93 
94 const std::vector<std::string>&
96 {
97  return m_vlPropNames;
98 }
99 
101 {
102 }
103 
104 
Geometric property.
ObservationDataSetInfo m_obsDsInfo
Infos about the DataSource and DataSet that contains the time series observations.
A class that contains infos about a DataSet that contains observations.
TimeSeriesDataSetInfo(const te::da::DataSourceInfo &dsinfo, const std::string &dsName, const std::string &tPropName, const std::string &vPropName, const std::string &gPropName, const std::string &idPropName, const std::string &id)
Constructor.
const ObservationDataSetInfo & getObservationDataSetInfo() const
It returns information about the DataSet that contains the time series observations.
std::vector< std::string > m_vlPropNames
The names of the properties that contain the time series values.
const std::vector< std::string > & getValuePropNames() const
It returns the names of the DataSet properties that contains the values associated to the time series...
This file contains a class called TimeSeriesDataSetInfo.
void setIdPropInfo(int idProp)
It sets the index of the DataSet property that contains identifiers that groups the observations...
void setId(const std::string &id)
It sets the identifier associated to all observations.
virtual ~TimeSeriesDataSetInfo()
Virtual destructor.
void setTimePropInfo(te::dt::DateTimeProperty *tpInfo)
It sets the property info that contains the phenomenon time.
The type for date and time types: date, date period, date duration, time duration, time instant, time period, time instant with time zone or time period with time zone.
A class that represents a data source component.
void setGeomPropInfo(te::gm::GeometryProperty *prop)
It sets the info about the property that contains the observation location.
void setObsPropInfo(const std::vector< int > &props)
It sets the indexes of the DataSet properties that are observed over time.