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" 35 #include "../../../core/CurlWrapper.h" 68 return std::unique_ptr<te::da::DataSourceTransactor>(
new Transactor(
m_wms));
84 m_wms->updateCapabilities();
121 wms.updateCapabilities();
152 return m_wms->getMap(request);
160 return m_wms->saveGetMap(request, filename);
168 return m_wms->getFeatureInfo(request);
188 if (connInfo.empty())
196 std::map<std::string, std::string>::const_iterator it = kvp.begin();
197 std::map<std::string, std::string>::const_iterator itend = kvp.end();
198 std::string usrDataDir, version, uri;
200 it = kvp.find(
"USERDATADIR");
201 if (it == itend || it->second.empty())
204 usrDataDir = it->second;
206 it = kvp.find(
"VERSION");
207 if (it == itend || it->second.empty())
210 version = it->second;
212 it = kvp.find(
"URI");
213 if (it == itend || it->second.empty())
238 return std::vector<std::string>();
243 return std::vector<te::core::EncodingType>();
252 std::map<std::string, std::string>::const_iterator it = kvp.begin();
253 std::map<std::string, std::string>::const_iterator itend = kvp.end();
255 it = kvp.find(
"URI");
256 if (it == itend || it->second.empty())
259 it = kvp.find(
"VERSION");
260 if (it == itend || it->second.empty())
263 it = kvp.find(
"USERDATADIR");
264 if (it == itend || it->second.empty())
void close()
It closes the data source and clears all the resources used by its internal communication channel...
void verifyConnectionInfo() const
This XML Schema Document named xlinks xsd has been stored here based on the change request
It represents the SQL query dialect accepted by a given data source.
const std::string saveGetMap(const te::ws::ogc::wms::WMSGetMapRequest &request, const std::string &filename)
It execute a WMS GetMap and save the result image on disk. The request will be based on WMSGetMapRequ...
std::shared_ptr< te::ws::ogc::WMSClient > getWMSClient()
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.
static te::da::DataSourceCapabilities sm_capabilities
#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.
const te::da::SQLDialect * getDialect() const
It returns the data source SQL dialect, if there is one.
std::string query() const
Retrieving the query.
boost::error_info< struct tag_error_description, std::string > ErrorDescription
The base type for error report messages.
void drop(const std::string &connInfo)
It removes the data source with the connection information from a driver.
std::vector< te::core::EncodingType > getEncodings(const std::string &connInfo)
Data Source for WS OGC WMS.
std::string getType() const
It returns the data source type name (in UPPER CASE). Ex: POSTGIS, SQLITE, WFS, WMS, or MYSQL.
std::shared_ptr< te::ws::ogc::WMSClient > m_wms
static void setCapabilities(const te::da::DataSourceCapabilities &capabilities)
te::da::DataSourceCapabilities capabilities
void create(const std::string &connInfo)
It creates a new data source.
std::unique_ptr< te::da::DataSourceTransactor > getTransactor()
It returns the set of parameters used to set up the access channel to the underlying repository...
The WMSGetFeatureInfoRequest WMS 1.3.0 struct.
The WMSGetMapResponse WMS 1.3.0 struct.
The WMSGetMapResponse WMS 1.3.0 struct.
DataSource(const std::string &connInfo)
Base exception class for WS Core Runtime Library.
Implementation of the data source for the WMS driver.
A class for representing an Uniform Resource Identifier (URI).
Implementation of the transactor for the WS OGC WMS.
te::ws::ogc::wms::WMSGetMapResponse getMap(const te::ws::ogc::wms::WMSGetMapRequest &request)
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.
const te::da::DataSourceCapabilities & getCapabilities() const
It returns the known capabilities of the data source.
#define TE_OGC_WMS_DRIVER_IDENTIFIER
The OGC WMS driver identifier string.
std::vector< std::string > getDataSourceNames(const std::string &connInfo)
It gets the data source names available in a driver.
void updateCapabilities()
Method to get the capabilities from a WMS server and store in m_capabilities member.
A class to retrieve information and data from a Web Map Service.
bool isValid() const
It checks if the data source is valid (available for using).
Implementation of the transactor for the WMS driver.
bool exists(const std::string &connInfo)
Check the existence of a data source in a driver.
bool isOpened() const
It returns true if the data source is opened, otherwise it returns false.
~DataSource()
Virtual destructor.
const te::ws::ogc::wms::WMSGetFeatureInfoResponse getFeatureInfo(const te::ws::ogc::wms::WMSGetFeatureInfoRequest &request)
The WMSGetMapRequest WMS 1.3.0 struct.