DataSourceInfo.h
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 terralib/dataaccess/datasource/DataSourceInfo.h
22 
23  \brief A conteiner class for keeping information about a data source.
24 */
25 
26 #ifndef __TERRALIB_DATAACCESS_INTERNAL_DATASOURCEINFO_H
27 #define __TERRALIB_DATAACCESS_INTERNAL_DATASOURCEINFO_H
28 
29 // TerraLib
30 #include "../../core/uri/URI.h"
31 #include "../Config.h"
32 
33 // STL
34 #include <map>
35 #include <string>
36 
37 // Boost
38 #include <boost/noncopyable.hpp>
39 #include <boost/shared_ptr.hpp>
40 
41 namespace te
42 {
43  namespace core { class URI; }
44  namespace da
45  {
46  /*!
47  \class DataSourceInfo
48 
49  \brief A class that represents a data source component.
50 
51  This class splits the concept of data source from data access drivers.
52 
53  For example, at application level one can have a data source named File that uses
54  diferent drivers to access data. It will depend on user preferences and dialogs used to create
55  the data source.
56 
57  \ingroup dataaccess
58  */
60  {
61  public:
62 
64 
66 
67  const std::string& getId() const;
68 
69  void setId(const std::string& id);
70 
71  const std::string& getType() const;
72 
73  void setType(const std::string& dsType);
74 
75  const std::string& getAccessDriver() const;
76 
77  void setAccessDriver(const std::string& d);
78 
79  const std::string& getTitle() const;
80 
81  void setTitle(const std::string& title);
82 
83  const std::string& getDescription() const;
84 
85  void setDescription(const std::string& d);
86 
87  const te::core::URI& getConnInfo() const;
88 
89  const std::string getConnInfoAsString() const;
90 
91  void setConnInfo(const te::core::URI& conninfo);
92 
93  void setConnInfo(const std::string& conninfo);
94 
95  bool operator<(const DataSourceInfo& rhs) const;
96 
97  private:
98 
99  std::string m_id;
100  std::string m_dsType;
101  std::string m_accessDriver;
102  std::string m_title;
103  std::string m_description;
105  };
106 
107  typedef boost::shared_ptr<DataSourceInfo> DataSourceInfoPtr;
108 
109  }// end namespace da
110 } // end namespace te
111 
112 #endif // __TERRALIB_DATAACCESS_INTERNAL_DATASOURCEINFO_H
te::da::DataSourceInfo::m_title
std::string m_title
Definition: DataSourceInfo.h:102
te::da::DataSourceInfo::setConnInfo
void setConnInfo(const std::string &conninfo)
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::da::DataSourceInfo::getTitle
const std::string & getTitle() const
te::da::DataSourceInfo::setConnInfo
void setConnInfo(const te::core::URI &conninfo)
te::da::DataSourceInfo::getId
const std::string & getId() const
te::da::DataSourceInfoPtr
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr
Definition: DataSourceInfo.h:107
te::da::DataSourceInfo::setType
void setType(const std::string &dsType)
te::da::DataSourceInfo::getType
const std::string & getType() const
te::da::DataSourceInfo::operator<
bool operator<(const DataSourceInfo &rhs) const
te::da::DataSourceInfo::setId
void setId(const std::string &id)
te::da::DataSourceInfo
A class that represents a data source component.
Definition: DataSourceInfo.h:60
te::da::DataSourceInfo::getConnInfoAsString
const std::string getConnInfoAsString() const
te::da::DataSourceInfo::m_dsType
std::string m_dsType
Definition: DataSourceInfo.h:100
TEDATAACCESSEXPORT
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:97
te::da::DataSourceInfo::DataSourceInfo
DataSourceInfo()
te::da::DataSourceInfo::getAccessDriver
const std::string & getAccessDriver() const
te::da::DataSourceInfo::setTitle
void setTitle(const std::string &title)
te::core::URI
A class to store the proxy information that must be used to access data located in URIs.
Definition: URI.h:50
te::da::DataSourceInfo::m_id
std::string m_id
Definition: DataSourceInfo.h:99
te::da::DataSourceInfo::setAccessDriver
void setAccessDriver(const std::string &d)
te::da::DataSourceInfo::m_accessDriver
std::string m_accessDriver
Definition: DataSourceInfo.h:101
te::da::DataSourceInfo::setDescription
void setDescription(const std::string &d)
te::da::DataSourceInfo::getDescription
const std::string & getDescription() const
te::da::DataSourceInfo::m_connInfo
te::core::URI m_connInfo
Definition: DataSourceInfo.h:104
te::da::DataSourceInfo::getConnInfo
const te::core::URI & getConnInfo() const
te::da::DataSourceInfo::m_description
std::string m_description
Definition: DataSourceInfo.h:103
te::da::DataSourceInfo::~DataSourceInfo
~DataSourceInfo()