Changeset 2740 for TI05-delivery/ows_framework
- Timestamp:
- 23/07/07 09:41:35 (12 years ago)
- Location:
- TI05-delivery/ows_framework/trunk/ows_server/ows_server
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/routing.py
r2681 r2740 34 34 map.connect(':fileoruri/wcs', controller='csml_wcs') 35 35 map.connect(':file/status/:jobID', controller='status', action='getStatus') 36 map.connect('filestore/:file', controller='fetch', action='fetchFile') 36 37 37 38 # following is the shell for the rest of the ndg -
TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/csml_wcs.py
r2738 r2740 196 196 WCS DescribeCoverage operation 197 197 """ 198 self.features={} #dictionary to hold requested coverages 199 rstatus,c.dataset=interface.GetParsedCSML(fileoruri) 200 if not rstatus: raise ValueError(dataset) 201 for ident in identifiers.split(','): 202 feature = c.dataset.getFeature(ident) 203 if feature is None: 204 raise OWS_E.InvalidParameterValue('Coverage with id=%s not found'%ident, 'identifiers') 205 self.features[ident]=feature 206 c.covDescs=self._buildCoverageDescriptions() 207 r=render_response('wcs_DescribeCoverageResponse', format='xml') 208 r.headers['content-type'] = 'text/xml' 209 return r 210 198 try: 199 self.features={} #dictionary to hold requested coverages 200 rstatus,c.dataset=interface.GetParsedCSML(fileoruri) 201 if not rstatus: raise ValueError(c.dataset) 202 for ident in identifiers.split(','): 203 feature = c.dataset.getFeature(ident) 204 if feature is None: 205 raise OWS_E.InvalidParameterValue('Coverage with id=%s not found'%ident, 'identifiers') 206 self.features[ident]=feature 207 c.covDescs=self._buildCoverageDescriptions() 208 r=render_response('wcs_DescribeCoverageResponse', format='xml') 209 r.headers['content-type'] = 'text/xml' 210 return r 211 except Exception, e: 212 if isinstance(e, OWS_E.OwsError): 213 raise e 214 elif isinstance(e, ValueError): 215 if e.message == '<p> Access Denied </p><p>Not Logged in</p>': 216 c.msg=e.message 217 #h.redirect_to('/login') 218 return render_response('wcs_accessDenied', mimetype ='text/html') 219 else: 220 raise OWS_E.NoApplicableCode(e) 221 else: 222 raise OWS_E.NoApplicableCode(e) 211 223 212 224 @operation … … 291 303 r=render_response('wcs_getCoverageResponse', format='xml') 292 304 r.headers['content-type'] = 'text/xml' 305 #write ndgSec to text file and store with coverage file: 306 if 'ndgSec' in session: 307 textName=request.environ['paste.config']['app_conf']['publish_dir']+'/'+os.path.splitext(os.path.basename(filename))[0]+'.txt' 308 secText=open(textName, 'w') 309 securityinfo=str(session['ndgSec']) 310 secText.write(securityinfo) 311 secText.close() 293 312 return r 294 313 else:
Note: See TracChangeset
for help on using the changeset viewer.