Parser classes used by parsing of OGC WPS Requests
Particular request packages:
Parser parses input parameters, send via HTTP Post or HTTP Get method. If send via HTTP Post, the input is usually XML file.
Each class in the package is resposible for each type of the request.
pywps.Parser.
Parser
(wps)¶Parent class for all request parsers.
wps
¶instace of pywps.Pywps
isSoap
¶indicates, whether the request is in Soap envelope or not
inputs
¶object, where results of parsing is stored
pywps.Parser.Get.
Get
(wps)¶Main Class for parsing HTTP GET request types
checkLanguage
()¶Check optional language parameter.
checkRequestType
()¶Find requested request type and import given request parser.
checkService
()¶Check mandatory service name parameter.
checkVersion
()¶Check mandatory version parameter.
parse
(queryString)¶Parse given string with parameters given in KVP encoding
Parameters: | queryString – string of parameters taken from URL in KVP encoding |
---|---|
Returns: | parsed inputs object |
pywps.Parser.Post.
Post
(wps)¶Main class for parsing of HTTP POST request types
document
¶DOM of input document
requestParser
¶pywps.Parser.GetCapabilities
, pywps.Parser.DescribeProcess
or pywps.Parser.Execute
checkLanguage
(node)¶Check optional language parameter.
checkRequestType
(node)¶Find requested request type and import given request parser.
checkService
(node)¶Check mandatory service name parameter.
Parameters: | node – xml.dom.Node , where to search |
---|
checkVersion
(node)¶Check optional language parameter.
getFirstChildNode
(document)¶Find first usable child node of the document (no comments)
getMaxFileSize
(maxFileSize)¶Convert given filesize string to number of bytes.
This is used mainly for the parsing of the value from the configuration file.
isSoapFirstChild
(document)¶Return first child of the document, if it is SOAP request, return first child of the body envelope
parse
(file)¶Parse parameters stored as XML file
Parameters: | file – input file object or class:java.io.BufferedReader |
---|---|
Returns: | parsed input object |