joey: thuban/Extensions/wms capabilities.py,1.5,1.6
cvs@intevation.de
cvs at intevation.de
Thu Apr 1 12:17:02 CEST 2004
Author: joey
Update of /thubanrepository/thuban/Extensions/wms
In directory doto:/tmp/cvs-serv19005
Modified Files:
capabilities.py
Log Message:
Make this class a specialisation of WMSCapabilitiesParser as well.
Also execute grok() after loading or fetching capabilities, if that
went well, so that subsequent calls can already access the data.
Index: capabilities.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/wms/capabilities.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- capabilities.py 1 Apr 2004 10:06:13 -0000 1.5
+++ capabilities.py 1 Apr 2004 10:17:00 -0000 1.6
@@ -19,6 +19,8 @@
"""
Maintain WMS Capabilities
+Inherits methods from WMSCapabilitiesParser
+
class WMSCapabilities:
__init__ (resource xor filename xor nothing)
@@ -67,8 +69,9 @@
from Thuban import _
from ogclib.WMSClient import WMSClient
+from parser import WMSCapabilitiesParser
-class WMSCapabilities(WMSClient):
+class WMSCapabilities(WMSClient, WMSCapabilitiesParser):
"""
Thuban class to maintain capabilities. This class provides
methods to fetch, save and load capabilities as well as methods to
@@ -120,6 +123,9 @@
self.wmsVersion = "1.0"
self.capabilities = self.getCapabilities(resource, self.wmsVersion)
+ if self.capabilities:
+ self.grok(self.capabilities)
+
def saveCapabilities(self, fname):
"""Save capabilities to local file"""
@@ -142,6 +148,7 @@
input = open(fname, "r")
self.capabilities = input.read()
input.close()
+ self.grok(self.capabilities)
except IOError:
self.errorMsg = _("Can't open file '%s' for reading") % fname
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)