26 #ifndef __TERRALIB_OGR_INTERNAL_DATASOURCE_H
27 #define __TERRALIB_OGR_INTERNAL_DATASOURCE_H
31 #include "../dataaccess/datasource/DataSource.h"
32 #include "../dataaccess/datasource/DataSourceCapabilities.h"
33 #include "../dataaccess/dataset/DataSetType.h"
100 void create(
const std::string& connInfo);
102 void drop(
const std::string& connInfo);
104 bool exists(
const std::string& connInfo);
A class to store the proxy information that must be used to access data located in URIs.
A class that models the description of a dataset.
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
An abstract class for data providers like a DBMS, Web Services or a regular file.
It represents the SQL query dialect accepted by a given data source.
The OGR data source provider.
std::size_t m_transactionCount
A counter to handle nested transactions.
std::string getType() const
It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS,...
std::vector< std::string > getDataSourceNames(const std::string &connInfo)
It gets the data source names available in a driver.
bool isValid() const
It checks if the data source is valid (available for using).
void createDataSet(te::da::DataSetType *dt, const std::map< std::string, std::string > &options)
It creates the dataset schema definition in the target data source.
void updateCapabilities()
GDALDataset * getOGRDataSource()
void create(const std::string &connInfo)
It creates a new data source.
void close()
It closes the data source and clears all the resources used by its internal communication channel.
static void setDialect(te::da::SQLDialect *dialect)
te::core::EncodingType getEncoding()
It return the DataSource current encoding.
~DataSource()
Virtual destructor.
std::unique_ptr< te::da::DataSourceTransactor > getTransactor()
It returns the set of parameters used to set up the access channel to the underlying repository.
GDALDataset * m_ogrDS
A pointer to OGR Data Source.
bool m_isValid
True if this is a valid datasource.
static te::da::SQLDialect * sm_myDialect
OGR SQL dialect.
te::core::EncodingType m_encoding
The data source encoding type.
void createOGRDataSource()
bool isInTransaction() const
void open()
It opens the data source and makes it ready for using.
const te::da::SQLDialect * getDialect() const
It returns the data source SQL dialect, if there is one.
bool isOpened() const
It returns true if the data source is opened, otherwise it returns false.
void drop(const std::string &connInfo)
It removes the data source with the connection information from a driver.
DataSource(const te::core::URI &uri)
te::da::DataSourceCapabilities m_capabilities
OGR capabilities.
const te::da::DataSourceCapabilities & getCapabilities() const
It returns the known capabilities of the data source.
bool exists(const std::string &connInfo)
Check the existence of a data source in a driver.
void setEncoding(const te::core::EncodingType &et)
It sets the encodings for the data source.
DataSource(const std::string &connInfo)
EncodingType
Supported character encodings.
te::da::DataSource * Build(const te::core::URI &uri)
#define TEOGREXPORT
You can use this macro in order to export/import classes and functions from this module.
Proxy configuration file for TerraView (see terraview_config.h).
An exception class for the XML module.