[Pywps-commits] r487 - in trunk/pywps: Templates WPS etc
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon May 26 18:05:26 CEST 2008
Author: sebastianh
Date: 2008-05-26 18:05:25 +0200 (Mon, 26 May 2008)
New Revision: 487
Modified:
trunk/pywps/Templates/GetCapabilities.tmpl
trunk/pywps/WPS/GetCapabilities.py
trunk/pywps/etc/pywps.cfg
Log:
GetCapabilities-document improvements
Modified: trunk/pywps/Templates/GetCapabilities.tmpl
===================================================================
--- trunk/pywps/Templates/GetCapabilities.tmpl 2008-05-17 14:04:45 UTC (rev 486)
+++ trunk/pywps/Templates/GetCapabilities.tmpl 2008-05-26 16:05:25 UTC (rev 487)
@@ -2,18 +2,18 @@
<wps:Capabilities service="WPS" version="1.0.0" xml:lang="<TMPL_VAR lang>" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:wps="http://www.opengis.net/wps/1.0.0" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 ..\wpsGetCapabilities_response.xsd" updateSequence="1">
<ows:ServiceIdentification>
<ows:Title><TMPL_VAR servertitle></ows:Title>
- <TMPL_IF serverAbstract>
+ <TMPL_IF serverabstract>
<ows:Abstract><TMPL_VAR serverabstract></ows:Abstract>
</TMPL_IF>
- <TMPL_IF keywords>
+ <TMPL_IF Keywords>
<ows:Keywords>
- <TMPL_LOOP keywords>
+ <TMPL_LOOP Keywords>
<ows:Keyword><TMPL_VAR keyword></ows:Keyword>
</TMPL_LOOP>
</ows:Keywords>
</TMPL_IF>
<ows:ServiceType>WPS</ows:ServiceType>
- <TMPL_LOOP versions>
+ <TMPL_LOOP Versions>
<ows:ServiceTypeVersion><TMPL_VAR version></ows:ServiceTypeVersion>
</TMPL_LOOP>
<TMPL_IF fees>
@@ -25,24 +25,24 @@
</ows:ServiceIdentification>
<ows:ServiceProvider>
<ows:ProviderName><TMPL_VAR providername></ows:ProviderName>
- <TMPL_IF providerSite>
+ <TMPL_IF providersite>
<ows:ProviderSite xlink:href="<TMPL_VAR providersite>"/>
</TMPL_IF>
<ows:ServiceContact>
- <TMPL_IF individualName>
+ <TMPL_IF individualname>
<ows:IndividualName><TMPL_VAR individualname></ows:IndividualName>
</TMPL_IF>
- <TMPL_IF positionName>
+ <TMPL_IF positionname>
<ows:PositionName><TMPL_VAR positionname></ows:PositionName>
</TMPL_IF>
<ows:ContactInfo>
<TMPL_IF phone>
<ows:Phone>
- <TMPL_IF phoneVoice>
- <ows:Voice><TMPL_VAR voicephone></ows:Voice>
+ <TMPL_IF phonevoice>
+ <ows:Voice><TMPL_VAR phonevoice></ows:Voice>
</TMPL_IF>
- <TMPL_IF phoneFascimile>
- <ows:Facsimile><TMPL_VAR fascimilephone></ows:Facsimile>
+ <TMPL_IF phonefacsimile>
+ <ows:Facsimile><TMPL_VAR phonefacsimile></ows:Facsimile>
</TMPL_IF>
</ows:Phone>
</TMPL_IF>
Modified: trunk/pywps/WPS/GetCapabilities.py
===================================================================
--- trunk/pywps/WPS/GetCapabilities.py 2008-05-17 14:04:45 UTC (rev 486)
+++ trunk/pywps/WPS/GetCapabilities.py 2008-05-26 16:05:25 UTC (rev 487)
@@ -46,12 +46,21 @@
#
self.templateProcessor.set("encoding",
self.wps.getConfigValue("wps","encoding"))
+ self.templateProcessor.set("lang",
+ self.wps.getConfigValue("wps","lang"))
self.templateProcessor.set("servertitle",
self.wps.getConfigValue("wps","title"))
self.templateProcessor.set("serverabstract",
self.wps.getConfigValue("wps","abstract"))
- self.templateProcessor.set("version",
- self.wps.getConfigValue("wps","version"))
+
+ keywordList=[]
+ for keyword in self.wps.getConfigValue("wps","keywords").split(','):
+ keywordList.append({'keyword':keyword.strip()})
+ self.templateProcessor.set("Keywords",keywordList)
+
+ self.templateProcessor.set("Versions",
+ [{'version':
+ self.wps.getConfigValue("wps","version")}])
self.templateProcessor.set("fees",
self.wps.getConfigValue("wps","fees"))
self.templateProcessor.set("constraints",
@@ -69,15 +78,15 @@
self.templateProcessor.set("providersite",
self.wps.getConfigValue("provider","providerSite"))
# phone
- if self.wps.getConfigValue("provider","voice") or \
- self.wps.getConfigValue("provider","fascimile"):
+ if self.wps.getConfigValue("provider","phoneVoice") or \
+ self.wps.getConfigValue("provider","phoneFacsimile"):
self.templateProcessor.set("phone", 1)
- if self.wps.getConfigValue("provider","voicephone"):
- self.templateProcessor.set("voicephone",
- self.wps.getConfigValue("provider","voice"))
- if self.wps.getConfigValue("provider","fascimilephone"):
- self.templateProcessor.set("fascimilephone",
- self.wps.getConfigValue("provider","fascimile"))
+ if self.wps.getConfigValue("provider","phoneVoice"):
+ self.templateProcessor.set("phonevoice",
+ self.wps.getConfigValue("provider","phoneVoice"))
+ if self.wps.getConfigValue("provider","phoneFacsimile"):
+ self.templateProcessor.set("phonefacsimile",
+ self.wps.getConfigValue("provider","phoneFacsimile"))
else:
self.templateProcessor.set("phone", 0)
Modified: trunk/pywps/etc/pywps.cfg
===================================================================
--- trunk/pywps/etc/pywps.cfg 2008-05-17 14:04:45 UTC (rev 486)
+++ trunk/pywps/etc/pywps.cfg 2008-05-26 16:05:25 UTC (rev 487)
@@ -20,8 +20,8 @@
country=eu
electronicMailAddress=login at server.org
providerSite=http://foo.bar
-voice=False
-fascimile=False
+phoneVoice=False
+phoneFacsimile=False
administrativeArea=False
[server]
More information about the Pywps-commits
mailing list