[Pywps-commits] r478 - trunk/pywps/WPS
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Apr 29 16:42:00 CEST 2008
Author: jachym
Date: 2008-04-29 16:42:00 +0200 (Tue, 29 Apr 2008)
New Revision: 478
Modified:
trunk/pywps/WPS/Execute.py
Log:
reference input added
Modified: trunk/pywps/WPS/Execute.py
===================================================================
--- trunk/pywps/WPS/Execute.py 2008-04-23 14:04:31 UTC (rev 477)
+++ trunk/pywps/WPS/Execute.py 2008-04-29 14:42:00 UTC (rev 478)
@@ -372,6 +372,7 @@
for identifier in self.process.inputs.keys():
templateInput = {}
input = self.process.inputs[identifier]
+ wpsInput = self.wps.inputs["datainputs"][identifier]
templateInput["identifier"] = input.identifier
templateInput["title"] = input.title
@@ -381,6 +382,9 @@
if input.type == "LiteralValue":
templateInput = self._lineageLiteralInput(input,templateInput)
+ elif wpsInput["type"] == "ComplexValueReference":
+ templateInput = self._lineageComplexReferenceInput(wpsInput,
+ input,templateInput)
elif input.type == "ComplexValue":
templateInput = self._lineageComplexInput(input,templateInput)
elif input.type == "BoundingBoxValue":
@@ -400,12 +404,34 @@
"""
Fill input of complex data
"""
+ print dir(input)
+ print input.type, self.wps.inputs
complexInput["complexdata"] = input.value
complexInput["encoding"] = input.format["encoding"]
complexInput["mimetype"] = input.format["mimeType"]
complexInput["schema"] = input.format["schema"]
return complexInput
+ def _lineageComplexReferenceInput(self, wpsInput, processInput, complexInput):
+ """
+ Fill reference input
+
+ wpsInput - asociative field of self.wps.inputs["datainputs"]
+ processInput - self.process.inputs
+ """
+ complexInput["reference"] = wpsInput["value"]
+ complexInput["method"] = wpsInput["method"]
+ complexInput["mimeType"] = processInput.format["mimeType"]
+ complexInput["encoding"] = processInput.format["encoding"]
+ if wpsInput["header"]:
+ complexInput["header"] = 1
+ complexInput["key"] = wpsInput["header"].keys()[0]
+ complexInput["value"] = wpsInput["header"][wpsInput["header"].keys()[0]]
+ if wpsInput["body"]:
+ complexInput["body"] = wpsInput["body"]
+ if wpsInput["bodyreference"]:
+ complexInput["bodyReference"] = wpsInput["bodyreference"]
+
def _lineageBBoxInput(self,input,bboxInput):
"""
Fill input of bbox data
More information about the Pywps-commits
mailing list