[Pywps-commits] r875 - in trunk/pywps: Templates/1_0_0 Wps

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Jan 4 21:03:17 CET 2010


Author: jachym
Date: 2010-01-04 21:03:16 +0100 (Mon, 04 Jan 2010)
New Revision: 875

Modified:
   trunk/pywps/Templates/1_0_0/GetCapabilities.tmpl
   trunk/pywps/Wps/GetCapabilities.py
Log:
applyed patch. Patch to support OWS Common elements: role, contactinstructions and hourseofservice, closing #1127; special thanks to tomkralidis

Modified: trunk/pywps/Templates/1_0_0/GetCapabilities.tmpl
===================================================================
--- trunk/pywps/Templates/1_0_0/GetCapabilities.tmpl	2010-01-04 17:21:08 UTC (rev 874)
+++ trunk/pywps/Templates/1_0_0/GetCapabilities.tmpl	2010-01-04 20:03:16 UTC (rev 875)
@@ -68,7 +68,19 @@
                                         </TMPL_IF>
 				</ows:Address>
                                 </TMPL_IF>
+                                <TMPL_IF providersite>
+				<ows:OnlineResource xlink:href="<TMPL_VAR providersite>"/>
+                                </TMPL_IF>
+                                <TMPL_IF hoursofservice>
+				<ows:HoursOfService><TMPL_VAR hoursofservice></ows:HoursOfService>
+                                </TMPL_IF>
+                                <TMPL_IF contactinstructions>
+				<ows:ContactInstructions><TMPL_VAR contactinstructions></ows:ContactInstructions>
+                                </TMPL_IF>
 			</ows:ContactInfo>
+                        <TMPL_IF role>
+			<ows:Role><TMPL_VAR role></ows:Role>
+                        </TMPL_IF>
 		</ows:ServiceContact>
 	</ows:ServiceProvider>
 	<ows:OperationsMetadata>

Modified: trunk/pywps/Wps/GetCapabilities.py
===================================================================
--- trunk/pywps/Wps/GetCapabilities.py	2010-01-04 17:21:08 UTC (rev 874)
+++ trunk/pywps/Wps/GetCapabilities.py	2010-01-04 20:03:16 UTC (rev 875)
@@ -137,6 +137,17 @@
         else:
            self.templateProcessor.set("address", 0)
 
+        # other ContactInfo
+        if self.wps.getConfigValue("provider","role"):
+            self.templateProcessor.set("role",
+                        self.wps.getConfigValue("provider","role"))
+        if self.wps.getConfigValue("provider","hoursofservice"):
+            self.templateProcessor.set("hoursofservice",
+                        self.wps.getConfigValue("provider","hoursofservice"))
+        if self.wps.getConfigValue("provider","contactinstructions"):
+            self.templateProcessor.set("contactinstructions",
+                        self.wps.getConfigValue("provider","contactinstructions"))
+
         # OperationsMetadata
         self.templateProcessor.set("Operations",
              [{"operation":"GetCapabilities",



More information about the Pywps-commits mailing list