Loading...
Searching...
No Matches
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
29namespace 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
A class responsible to parse WMS XML files to WMS TerraLib data types.
Definition XMLParser.h:43
virtual Style parseStyle(const std::unique_ptr< te::xml::Reader > &reader)
virtual StyleURL parseStyleURL(const std::unique_ptr< te::xml::Reader > &reader)
std::string m_version
WMS version that XMLParser instance could read. Default implementation is 1.3.0.
Definition XMLParser.h:100
virtual HTTP parseHTTP(const std::unique_ptr< te::xml::Reader > &reader)
virtual Operation parseOperation(const std::unique_ptr< te::xml::Reader > &reader, const std::string &operationName)
virtual Request parseRequest(const std::unique_ptr< te::xml::Reader > &reader)
virtual Layer parseLayers(const std::unique_ptr< te::xml::Reader > &reader)
virtual GeographicBoundingBox parseGeographicBoundingBox(const std::unique_ptr< te::xml::Reader > &reader)
virtual WMSCapabilities parseCapabilitiesFromContent(const std::string &content)
Method responsible to parse a WMS XML GetCapabilities content and create an WMSCapabilities instance ...
virtual LegendURL parseLegendURL(const std::unique_ptr< te::xml::Reader > &reader)
virtual OnlineResource parseOnlineResource(const std::unique_ptr< te::xml::Reader > &reader)
virtual StyleSheetURL parseStyleSheetURL(const std::unique_ptr< te::xml::Reader > &reader)
virtual BoundingBox parseBoundingBox(const std::unique_ptr< te::xml::Reader > &reader)
virtual WMSCapabilities parseCapabilities(const std::string &xmlPath)
Method responsible to parse a WMS XML GetCapabilities file and create an WMSCapabilities instance wit...
virtual Dimension parseDimension(const std::unique_ptr< te::xml::Reader > &reader)
virtual Capability parseCapability(const std::unique_ptr< te::xml::Reader > &reader)
TerraLib.
The BoundingBox WMS 1.3.0 struct.
Definition DataTypes.h:91
The Capability WMS 1.3.0 struct.
Definition DataTypes.h:264
The Dimension WMS 1.3.0 struct.
Definition DataTypes.h:116
The GeographicBoundingBox WMS 1.3.0 struct.
Definition DataTypes.h:71
The Layer WMS 1.3.0 struct.
Definition DataTypes.h:213
The LegendURL WMS 1.3.0 struct.
Definition DataTypes.h:141
The OnlineResource WMS 1.3.0 struct.
Definition DataTypes.h:54
The Operation WMS 1.3.0 struct.
Definition DataTypes.h:160
The Request WMS 1.3.0 struct.
Definition DataTypes.h:251
The StyleSheeetURL WMS 1.3.0 struct.
Definition DataTypes.h:171
The StyleURL WMS 1.3.0 struct.
Definition DataTypes.h:186
The Style WMS 1.3.0 struct.
Definition DataTypes.h:198
The Capability WMS 1.3.0 struct.
Definition DataTypes.h:276
#define TEOGCWMSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition Config.h:111
Specifies containers for WMS data types.