27 #include "../dataaccess/datasource/DataSourceTransactor.h" 28 #include "../common/StringUtils.h" 29 #include "../core/translator/Translator.h" 30 #include "../core/uri/URI.h" 31 #include "../core/uri/Utils.h" 38 #include <gdal_priv.h> 69 std::map<std::string, std::string>::const_iterator it = kvp.begin();
70 std::map<std::string, std::string>::const_iterator itend = kvp.end();
72 return std::auto_ptr<te::da::DataSourceTransactor>(
new Transactor(
m_uri.
uri(), kvp[
"COVERAGE_NAME"]));
83 std::map<std::string, std::string>::const_iterator it = kvp.begin();
84 std::map<std::string, std::string>::const_iterator itend = kvp.end();
88 GDALDataset* gds =
static_cast<GDALDataset*
>(GDALOpen(request.c_str(), GA_ReadOnly));
90 throw Exception(
TE_TR(
"Error establishing connection with the informed server!"));
114 GDALDataset* gds =
static_cast<GDALDataset*
>(GDALOpen(
m_uri.
uri().c_str(), GA_ReadOnly));
140 throw Exception(
TE_TR(
"The create() method is not supported by the WCS driver!"));
145 throw Exception(
TE_TR(
"The drop() method is not supported by the WCS driver!"));
157 std::string path = aux.
path();
161 GDALDataset* gds =
static_cast<GDALDataset*
>(GDALOpen(path.c_str(), GA_ReadOnly));
172 return std::vector<std::string>();
177 return std::vector<te::core::EncodingType>();
186 std::map<std::string, std::string>::const_iterator it = kvp.begin();
187 std::map<std::string, std::string>::const_iterator itend = kvp.end();
190 throw Exception(
TE_TR(
"The connection information is invalid. Missing the path parameter!"));
192 it = kvp.find(
"COVERAGE_NAME");
193 if (it == itend || it->second.empty())
194 throw Exception(
TE_TR(
"The connection information is invalid. Missing COVERAGE_NAME parameter!"));
bool exists(const std::string &connInfo)
Check the existence of a data source in a driver.
void open()
It opens the data source and makes it ready for using.
std::string path() const
Retrieving the path.
const te::da::SQLDialect * getDialect() const
It returns the data source SQL dialect, if there is one.
void close()
It closes the data source and clears all the resources used by its internal communication channel...
This XML Schema Document named xlinks xsd has been stored here based on the change request
Base exception class for plugin module.
It represents the SQL query dialect accepted by a given data source.
A class that represents the known capabilities of a specific data source, i.e. this class informs all...
bool isValid() const
Return if the given URI is valid or not.
#define TE_TR(message)
It marks a string in order to get translated.
std::string query() const
Retrieving the query.
void create(const std::string &connInfo)
It creates a new data source.
std::auto_ptr< te::da::DataSourceTransactor > getTransactor()
It returns the set of parameters used to set up the access channel to the underlying repository...
std::string getType() const
It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS, or MYSQL.
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).
DataSource(const std::string &connInfo)
te::da::DataSourceCapabilities capabilities
std::vector< te::core::EncodingType > getEncodings(const std::string &connInfo)
void drop(const std::string &connInfo)
It removes the data source with the connection information from a driver.
Implementation of the data source for the WCS driver.
const std::string & uri() const
Retrieving the full URI.
const te::da::DataSourceCapabilities & getCapabilities() const
It returns the known capabilities of the data source.
std::string BuildRequest(const std::string &serviceURL, const std::string &coverageName, const te::gm::Envelope *e=0)
static te::da::DataSourceCapabilities sm_capabilities
~DataSource()
Virtual destructor.
A class for representing an Uniform Resource Identifier (URI).
te::core::URI m_uri
The URI used to describe the datasource connection;.
TECOREEXPORT std::map< std::string, std::string > Expand(const std::string &query_str)
Split a query string into its components.
#define TE_WCS_DRIVER_IDENTIFIER
The WCS driver identifier string.
Implementation of the transactor for the WCS driver.
bool isOpened() const
It returns true if the data source is opened, otherwise it returns false.
static void setCapabilities(const te::da::DataSourceCapabilities &capabilities)
void verifyConnectionInfo() const