26 #ifndef __TERRALIB_MEMORY_INTERNAL_DATASOURCE_H 27 #define __TERRALIB_MEMORY_INTERNAL_DATASOURCE_H 30 #include "../dataaccess/dataset/DataSet.h" 31 #include "../dataaccess/datasource/DataSource.h" 35 #include <boost/thread.hpp> 67 const std::map<std::string, te::da::DataSetPtr>& getDataSets()
const;
74 const std::map<std::string, te::da::DataSetTypePtr> getSchemas()
const;
76 std::string getType()
const;
78 std::unique_ptr<te::da::DataSourceTransactor> getTransactor();
84 bool isOpened()
const;
92 std::unique_ptr<te::da::DataSet> getDataSet(
const std::string& name,
96 std::vector<std::string> getDataSetNames();
98 std::size_t getNumberOfDataSets();
100 std::unique_ptr<te::da::DataSetType> getDataSetType(
const std::string& datasetName);
102 boost::ptr_vector<te::dt::Property> getProperties(
const std::string& datasetName);
104 std::unique_ptr<te::dt::Property> getProperty(
const std::string& datasetName,
const std::string& name);
106 std::unique_ptr<te::dt::Property> getProperty(
const std::string& datasetName, std::size_t propertyPos);
108 std::vector<std::string> getPropertyNames(
const std::string& datasetName);
110 std::size_t getNumberOfProperties(
const std::string& datasetName);
112 bool propertyExists(
const std::string& datasetName,
const std::string& name);
116 void dropProperty(
const std::string& datasetName,
const std::string& propertyName);
118 void renameProperty(
const std::string& datasetName,
const std::string& name,
const std::string& newName);
120 std::size_t getNumberOfItems(
const std::string& datasetName);
124 bool dataSetExists(
const std::string& name);
126 void createDataSet(
te::da::DataSetType* dt,
const std::map<std::string, std::string>& options);
128 void cloneDataSet(
const std::string& name,
const std::string& cloneName,
129 const std::map<std::string, std::string>& options);
131 void dropDataSet(
const std::string& name);
133 void renameDataSet(
const std::string& name,
const std::string& newName);
136 const std::map<std::string, std::string>& options, std::size_t limit);
140 void update(
const std::string& datasetName,
142 const std::vector<std::size_t>& properties,
144 const std::map<std::string, std::string>& options,
145 std::size_t limit = 0);
160 void create(
const std::string& connInfo);
162 void drop(
const std::string& connInfo);
164 bool exists(
const std::string& connInfo);
166 std::vector<std::string> getDataSourceNames(
const std::string& connInfo);
171 std::map<std::string, te::da::DataSetTypePtr>
m_schemas;
172 mutable boost::recursive_mutex
m_mtx;
185 #endif // __TERRALIB_MEMORY_INTERNAL_DATASOURCE_H static te::da::DataSourceCapabilities sm_capabilities
The Memory data source capabilities.
#define TEMEMORYEXPORT
You can use this macro in order to export/import classes and functions from this module.
std::size_t m_maxNumDatasets
The maximum number of datasets to be handled by the data source.
A class that models the description of a dataset.
It represents the SQL query dialect accepted by a given data source.
static const te::da::SQLDialect sm_dialect
A dummy dialect.
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
Configuration flags for the TerraLib In-memory Data Access driver.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
It models a property definition.
AccessPolicy
Supported data access policies (can be used as bitfield).
TraverseType
A dataset can be traversed in two ways:
std::size_t m_numDatasets
The number of datasets kept in the data source.
This class represents a set of unique ids created in the same context. i.e. from the same data set...
te::da::DataSourceCapabilities capabilities
bool m_isOpened
A flag to control the state of the data source.
A class to store the proxy information that must be used to access data located in URIs...
A dataset is the unit of information manipulated by the data access module of TerraLib.
boost::recursive_mutex m_mtx
The internal mutex.
std::map< std::string, te::da::DataSetTypePtr > m_schemas
The set of dataset schemas.
std::map< std::string, te::da::DataSetPtr > m_datasets
The set of datasets stored in memory.
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver...
bool m_deepCopy
If true, each dataset is cloned in the getDataSet method.