DataSourceCatalogLoader.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/sqlite/DataSourceCatalogLoader.h
22 
23  \brief DataSourceCatalogLoader manages metadata information for the TerraLib SQLite Data Access Driver.
24 */
25 
26 #ifndef __TERRALIB_SQLITE_INTERNAL_DATASOURCECATALOGLOADER_H
27 #define __TERRALIB_SQLITE_INTERNAL_DATASOURCECATALOGLOADER_H
28 
29 // STL
30 #include <memory>
31 #include <string>
32 #include <vector>
33 
34 // Boost
35 #include <boost/noncopyable.hpp>
36 #include <boost/ptr_container/ptr_vector.hpp>
37 
38 namespace te
39 {
40  namespace da
41  {
42  class DataSet;
43  class DataSetType;
44  }
45 
46  namespace sqlite
47  {
48  class DataSourceTransactor;
49 
50  class DataSourceCatalogLoader : public boost::noncopyable
51  {
52  public:
53 
55 
57 
58  std::vector<std::string> getDataSetNames();
59 
60  std::auto_ptr<te::da::DataSet> getDataSets();
61 
62  bool hasDataSets();
63 
64  bool datasetExists(const std::string& name);
65 
66  te::da::DataSetType* getDataSetType(const std::string& datasetName);
67 
68  void getGeometryInfo(const std::string& datasetName, te::gm::GeometryProperty* gp);
69 
70  std::auto_ptr<te::da::DataSet> getGeometryInfo(const std::string& tableName, const std::string& geomColName);
71 
72  boost::ptr_vector<te::dt::Property> getProperties(const std::string& datasetName);
73 
75 
77 
79  int idxId,
80  const std::string& idxName);
81 
83 
85 
87  int idxId,
88  const std::string& idxName,
89  bool isUnique);
90 
91  te::gm::Envelope* getExtent(const std::string& tableName, const std::string& geomColName);
92 
93  private:
94 
95  class Impl;
96 
97  Impl* m_pImpl;
98  };
99  }
100 }
101 
102 #endif // __TERRALIB_SQLITE_INTERNAL_DATASOURCECATALOGLOADER_H
te::da::DataSetType * getDataSetType(const std::string &datasetName)
Geometric property.
A class that models the description of a dataset.
Definition: DataSetType.h:72
void getGeometryInfo(const std::string &datasetName, te::gm::GeometryProperty *gp)
te::gm::Envelope * getExtent(const std::string &tableName, const std::string &geomColName)
void getSpatialIndexes(te::da::DataSetType *dt)
boost::ptr_vector< te::dt::Property > getProperties(const std::string &datasetName)
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
void getIndex(te::da::DataSetType *dt, int idxId, const std::string &idxName, bool isUnique)
void getIndexes(te::da::DataSetType *dt)
URI C++ Library.
DataSourceCatalogLoader(DataSourceTransactor *parent)
std::auto_ptr< te::da::DataSet > getDataSets()
bool datasetExists(const std::string &name)
void getPrimaryKey(te::da::DataSetType *dt)
std::vector< std::string > getDataSetNames()
void getUniqueKey(te::da::DataSetType *dt, int idxId, const std::string &idxName)
void getUniqueKeys(te::da::DataSetType *dt)