A class for representing an Uniform Resource Identifier (URI). More...
#include <URI.h>
Classes | |
| struct | Impl |
Public Member Functions | |
| std::string | fragment () const |
| Retrieving the fragment. More... | |
| std::string | host () const |
| Retrieving the host. More... | |
| bool | isValid () const |
| Return if the given URI is valid or not. More... | |
| URI & | operator= (const URI &other) |
| Assingment operator. More... | |
| std::string | password () const |
| Retrieving the password information. More... | |
| std::string | path () const |
| Retrieving the path. More... | |
| std::string | port () const |
| Retrieving the port. More... | |
| std::string | query () const |
| Retrieving the query. More... | |
| std::string | scheme () const |
| Retrieving the scheme. More... | |
| URI () | |
| Default constructor. More... | |
| URI (const std::string &uri) | |
| A constructor from a string. More... | |
| URI (const URI &other) | |
| Copy constructor. More... | |
| const std::string & | uri () const |
| Retrieving the full URI. More... | |
| std::string | user () const |
| Retrieving the user information. More... | |
| ~URI () | |
Private Member Functions | |
| void | encode () |
| Check if the uri_ contains any invalid character and parse it to his hexadecimal value. More... | |
| std::string | hexToLetter (int i) |
| void | parse () |
| Parse the URI stored in uri_ member. More... | |
| void | swap (URI &other) |
| Swap operation. More... | |
Private Attributes | |
| std::unique_ptr< Impl > | m_pimpl |
| te::core::URI::URI | ( | ) |
Default constructor.
Definition at line 57 of file URI.cpp.
References m_pimpl.
Referenced by operator=().
|
explicit |
| te::core::URI::URI | ( | const URI & | other | ) |
|
default |
Default destructor.
Referenced by URI().
|
private |
Check if the uri_ contains any invalid character and parse it to his hexadecimal value.
Definition at line 181 of file URI.cpp.
References hexToLetter(), and m_pimpl.
Referenced by parse().
| std::string te::core::URI::fragment | ( | ) | const |
Retrieving the fragment.
Definition at line 128 of file URI.cpp.
References m_pimpl.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_SUITE(), te::ws::ogc::wms::qt::WMSConnectorDialog::getConnectionInfo(), te::ws::ogc::wcs::qt::WCSConnectorDialog::getConnectionInfo(), main(), te::ws::ogc::wms::qt::WMSConnectorDialog::set(), and te::ws::ogc::wcs::qt::WCSConnectorDialog::set().
|
private |
| std::string te::core::URI::host | ( | ) | const |
Retrieving the host.
Definition at line 108 of file URI.cpp.
References m_pimpl.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_SUITE(), terralib4::Convert2T4DatabaseParams(), te::ado::DataSource::drop(), te::ado::DataSource::exists(), te::qt::af::XMLFormatter::format(), te::ws::ogc::wms::qt::WMSConnectorDialog::getConnectionInfo(), te::ws::ogc::wcs::qt::WCSConnectorDialog::getConnectionInfo(), te::ado::DataSource::getDataSourceNames(), GetTooltip(), te::qt::widgets::LayerPropertiesInfo::LayerPropertiesInfo(), main(), te::ado::MakeConnectionStr(), te::pgis::MakeConnectionStr(), te::gdal::MakePGConnectionStr(), te::qt::plugins::pgis::PostGISCreatorDialog::onApplyPushButtonPressed(), te::addressgeocoding::ConfigInputAddressDialog::onOkPushButtonClicked(), te::ws::ogc::wms::qt::WMSConnectorDialog::set(), te::ws::ogc::wcs::qt::WCSConnectorDialog::set(), te::qt::plugins::ogr::OGRConnectorDialog::setConnectionInfo(), te::qt::plugins::gdal::GDALConnectorDialog::setConnectionInfo(), te::qt::plugins::pgisRaster::PostGISConnectorDialog::setConnectionInfo(), te::qt::plugins::pgis::PostGISConnectorDialog::setConnectionInfo(), te::qt::plugins::ado::ADOConnectorDialog::setConnectionInfo(), te::ws::ogc::WCSClient::WCSClient(), and te::ws::ogc::WMSClient::WMSClient().
| bool te::core::URI::isValid | ( | ) | const |
Return if the given URI is valid or not.
Definition at line 133 of file URI.cpp.
References m_pimpl.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_SUITE(), terralib4::Convert2T4DatabaseParams(), te::gdal::DataSource::create(), te::ogr::DataSource::createOGRDataSource(), te::wcs::DataSource::exists(), te::wms::DataSource::exists(), te::wfs::DataSource::exists(), te::ws::ogc::wcs::da::DataSource::exists(), te::ws::ogc::wms::da::DataSource::exists(), te::gdal::DataSource::exists(), te::gdal::DataSource::isValid(), main(), te::da::DataSourceFactory::make(), terralib4::DataSource::open(), te::ogr::DataSource::open(), te::mem::DataSource::open(), te::gdal::DataSource::open(), te::ws::ogc::wcs::XMLParser::parseDescribeCoverage(), te::da::DataSourceInfo::setConnInfo(), te::wms::DataSource::verifyConnectionInfo(), te::wcs::DataSource::verifyConnectionInfo(), te::wfs::DataSource::verifyConnectionInfo(), te::ws::ogc::wcs::da::DataSource::verifyConnectionInfo(), and te::ws::ogc::wms::da::DataSource::verifyConnectionInfo().
| te::core::URI & te::core::URI::operator= | ( | const URI & | other | ) |
|
private |
Parse the URI stored in uri_ member.
It uses regex to validate and parse the given URI.
After this, if the given URI is valid, the match_ member will have the references to all parts of the URI.
The regex split the URI by using named groups in regex, "(?<name>...)", so knowing the group name, you can require the corresponding group, from match_.
| URIException | when the given URI isn't valid. |
Definition at line 147 of file URI.cpp.
References encode(), m_pimpl, regex_fragment, regex_host, regex_path, regex_port, regex_query, regex_scheme, and regex_userInfo.
Referenced by URI().
| std::string te::core::URI::password | ( | ) | const |
Retrieving the password information.
Definition at line 103 of file URI.cpp.
References m_pimpl.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_SUITE(), terralib4::Convert2T4DatabaseParams(), main(), te::ado::MakeConnectionStr(), te::pgis::MakeConnectionStr(), te::gdal::MakePGConnectionStr(), te::qt::plugins::pgis::PostGISCreatorDialog::onApplyPushButtonPressed(), te::ws::ogc::wms::qt::WMSConnectorDialog::set(), te::ws::ogc::wcs::qt::WCSConnectorDialog::set(), te::qt::plugins::pgisRaster::PostGISConnectorDialog::setConnectionInfo(), te::qt::plugins::pgis::PostGISConnectorDialog::setConnectionInfo(), te::qt::plugins::ado::ADOConnectorDialog::setConnectionInfo(), te::ws::ogc::WCSClient::WCSClient(), and te::ws::ogc::WMSClient::WMSClient().
| std::string te::core::URI::path | ( | ) | const |
Retrieving the path.
Definition at line 118 of file URI.cpp.
References m_pimpl.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_SUITE(), terralib4::Convert2T4DatabaseParams(), te::ogr::DataSource::drop(), te::ado::DataSource::drop(), te::wcs::DataSource::exists(), te::wms::DataSource::exists(), te::wfs::DataSource::exists(), te::ado::DataSource::exists(), te::qt::af::XMLFormatter::format(), te::ws::ogc::wms::qt::WMSConnectorDialog::getConnectionInfo(), te::ws::ogc::wcs::qt::WCSConnectorDialog::getConnectionInfo(), te::ado::DataSource::getDataSourceNames(), te::gdal::DataSource::getDataSourceNames(), GetTooltip(), te::qt::widgets::LayerPropertiesInfo::LayerPropertiesInfo(), main(), te::da::DataSourceFactory::make(), te::ado::MakeConnectionStr(), te::pgis::MakeConnectionStr(), te::gdal::MakePGConnectionStr(), te::addressgeocoding::ConfigInputAddressDialog::onOkPushButtonClicked(), terralib4::DataSource::open(), te::ws::ogc::wcs::XMLParser::parseDescribeCoverage(), PrintDataSetNames(), te::ws::ogc::wms::qt::WMSConnectorDialog::set(), te::ws::ogc::wcs::qt::WCSConnectorDialog::set(), te::qt::plugins::ogr::OGRConnectorDialog::setConnectionInfo(), te::qt::plugins::gdal::GDALConnectorDialog::setConnectionInfo(), te::qt::plugins::pgisRaster::PostGISConnectorDialog::setConnectionInfo(), te::qt::plugins::pgis::PostGISConnectorDialog::setConnectionInfo(), te::qt::plugins::ado::ADOConnectorDialog::setConnectionInfo(), te::wms::DataSource::verifyConnectionInfo(), te::wcs::DataSource::verifyConnectionInfo(), te::wfs::DataSource::verifyConnectionInfo(), te::ws::ogc::WCSClient::WCSClient(), and te::ws::ogc::WMSClient::WMSClient().
| std::string te::core::URI::port | ( | ) | const |
Retrieving the port.
Definition at line 113 of file URI.cpp.
References m_pimpl.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_SUITE(), te::ws::ogc::wms::qt::WMSConnectorDialog::getConnectionInfo(), te::ws::ogc::wcs::qt::WCSConnectorDialog::getConnectionInfo(), GetTooltip(), te::qt::widgets::LayerPropertiesInfo::LayerPropertiesInfo(), main(), te::pgis::MakeConnectionStr(), te::gdal::MakePGConnectionStr(), te::qt::plugins::pgis::PostGISCreatorDialog::onApplyPushButtonPressed(), te::ws::ogc::wms::qt::WMSConnectorDialog::set(), te::ws::ogc::wcs::qt::WCSConnectorDialog::set(), te::qt::plugins::pgisRaster::PostGISConnectorDialog::setConnectionInfo(), te::qt::plugins::pgis::PostGISConnectorDialog::setConnectionInfo(), te::ws::ogc::WCSClient::WCSClient(), and te::ws::ogc::WMSClient::WMSClient().
| std::string te::core::URI::query | ( | ) | const |
Retrieving the query.
Definition at line 123 of file URI.cpp.
References m_pimpl.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_SUITE(), terralib4::Convert2T4DatabaseParams(), te::ado::DataSource::create(), te::ogr::Transactor::createDataSet(), te::ogr::DataSource::createOGRDataSource(), terralib4::DataSource::exists(), te::ws::ogc::wcs::da::DataSource::exists(), te::ws::ogc::wms::da::DataSource::exists(), te::ws::ogc::wms::qt::WMSConnectorDialog::getConnectionInfo(), te::ws::ogc::wcs::qt::WCSConnectorDialog::getConnectionInfo(), GetTooltip(), te::wcs::DataSource::getTransactor(), te::pgis::ConnectionPool::initialize(), te::ws::ogc::wms::da::DataSource::isValid(), te::ws::ogc::wcs::da::DataSource::isValid(), main(), te::ado::MakeConnectionStr(), te::pgis::MakeConnectionStr(), te::gdal::MakePGConnectionStr(), te::qt::plugins::pgis::PostGISCreatorDialog::onApplyPushButtonPressed(), terralib4::DataSource::open(), te::wcs::DataSource::open(), te::ogr::DataSource::open(), te::ws::ogc::wms::da::DataSource::open(), te::ws::ogc::wcs::da::DataSource::open(), te::stmem::DataSource::open(), te::mem::DataSource::open(), te::ws::ogc::wms::qt::WMSConnectorDialog::set(), te::ws::ogc::wcs::qt::WCSConnectorDialog::set(), te::ws::ogc::wms::qt::WMSLayerSelectorDialog::set(), te::qt::plugins::pgisRaster::PostGISConnectorDialog::setConnectionInfo(), te::qt::plugins::pgis::PostGISConnectorDialog::setConnectionInfo(), te::wcs::DataSource::verifyConnectionInfo(), te::ws::ogc::wcs::da::DataSource::verifyConnectionInfo(), te::ws::ogc::wms::da::DataSource::verifyConnectionInfo(), te::ws::ogc::WCSClient::WCSClient(), and te::ws::ogc::WMSClient::WMSClient().
| std::string te::core::URI::scheme | ( | ) | const |
Retrieving the scheme.
Definition at line 93 of file URI.cpp.
References m_pimpl.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_SUITE(), te::gdal::DataSource::create(), te::gdal::DataSource::drop(), te::gdal::DataSource::exists(), te::ws::ogc::wms::qt::WMSConnectorDialog::getConnectionInfo(), te::ws::ogc::wcs::qt::WCSConnectorDialog::getConnectionInfo(), te::gdal::DataSource::getDataSourceNames(), GetTooltip(), te::gdal::DataSource::isValid(), te::qt::widgets::LayerPropertiesInfo::LayerPropertiesInfo(), main(), te::gdal::DataSource::open(), te::ws::ogc::wms::qt::WMSConnectorDialog::set(), te::ws::ogc::wcs::qt::WCSConnectorDialog::set(), te::ws::ogc::WCSClient::WCSClient(), and te::ws::ogc::WMSClient::WMSClient().
|
private |
| const std::string & te::core::URI::uri | ( | ) | const |
Retrieving the full URI.
Definition at line 88 of file URI.cpp.
References m_pimpl.
Referenced by BOOST_AUTO_TEST_CASE(), te::ws::ogc::WMSClient::build111GetFeatureInfoURL(), te::ws::ogc::WMSClient::build111GetMapRequestURL(), te::ws::ogc::WMSClient::build130GetFeatureInfoURL(), te::ws::ogc::WMSClient::build130GetMapRequestURL(), te::gdal::DataSource::create(), te::ogr::DataSource::createOGRDataSource(), te::ws::core::CurlWrapper::customRequest(), te::ws::ogc::WCSClient::describeCoverage(), te::gdal::DataSource::drop(), te::ogr::DataSource::exists(), te::gdal::DataSource::exists(), te::ws::core::CurlWrapper::get(), te::da::DataSourceInfo::getConnInfoAsString(), te::ws::ogc::WCSClient::getCoverage(), te::ogr::DataSource::getDataSourceNames(), te::gdal::DataSource::getDataSourceNames(), te::wms::DataSource::getTransactor(), te::wcs::DataSource::getTransactor(), te::wcs::DataSource::isValid(), te::wms::DataSource::isValid(), te::wfs::DataSource::isValid(), te::gdal::DataSource::isValid(), te::ws::core::CurlWrapper::listFiles_(), terralib4::DataSource::open(), te::wms::DataSource::open(), te::wcs::DataSource::open(), te::ogr::DataSource::open(), te::wfs::DataSource::open(), te::gdal::DataSource::open(), te::ws::core::CurlWrapper::post(), te::ws::core::CurlWrapper::putFile(), te::qt::plugins::wcs::WCSConnectorDialog::set(), te::qt::plugins::wms::WMSConnectorDialog::set(), te::qt::plugins::wfs::WFSConnectorDialog::set(), te::ws::ogc::WMSClient::updateCapabilities(), te::ws::ogc::WCSClient::updateCapabilities(), and URI().
| std::string te::core::URI::user | ( | ) | const |
Retrieving the user information.
Definition at line 98 of file URI.cpp.
References m_pimpl.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_SUITE(), terralib4::Convert2T4DatabaseParams(), GetTooltip(), te::qt::widgets::LayerPropertiesInfo::LayerPropertiesInfo(), main(), te::ado::MakeConnectionStr(), te::pgis::MakeConnectionStr(), te::gdal::MakePGConnectionStr(), te::qt::plugins::pgis::PostGISCreatorDialog::onApplyPushButtonPressed(), te::ws::ogc::wms::qt::WMSConnectorDialog::set(), te::ws::ogc::wcs::qt::WCSConnectorDialog::set(), te::qt::plugins::pgisRaster::PostGISConnectorDialog::setConnectionInfo(), te::qt::plugins::pgis::PostGISConnectorDialog::setConnectionInfo(), te::ws::ogc::WCSClient::WCSClient(), and te::ws::ogc::WMSClient::WMSClient().
|
private |