[Pywps-commits] r1121 - branches/pywps-3.2-soap/pywps/Wps
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Feb 8 18:24:55 CET 2011
Author: jesus
Date: 2011-02-08 18:24:55 +0100 (Tue, 08 Feb 2011)
New Revision: 1121
Modified:
branches/pywps-3.2-soap/pywps/Wps/DescribeProcess.py
Log:
replacement of <MimeType>None</MimeType> from None to application/x-empty. Only necessary in DescribeProcess
Modified: branches/pywps-3.2-soap/pywps/Wps/DescribeProcess.py
===================================================================
--- branches/pywps-3.2-soap/pywps/Wps/DescribeProcess.py 2011-02-08 15:25:07 UTC (rev 1120)
+++ branches/pywps-3.2-soap/pywps/Wps/DescribeProcess.py 2011-02-08 17:24:55 UTC (rev 1121)
@@ -54,7 +54,6 @@
#
self.templateProcessor.set("Processes",self.processesDescription())
-
self.response = self.templateProcessor.__str__()
return
@@ -107,6 +106,7 @@
processData["Dataoutputs"] = self.processOutputs(process)
processData["dataoutputslen"] = len(processData["Dataoutputs"])
processesData.append(processData)
+
return processesData
def processInputs(self,process):
@@ -239,7 +239,7 @@
return
def complexValue(self,inoutput,processInOutput):
- """Format complex value attributes
+ """Format complex value attributes, it also changes None format to application/x-empty
:param inoutput: :class:`pywps.Process.InAndOutputs.Input` or
:class:`pywps.Process.InAndOutputs.Output`
@@ -247,7 +247,8 @@
:param processInOutput: dictionary, where to store the parameters
in
"""
-
+
+
processInOutput["mimetype"] = inoutput.formats[0]["mimeType"]
processInOutput["encoding"] = inoutput.formats[0]["encoding"]
processInOutput["schema"] = inoutput.formats[0]["schema"]
@@ -259,6 +260,14 @@
"encoding":format["encoding"],
"schema":format["schema"]
})
+ #Check for None values, that are replaces by application/x-empty
+ if processInOutput["mimetype"] is None:
+ processInOutput["mimetype"]="application/x-empty"
+
+ #Jmdj: format["mimetype"] is None --> FILTER ; for format in processInOutput["Formats"] --> INTERACTOR
+ #format.__setitem__("mimetype","application/x-empty") --> SETTING KEY,VALUE (it cant'be format["mimetype"]="foo")
+ [format.__setitem__("mimetype","application/x-empty") for format in processInOutput["Formats"] if format["mimetype"] is None]
+
return
def bboxValue(self,input,processInput):
More information about the Pywps-commits
mailing list