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 
65  ~DataSourceInfo();
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
TEDATAACCESSEXPORT te::da::Expression * operator<(const te::da::Expression &e1, const te::da::Expression &e2)
te::core::URI m_connInfo
URI C++ Library.
A class for representing an Uniform Resource Identifier (URI).
Definition: URI.h:49
A class that represents a data source component.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:97
boost::shared_ptr< DataSourceInfo > DataSourceInfoPtr