XMLParser.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 
21 #ifndef __TERRALIB_WS_OGC_WMS_XMLPARSER_WMS_H
22 #define __TERRALIB_WS_OGC_WMS_XMLPARSER_WMS_H
23 
24 #include "DataTypes.h"
25 
26 // TerraLib
27 #include "../../../../xml.h"
28 
29 namespace te
30 {
31  namespace ws
32  {
33  namespace ogc
34  {
35  namespace wms
36  {
37  /*!
38  \class XMLParser
39 
40  \brief A class responsible to parse WMS XML files to WMS TerraLib data types.
41  */
43  {
44  public:
45 
47 
48  virtual ~XMLParser();
49 
50  /*!
51  \brief Method responsible to parse a WMS XML GetCapabilities file and
52  create an WMSCapabilities instance with document metadata.
53 
54  \param xmlPath path of the file that will be parsed.
55 
56  \return Return the WMS Server Capabilities
57  */
58  virtual WMSCapabilities parseCapabilities(const std::string& xmlPath);
59 
60  /*!
61  \brief Method responsible to parse a WMS XML GetCapabilities content and
62  create an WMSCapabilities instance with document metadata.
63 
64  \param cotent The content that will be parsed.
65 
66  \return Return the WMS Server Capabilities
67  */
68  virtual WMSCapabilities parseCapabilitiesFromContent(const std::string& content);
69 
70  virtual Capability parseCapability(const std::unique_ptr<te::xml::Reader>& reader);
71 
72  virtual Request parseRequest(const std::unique_ptr<te::xml::Reader>& reader);
73 
74  virtual Layer parseLayers(const std::unique_ptr<te::xml::Reader>& reader);
75 
76  virtual GeographicBoundingBox parseGeographicBoundingBox(const std::unique_ptr<te::xml::Reader>& reader);
77 
78  virtual BoundingBox parseBoundingBox(const std::unique_ptr<te::xml::Reader>& reader);
79 
80  virtual Dimension parseDimension(const std::unique_ptr<te::xml::Reader>& reader);
81 
82  virtual Style parseStyle(const std::unique_ptr<te::xml::Reader>& reader);
83 
84  virtual LegendURL parseLegendURL(const std::unique_ptr<te::xml::Reader>& reader);
85 
86  virtual OnlineResource parseOnlineResource(const std::unique_ptr<te::xml::Reader>& reader);
87 
88  virtual StyleSheetURL parseStyleSheetURL(const std::unique_ptr<te::xml::Reader>& reader);
89 
90  virtual StyleURL parseStyleURL(const std::unique_ptr<te::xml::Reader>& reader);
91 
92  virtual Operation parseOperation(const std::unique_ptr<te::xml::Reader>& reader, const std::string& operationName);
93 
94  virtual HTTP parseHTTP(const std::unique_ptr<te::xml::Reader>& reader);
95 
96  std::string getVersion();
97 
98  protected:
99 
100  std::string m_version; //!< WMS version that XMLParser instance could read. Default implementation is 1.3.0.
101 
102  };
103  }
104  }
105  }
106 }
107 
108 #endif //__TERRALIB_WS_OGC_WMS_XMLPARSER_WMS_H
te::ws::ogc::wms::XMLParser::parseLayers
virtual Layer parseLayers(const std::unique_ptr< te::xml::Reader > &reader)
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::ws::ogc::wms::XMLParser::~XMLParser
virtual ~XMLParser()
DataTypes.h
Specifies containers for WMS data types.
te::ws::ogc::wms::XMLParser::XMLParser
XMLParser()
te::ws::ogc::wms::XMLParser::parseDimension
virtual Dimension parseDimension(const std::unique_ptr< te::xml::Reader > &reader)
te::ws::ogc::wms::XMLParser::parseGeographicBoundingBox
virtual GeographicBoundingBox parseGeographicBoundingBox(const std::unique_ptr< te::xml::Reader > &reader)
te::ws::ogc::wms::XMLParser::parseCapabilitiesFromContent
virtual WMSCapabilities parseCapabilitiesFromContent(const std::string &content)
Method responsible to parse a WMS XML GetCapabilities content and create an WMSCapabilities instance ...
te::ws::ogc::wms::XMLParser::getVersion
std::string getVersion()
TEOGCWMSEXPORT
#define TEOGCWMSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:111
te::ws::ogc::wms::XMLParser::parseBoundingBox
virtual BoundingBox parseBoundingBox(const std::unique_ptr< te::xml::Reader > &reader)
te::ws::ogc::wms::HTTP
Definition: DataTypes.h:60
te::ws::ogc::wms::XMLParser::parseOnlineResource
virtual OnlineResource parseOnlineResource(const std::unique_ptr< te::xml::Reader > &reader)
te::ws::ogc::wms::XMLParser::parseCapabilities
virtual WMSCapabilities parseCapabilities(const std::string &xmlPath)
Method responsible to parse a WMS XML GetCapabilities file and create an WMSCapabilities instance wit...
te::ws::ogc::wms::Capability
The Capability WMS 1.3.0 struct.
Definition: DataTypes.h:264
te::ws::ogc::wms::WMSCapabilities
The Capability WMS 1.3.0 struct.
Definition: DataTypes.h:276
te::ws::ogc::wms::XMLParser::parseStyleSheetURL
virtual StyleSheetURL parseStyleSheetURL(const std::unique_ptr< te::xml::Reader > &reader)
te::ws::ogc::wms::LegendURL
The LegendURL WMS 1.3.0 struct.
Definition: DataTypes.h:141
te::ws::ogc::wms::Style
The Style WMS 1.3.0 struct.
Definition: DataTypes.h:198
te::ws::ogc::wms::XMLParser::parseStyle
virtual Style parseStyle(const std::unique_ptr< te::xml::Reader > &reader)
te::ws::ogc::wms::XMLParser::parseLegendURL
virtual LegendURL parseLegendURL(const std::unique_ptr< te::xml::Reader > &reader)
te::ws::ogc::wms::XMLParser::parseHTTP
virtual HTTP parseHTTP(const std::unique_ptr< te::xml::Reader > &reader)
te::ws::ogc::wms::Request
The Request WMS 1.3.0 struct.
Definition: DataTypes.h:251
te::ws::ogc::wms::Operation
The Operation WMS 1.3.0 struct.
Definition: DataTypes.h:160
te::ws::ogc::wms::XMLParser::parseOperation
virtual Operation parseOperation(const std::unique_ptr< te::xml::Reader > &reader, const std::string &operationName)
te::ws::ogc::wms::OnlineResource
The OnlineResource WMS 1.3.0 struct.
Definition: DataTypes.h:54
te::ws::ogc::wms::XMLParser::parseCapability
virtual Capability parseCapability(const std::unique_ptr< te::xml::Reader > &reader)
te::ws::ogc::wms::XMLParser::parseRequest
virtual Request parseRequest(const std::unique_ptr< te::xml::Reader > &reader)
te::ws::ogc::wms::Layer
The Layer WMS 1.3.0 struct.
Definition: DataTypes.h:213
te::ws::ogc::wms::BoundingBox
The BoundingBox WMS 1.3.0 struct.
Definition: DataTypes.h:91
te::ws::ogc::wms::XMLParser::parseStyleURL
virtual StyleURL parseStyleURL(const std::unique_ptr< te::xml::Reader > &reader)
te::ws::ogc::wms::GeographicBoundingBox
The GeographicBoundingBox WMS 1.3.0 struct.
Definition: DataTypes.h:71
te::ws::ogc::wms::StyleURL
The StyleURL WMS 1.3.0 struct.
Definition: DataTypes.h:186
te::ws::ogc::wms::XMLParser::m_version
std::string m_version
WMS version that XMLParser instance could read. Default implementation is 1.3.0.
Definition: XMLParser.h:100
te::ws::ogc::wms::StyleSheetURL
The StyleSheeetURL WMS 1.3.0 struct.
Definition: DataTypes.h:171
te::ws::ogc::wms::Dimension
The Dimension WMS 1.3.0 struct.
Definition: DataTypes.h:116
te::ws::ogc::wms::XMLParser
A class responsible to parse WMS XML files to WMS TerraLib data types.
Definition: XMLParser.h:43