source: TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/routing.py @ 3606

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI05-delivery/ows_framework/trunk/ows_server/ows_server/config/routing.py@3606
Revision 3606, 3.4 KB checked in by cbyrom, 14 years ago (diff)

Adding routing for the removeViewItems function - to allow users to remove layers in the view tab.

Line 
1#
2# $Id$
3#
4"""
5Setup your Routes options here
6"""
7import os
8from routes import Mapper
9
10def make_map():
11    root_path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
12
13    map = Mapper(directory=os.path.join(root_path, 'controllers'))
14   
15    # This route handles displaying the error page and graphics used in the 404/500
16    # error pages. It should likely stay at the top to ensure that the error page is
17    # displayed properly.
18    map.connect('error/:action/:id', controller='error')
19   
20    # Define your routes. The more specific and detailed routes should be defined first,
21    # so they may take precedent over the more generic routes. For more information, refer
22    # to the routes manual @ http://routes.groovie.org/docs/
23    #map.connect(':controller/:action/:id')
24    #map.connect('*url', controller='template', action='view')
25   
26    #WMS
27    map.connect(':file/wms', controller='csml_wms')  #should become obsolete
28    map.connect('wms/:uri', controller='csml_wms')
29   
30    #WCS
31    #map.connect(':file/status/:jobID', controller='status', action='getStatus')  #not used currently
32    #wcs controller for all versions: (called wcsx)
33    map.connect('wcs/:uri', controller='csml_wcsx')
34
35    #filestore - used for 'store' in wcs
36    map.connect('filestore/:file', controller='fetch', action='fetchFile')
37   
38    # following is the shell for the rest of the ndg
39   
40    map.connect('login', controller='login')
41    map.connect('getCredentials', controller='login', action='getCredentials')
42    map.connect('wayf', controller='login', action='wayf')
43    map.connect('logout', controller='logout')
44    map.connect('semantic',controller='discovery', action='semantic')
45    map.connect('view/:uri', controller = 'retrieve', action='view')
46    map.connect('askCorrect/:uri', controller='retrieve', action='askCorrect')
47    map.connect('correct/:uri', controller='retrieve', action='correct')
48    map.connect('retrieve/:uri', controller = 'retrieve')
49    map.connect('selectedItems',controller='selectedItems',action='index')
50    map.connect('viewItems',controller='viewItems',action='index')
51    map.connect('removeViewItem',controller='viewItems',action='index')
52    map.connect('addSelectedItem/:entryid/:kmlurl/:wmcurl/:title/:divid',
53                controller='selectedItems',action='addSelectedItem',kmlurl='',wmcurl='')
54    map.connect('unSelectItem/:entryid/:divid', controller='selectedItems',action='unSelectItem')
55    map.connect('removeSelectedItem/:entryid',controller='selectedItems',action='removeSelectedItem')
56    map.connect('visualise', controller='visualise', action='index')
57
58    # This route doesn't match the controller's parameters.
59    #map.connect('csml/:uri', controller='csml_api')
60    # Below is the way it worked before with added
61    #"csml" path component
62    #map.connect('csml/:file.:format', controller='csml_api', action='index',
63              #format='html')
64    #map.connect('csml/:file/:(feature).:format', action='getFeature',
65              #controller='csml_api', format='html')
66    #map.connect('csml/:file/:feature/:action', controller='csml_api')
67
68    map.connect('trackback/:uri', controller='trackback')
69    map.connect('discovery',controller='discovery')
70    map.connect('visualise/:dataset/:view',controller='visualise',action='tabChange')
71    map.connect('visualise/:view',controller='visualise',action='featureChange')
72    #do this last or else you'll get bizarre behaviour
73    map.connect('',controller='discovery',action='index')
74    return map
Note: See TracBrowser for help on using the repository browser.