26 #ifndef __TERRALIB_TERRALIB4_INTERNAL_DATASOURCE_H
27 #define __TERRALIB_TERRALIB4_INTERNAL_DATASOURCE_H
30 #include "../dataaccess/datasource/DataSource.h"
31 #include "../dataaccess/datasource/DataSourceCapabilities.h"
69 void create(
const std::map<std::string, std::string>& dsInfo);
71 void drop(
const std::map<std::string, std::string>& dsInfo);
73 bool exists(
const std::map<std::string, std::string>& dsInfo);
75 std::vector<std::string>
getDataSourceNames(
const std::map<std::string, std::string>& dsInfo);
77 std::vector<std::string>
getEncodings(
const std::map<std::string, std::string>& dsInfo);
90 #endif // __TERRALIB_TERRALIB4_INTERNAL_DATASOURCE_H
std::auto_ptr< te::da::DataSourceTransactor > getTransactor()
It returns an object that can execute transactions in the context of a data source.
bool isValid() const
It checks if the data source is valid (available for using).
void create(const std::map< std::string, std::string > &dsInfo)
It creates a new data source.
~DataSource()
Virtual destructor.
const te::da::SQLDialect * getDialect() const
It returns the data source SQL dialect, if there is one.
std::string getType() const
It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS, or MYSQL.
const std::map< std::string, std::string > & getConnectionInfo() const
It returns the set of parameters used to set up the access channel to the underlying repository...
std::map< std::string, std::string > m_dbInfo
TeDatabase * getTerralib4Db()
static te::da::SQLDialect * sm_dialect
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
bool exists(const std::map< std::string, std::string > &dsInfo)
Check the existence of a data source in a driver.
void drop(const std::map< std::string, std::string > &dsInfo)
It removes the data source with the connection information from a driver.
std::vector< std::string > getEncodings(const std::map< std::string, std::string > &dsInfo)
It gets the encodings for the data source.
void setConnectionInfo(const std::map< std::string, std::string > &connInfo)
It sets the connection information to be used when connecting to the data source. ...
It represents the SQL query dialect accepted by a given data source.
static te::da::DataSourceCapabilities sm_capabilities
bool isOpened() const
It returns true if the data source is opened, otherwise it returns false.
void open()
It opens the data source and makes it ready for using.
An abstract class for data providers like a DBMS, Web Services or a regular file. ...
std::vector< std::string > getDataSourceNames(const std::map< std::string, std::string > &dsInfo)
It gets the data source names available in a driver.
const te::da::DataSourceCapabilities & getCapabilities() const
It returns the known capabilities of the data source.
void close()
It closes the data source and clears all the resources used by its internal communication channel...