Changeset 2697
- Timestamp:
- 04/07/07 09:30:23 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/csml_wcs.py
r2695 r2697 10 10 11 11 #NOTE, much of this is straight from WMS and needs to be overhauled. 12 13 try: #python 2.514 from xml.etree import ElementTree as ET15 except ImportError:16 try:17 # if you've installed it yourself it comes this way18 import ElementTree as ET19 except ImportError:20 # if you've egged it this is the way it comes21 from elementtree import ElementTree as ET22 23 12 import os, time, string, StringIO 24 13 … … 27 16 import ows_server.lib.validators as V 28 17 18 from elementtree import ElementTree as ET 29 19 from ows_common import exceptions as OWS_E 30 20 from ows_common.wcs import * … … 33 23 34 24 from ows_server.lib.csml_util import get_csml_doc, extractToNetCDF 35 from ows_server.lib.ndgInterface import interface 25 from ows_server.lib.csml_cache import csmlCache, extractCache 26 27 from ows_server.controllers.status import StatusController 36 28 37 29 from email.mime.multipart import MIMEMultipart … … 140 132 141 133 #get doc from cache or disk: 142 c.dataset = interface.GetParsedCSML(fileoruri)134 c.dataset = csmlCache[fileoruri] 143 135 if type(c.dataset) is str: 144 136 #If not a csml datset is some message from exist such as 'access denied' … … 158 150 # Dimension parameters Time, Elevation, etc. are handled separately 159 151 def GetCoverage(self, fileoruri, version, format, identifier, boundingbox, timesequence, store=False, status=False): 160 #try:152 try: 161 153 # Retrieve dataset and selected feature 162 rstatus,dataset=interface.GetParsedCSML(fileoruri) 163 if not rstatus: raise ValueError(dataset) 154 dataset = csmlCache[fileoruri] 164 155 feature = dataset.getFeature(identifier) 165 156 if feature is None: … … 240 231 return Response(content=msg, mimetype='multipart') 241 232 242 #except Exception, e: 243 # raise Exception,e 244 # if isinstance(e, OWS_E.OwsError): 245 # raise e 246 #else: 247 # raise OWS_E.NoApplicableCode(e) 248 249 233 except Exception, e: 234 if isinstance(e, OWS_E.OwsError): 235 raise e 236 else: 237 raise OWS_E.NoApplicableCode(e) 238 239
Note: See TracChangeset
for help on using the changeset viewer.