Ignore:
Timestamp:
04/07/07 14:01:52 (12 years ago)
Author:
domlowe
Message:

rolling back to Bryans last commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/controllers/csml_wcs.py

    r2700 r2701  
    1010 
    1111#NOTE, much of this is straight from WMS and needs to be overhauled. 
     12 
     13try: #python 2.5 
     14    from xml.etree import ElementTree as ET 
     15except ImportError: 
     16    try: 
     17        # if you've installed it yourself it comes this way 
     18        import ElementTree as ET 
     19    except ImportError: 
     20        # if you've egged it this is the way it comes 
     21        from elementtree import ElementTree as ET 
     22 
    1223import os, time, string, StringIO 
    1324 
     
    1627import ows_server.lib.validators as V 
    1728 
    18 from elementtree import ElementTree as ET 
    1929from ows_common import exceptions as OWS_E 
    2030from ows_common.wcs import * 
     
    2333 
    2434from ows_server.lib.csml_util import get_csml_doc, extractToNetCDF 
    25 from ows_server.lib.csml_cache import csmlCache, extractCache 
    26  
    27 from ows_server.controllers.status import StatusController 
     35from ows_server.lib.ndgInterface import interface 
    2836 
    2937from email.mime.multipart import MIMEMultipart 
     
    132140         
    133141        #get doc from cache or disk: 
    134         c.dataset = csmlCache[fileoruri] 
     142        c.dataset = interface.GetParsedCSML(fileoruri) 
    135143        if type(c.dataset) is str: 
    136144            #If not a csml datset is some message from exist such as 'access denied'            
     
    150158    # Dimension parameters Time, Elevation, etc. are handled separately 
    151159    def GetCoverage(self, fileoruri, version, format, identifier, boundingbox, timesequence, store=False, status=False): 
    152         try: 
     160            #try: 
    153161                    # Retrieve dataset and selected feature             
    154             dataset = csmlCache[fileoruri] 
     162            rstatus,dataset=interface.GetParsedCSML(fileoruri) 
     163            if not rstatus: raise ValueError(dataset) 
    155164            feature = dataset.getFeature(identifier) 
    156165            if feature is None: 
     
    231240                return Response(content=msg, mimetype='multipart')  
    232241                   
    233         except Exception, e: 
    234             if isinstance(e, OWS_E.OwsError): 
    235                 raise e 
    236             else: 
    237                 raise e 
    238                 #raise OWS_E.NoApplicableCode(e) 
    239          
    240          
     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         
Note: See TracChangeset for help on using the changeset viewer.