Ignore:
Timestamp:
28/02/08 15:24:20 (12 years ago)
Author:
cbyrom
Message:

Adjust code to allow multiple WMC docs to be selected in the selections
tab and displayed in the view tab. Also rename the display tab to 'details'
and add new exceptions to deal with URL lookup failures.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/lib/wmc_util.py

    r3536 r3544  
    1313from ndgUtils.ETxmlView import loadET,et2text, nsdumb 
    1414from ows_server.models.WMC import WMC 
     15from ows_common import exceptions 
    1516import urllib2 
    1617 
     
    6162    return render('conterra_aggregate', format='xml') 
    6263 
    63          
    6464 
    65 # Lookup a WMC doc and return it in the response     
     65     
    6666def GetWebMapContext(self): 
     67    """ 
     68    Lookup a WMC doc and return it in the response 
     69    """ 
    6770    # retrieve context data from the specifiled url 
    6871    endpoint = self.inputs['ENDPOINT'] 
    6972    if not endpoint: 
    70         raise ServiceException, "ENDPOINT parameter required" 
     73        raise exceptions.MissingParameterValue, "ENDPOINT parameter required" 
    7174    logger.info('Getting WebMapContext from endpoint: ' + endpoint) 
    7275 
     
    7477        filehandle = urllib2.urlopen(endpoint) 
    7578    except IOError: 
    76         raise ServiceException, "Could not access WMC endpoint: %s" % endpoint 
     79        raise exceptions.URLUnavailable, "Could not access WMC endpoint: %s" % endpoint 
    7780         
    7881    response.headers['Content-Type'] = 'text/xml' 
Note: See TracChangeset for help on using the changeset viewer.