Changeset 3419
- Timestamp:
- 14/02/08 14:09:52 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/DIF.py
r3159 r3419 10 10 from ndgObject import ndgObject 11 11 from stubB import collapse2 12 import urllib 13 12 14 try: #python 2.5 13 15 from xml.etree import ElementTree as ET … … 169 171 #services 170 172 self.services=[] 171 173 174 # not all DIFs have KML resource available - set default value 175 # to the entryID for checking later on 176 self.kmlURL = self.entryID 172 177 for item in helper.findall(self.tree,'Related_URL'): 178 contentType=helper.getText(item,'URL_Content_Type') 179 serviceURL=helper.cleanup.undo(helper.getText(item,'URL')) 173 180 self.services.append( 174 181 DIFService( 175 helper.getText(item,'URL_Content_Type'),176 helper.cleanup.undo(helper.getText(item,'URL')),182 contentType, 183 serviceURL, 177 184 helper.getText(item,'Description') )) 185 # if there is a KML URL, encode it and add it as a field for 186 # easy access to store in session data for selectedItems 187 # NB, it needs to be encoded to avoid problems whilst sending 188 # via AJAX 189 if contentType.find('KML') > 0: 190 # NB, adding the '' to quote forces forward slashes to be replaced 191 self.kmlURL = urllib.quote(serviceURL,'') 178 192 179 193 if self.ndgObject is None:
Note: See TracChangeset
for help on using the changeset viewer.