[Pywps-commits] r1118 - in branches/pywps-3.2-soap/pywps: Templates/1_0_0 Templates/1_0_0/inc Wps Wps/Execute
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Feb 8 16:17:11 CET 2011
Author: jesus
Date: 2011-02-08 16:17:10 +0100 (Tue, 08 Feb 2011)
New Revision: 1118
Modified:
branches/pywps-3.2-soap/pywps/Templates/1_0_0/Execute.tmpl
branches/pywps-3.2-soap/pywps/Templates/1_0_0/inc/Execute_Data_Outputs.tmpl
branches/pywps-3.2-soap/pywps/Wps/Execute/__init__.py
branches/pywps-3.2-soap/pywps/Wps/__init__.py
Log:
only mimetype variable in template and python code
Modified: branches/pywps-3.2-soap/pywps/Templates/1_0_0/Execute.tmpl
===================================================================
--- branches/pywps-3.2-soap/pywps/Templates/1_0_0/Execute.tmpl 2011-02-08 14:45:07 UTC (rev 1117)
+++ branches/pywps-3.2-soap/pywps/Templates/1_0_0/Execute.tmpl 2011-02-08 15:17:10 UTC (rev 1118)
@@ -55,7 +55,7 @@
</ows:Abstract>
</TMPL_IF>
<TMPL_IF reference>
- <wps:Reference xlink:href="<TMPL_VAR reference>" method="<TMPL_VAR method>" mimeType="<TMPL_VAR mimeType>" encoding="<TMPL_VAR encoding>" schema="<TMPL_VAR schema>"/>
+ <wps:Reference xlink:href="<TMPL_VAR reference>" method="<TMPL_VAR method>" mimeType="<TMPL_VAR mimetype>" encoding="<TMPL_VAR encoding>" schema="<TMPL_VAR schema>"/>
<TMPL_IF header>
<wps:Header key="<TMPL_VAR key>" value="<TMPL_VAR value>" />
</TMPL_IF>
@@ -107,7 +107,7 @@
<ows:Abstract><TMPL_VAR abstract></ows:Abstract>
</TMPL_IF>
<TMPL_IF reference>
- <wps:Reference xlink:href="<TMPL_VAR reference>" mimeType="<TMPL_VAR mimeType>" encoding="<TMPL_VAR encoding>" schema="<TMPL_VAR schema>"/>
+ <wps:Reference xlink:href="<TMPL_VAR reference>" mimeType="<TMPL_VAR mimetype>" encoding="<TMPL_VAR encoding>" schema="<TMPL_VAR schema>"/>
<TMPL_ELSE>
<TMPL_INCLUDE Execute_Data_Outputs.tmpl>
</TMPL_IF>
Modified: branches/pywps-3.2-soap/pywps/Templates/1_0_0/inc/Execute_Data_Outputs.tmpl
===================================================================
--- branches/pywps-3.2-soap/pywps/Templates/1_0_0/inc/Execute_Data_Outputs.tmpl 2011-02-08 14:45:07 UTC (rev 1117)
+++ branches/pywps-3.2-soap/pywps/Templates/1_0_0/inc/Execute_Data_Outputs.tmpl 2011-02-08 15:17:10 UTC (rev 1118)
@@ -1,9 +1,9 @@
<TMPL_IF reference>
- <wps:Reference mimeType="<TMPL_VAR mimeType>" encoding="<TMPL_VAR encoding>" schema="<TMPL_VAR schema>" href="<TMPL_VAR href>">
+ <wps:Reference mimeType="<TMPL_VAR mimetype>" encoding="<TMPL_VAR encoding>" schema="<TMPL_VAR schema>" href="<TMPL_VAR href>">
<TMPL_ELSE>
<wps:Data>
<TMPL_IF complexdata>
- <wps:ComplexData mimeType="<TMPL_VAR mimeType>" schema="<TMPL_VAR schema>" encoding="<TMPL_VAR encoding>">
+ <wps:ComplexData mimeType="<TMPL_VAR mimetype>" schema="<TMPL_VAR schema>" encoding="<TMPL_VAR encoding>">
<TMPL_IF cdata>
<![CDATA[<TMPL_VAR complexdata>]]>
<TMPL_ELSE>
Modified: branches/pywps-3.2-soap/pywps/Wps/Execute/__init__.py
===================================================================
--- branches/pywps-3.2-soap/pywps/Wps/Execute/__init__.py 2011-02-08 14:45:07 UTC (rev 1117)
+++ branches/pywps-3.2-soap/pywps/Wps/Execute/__init__.py 2011-02-08 15:17:10 UTC (rev 1118)
@@ -787,7 +787,7 @@
if wpsInput.has_key("method"):
method = wpsInput["method"]
complexInput["method"] = method
- complexInput["mimeType"] = processInput.format["mimetype"]
+ complexInput["mimetype"] = processInput.format["mimetype"]
complexInput["encoding"] = processInput.format["encoding"]
if wpsInput.has_key("header") and wpsInput["header"]:
complexInput["header"] = 1
@@ -853,10 +853,9 @@
#Checks for the correct output and logs
self.checkMimeTypeOutput(output)
- complexOutput["mimeType"] = output.format["mimetype"]
+ complexOutput["mimetype"] = output.format["mimetype"]
complexOutput["encoding"] = output.format["encoding"]
complexOutput["schema"] = output.format["schema"]
-
return complexOutput
def _lineageBBoxOutput(self, output, bboxOutput):
@@ -941,11 +940,11 @@
#Checks for the correct output and logs
self.checkMimeTypeOutput(output)
- #In complexOutput the variable is mimeType
- complexOutput["mimeType"] = output.format["mimetype"]
+
+ complexOutput["mimetype"] = output.format["mimetype"]
complexOutput["encoding"] = output.format["encoding"]
complexOutput["schema"] = output.format["schema"]
-
+
if output.format["mimetype"] is not None:
# CDATA section in output
#attention to application/xml
@@ -1021,10 +1020,9 @@
templateOutput["reference"] = escape(owsreference)
- templateOutput["mimeType"] = output.format["mimetype"]
+ templateOutput["mimetype"] = output.format["mimetype"]
templateOutput["schema"] = output.format["schema"]
templateOutput["encoding"]=output.format["encoding"]
-
return templateOutput
def _samefile(self, src, dst):
@@ -1046,10 +1044,8 @@
Mainly used by: _asReferenceOutput,_complexOutput,_lineageComplexOutput,_lineageComplexReference
Note: checkMimeTypeIn will set the output's format from the first time
"""
-
try: # problem with exceptions ?!
mimeType=output.ms.file(output.value).split(';')[0]
-
if (output.format["mimetype"] is None) or (output.format["mimetype"]==""):
output.format["mimetype"]=mimeType
logging.debug("Since there is absolutely no mimeType information for %s, using libmagic mimeType %s " % (output.identifier,mimeType))
Modified: branches/pywps-3.2-soap/pywps/Wps/__init__.py
===================================================================
--- branches/pywps-3.2-soap/pywps/Wps/__init__.py 2011-02-08 14:45:07 UTC (rev 1117)
+++ branches/pywps-3.2-soap/pywps/Wps/__init__.py 2011-02-08 15:17:10 UTC (rev 1118)
@@ -119,7 +119,6 @@
templates = Templates.__path__[0]
if os.getenv("PYWPS_TEMPLATES"):
templates = os.path.abspath(os.getenv("PYWPS_TEMPLATES"))
-
if self.wps.inputs.has_key("request"):
if self.wps.inputs["request"] == "getcapabilities":
self.templateFile = os.path.join(templates,
@@ -148,7 +147,7 @@
if not processes:
processes = os.getenv("PYWPS_PROCESSES")
self.initProcesses(processes)
-
+
def _initFromDirectory(self,dirname):
import sys
More information about the Pywps-commits
mailing list