29 #include "../../../../common/StringUtils.h" 30 #include "../../../../core/translator/Translator.h" 31 #include "../../../../core/uri/URI.h" 32 #include "../../../../core/uri/Utils.h" 33 #include "../../../../dataaccess/datasource/DataSourceTransactor.h" 34 #include "../../../core/Exception.h" 66 return std::unique_ptr<te::da::DataSourceTransactor>(
new Transactor(
m_wcs));
82 m_wcs->updateCapabilities();
119 wcs.updateCapabilities();
151 throw Exception(
TE_TR(
"The create() method is not supported by the WCS driver!"));
156 throw Exception(
TE_TR(
"The drop() method is not supported by the WCS driver!"));
161 if (connInfo.empty())
169 std::map<std::string, std::string>::const_iterator it = kvp.begin();
170 std::map<std::string, std::string>::const_iterator itend = kvp.end();
171 std::string usrDataDir, version, uri;
173 it = kvp.find(
"USERDATADIR");
174 if (it == itend || it->second.empty())
177 usrDataDir = it->second;
179 it = kvp.find(
"VERSION");
180 if (it == itend || it->second.empty())
183 version = it->second;
185 it = kvp.find(
"URI");
186 if (it == itend || it->second.empty())
209 return std::vector<std::string>();
214 return std::vector<te::core::EncodingType>();
223 std::map<std::string, std::string>::const_iterator it = kvp.begin();
224 std::map<std::string, std::string>::const_iterator itend = kvp.end();
226 it = kvp.find(
"URI");
227 if (it == itend || it->second.empty())
228 throw Exception(
TE_TR(
"The connection information is invalid. Missing URI parameter!"));
230 it = kvp.find(
"VERSION");
231 if (it == itend || it->second.empty())
232 throw Exception(
TE_TR(
"The connection information is invalid. Missing VERSION parameter!"));
234 it = kvp.find(
"USERDATADIR");
235 if (it == itend || it->second.empty())
236 throw Exception(
TE_TR(
"The connection information is invalid. Missing USERDATADIR parameter!"));
Implementation of the data source for the WCS driver.
std::string getType() const
It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS, or MYSQL.
bool exists(const std::string &connInfo)
Check the existence of a data source in a driver.
Base exception class for plugin module.
#define TE_OGC_WCS_DRIVER_IDENTIFIER
The OGC WCS driver identifier string.
Data Source for WS OGC WCS.
It represents the SQL query dialect accepted by a given data source.
const te::da::DataSourceCapabilities & getCapabilities() const
It returns the known capabilities of the data source.
bool isValid() const
It checks if the data source is valid (available for using).
void create(const std::string &connInfo)
It creates a new 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.
void open()
It opens the data source and makes it ready for using.
std::string query() const
Retrieving the query.
std::shared_ptr< te::ws::ogc::WCSClient > getWCSClient() const
bool isOpened() const
It returns true if the data source is opened, otherwise it returns false.
void verifyConnectionInfo() const
void updateCapabilities()
Method to get the capabilities from a WCS server and store in m_capabilities member.
te::da::DataSourceCapabilities capabilities
void close()
It closes the data source and clears all the resources used by its internal communication channel...
A class to retrieve information and data from a Web Coverage Service.
static void setCapabilities(const te::da::DataSourceCapabilities &capabilities)
Base exception class for WS Core Runtime Library.
std::shared_ptr< te::ws::ogc::WCSClient > m_wcs
DataSource(const std::string &connInfo)
A class for representing an Uniform Resource Identifier (URI).
std::vector< te::core::EncodingType > getEncodings(const std::string &connInfo)
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.
Exception classes for the WS Core Runtime Library.
~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...
void drop(const std::string &connInfo)
It removes the data source with the connection information from a driver.
std::vector< std::string > getDataSourceNames(const std::string &connInfo)
It gets the data source names available in a driver.
const te::da::SQLDialect * getDialect() const
It returns the data source SQL dialect, if there is one.
Implementation of the transactor for the WCS driver.
static te::da::DataSourceCapabilities sm_capabilities
Implementation of the transactor for the WS OGC WCS.