Ignore:
Timestamp:
04/03/08 13:42:17 (12 years ago)
Author:
spascoe
Message:

Changed the way we associate a layerMapper with WMSController.

Location:
TI05-delivery/ows_framework/branches/ows_framework-refactor/ows_common/ows_common
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/branches/ows_framework-refactor/ows_common/ows_common/pylons/wms_controller.py

    r3553 r3554  
    1717from ows_common.model.wms import WmsDatasetSummary, Dimension 
    1818from ows_common.model import PossibleValues, BoundingBox, Contents 
    19 from ows_common.pylons import ows_controller, model 
     19from ows_common.pylons import ows_controller 
    2020from ows_common.exceptions import * 
    2121from ows_common import bbox_util 
    2222 
    2323class WMSController(ows_controller.OWSController): 
     24    """ 
     25    Subclass this controller in a pylons application and set the layerMapper 
     26    class attribute to implement a WMS. 
     27 
     28    @cvar layerMapper: an ows_common.service.wms_iface.ILayerMapper object. 
     29 
     30    """ 
     31    layerMapper = None 
    2432     
    2533    _pilImageFormats = { 
     
    5058 
    5159        """ 
    52         self.layers = model.getLayerMapper().map(**kwargs) 
     60        self.layers = self.layerMapper.map(**kwargs) 
    5361 
    5462    #------------------------------------------------------------------------- 
  • TI05-delivery/ows_framework/branches/ows_framework-refactor/ows_common/ows_common/service/wms_iface.py

    r3550 r3554  
    6969        raise NotImplementedError 
    7070 
     71    def getCacheKey(self, crs, dimValues=None, renderOpts={}): 
     72        """ 
     73        Create a unique key for use in caching a slab. 
     74 
     75        The intention here is that most of the work should be done when 
     76        instantiating an ILayerSlab object.  These can be cached by the 
     77        server for future use.  The server will first call getCacheKey() 
     78        for the slab creation arguments and if the key is in it's cache 
     79        it will use a pre-generated ILayerSlab object. 
     80 
     81        """ 
     82        raise NotImplementedError 
     83 
    7184 
    7285class IDimension(object): 
     
    106119        raise NotImplementedError 
    107120 
    108     def getCacheKey(self): 
    109         """ 
    110         Create a unique key for use in caching. 
    111  
    112         """ 
    113         raise NotImplementedError 
Note: See TracChangeset for help on using the changeset viewer.