source: MILK/trunk/milk_server/milk_server/controllers/browse/browserconstants.py @ 5844

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/MILK/trunk/milk_server/milk_server/controllers/browse/browserconstants.py@5844
Revision 5844, 3.0 KB checked in by sdonegan, 12 years ago (diff)

Updates to allow proper paging as per num of search results and ordering of orderby without letter prefix

Line 
1'''
2 Module to store various constants used by the browse and discovery controllers
3 NB, the primary purpose of this is to separate these out from the controllers
4 so they can be used in the test suite to check results
5 
6 @author: C Byrom, Tessella May 2009
7'''
8DISCOVERY_HOME_TITLE = "Discovery service search (Beta release)"
9DISCOVERY_HELP_EMAIL = "ceda@stfc.ac.uk"
10OAI_PROVIDER_PAGE = "http://ndg3beta.badc.rl.ac.uk/oai-info-editor/home"
11
12'''#ORDERBY_SENSIBLE_NAMES = {'textRelevance':'Text matches',
13                          'datasetOrder':'Dataset name',
14                          'dataCentre':'Data centre name',
15                          'datasetStartDate':'Dataset start date',
16                          'datasetEndDate':'Dataset end date',                         
17                          'datasetLinkedPopularity':'Popularity of dataset by links followed',
18                          'datasetResultsetPopularity':'Number of times dataset included in other results',
19                          'proximity':'Proximity to centre of spatial search',
20                          'proximityNearMiss':'Results not in but within 10% of original AOI',
21                          'datasetUpdateOrder':'Date of most recent change to metadata',
22                          'discoveryIngestDate':'Date of ingest into DDS catalogue'
23                         }'''
24
25ORDERBY_SENSIBLE_NAMES = {'Text matches':'textRelevance',
26                          'Dataset name':'datasetOrder',
27                          'Data centre name':'dataCentre',
28                          'Dataset start date':'datasetStartDate',
29                          'Dataset end date':'datasetEndDate',                         
30                          'Popularity of dataset by links followed':'datasetLinkedPopularity',
31                          'Number of times dataset included in other results':'datasetResultsetPopularity',
32                          'Proximity to centre of spatial search':'proximity',
33                          'Results not in but within 10% of original AOI':'proximityNearMiss',
34                          'Date of most recent change to metadata':'datasetUpdateOrder',
35                          'Date of ingest into DDS catalogue':'discoveryIngestDate'
36                          }
37
38#Use this list to provide the order of ordering indexes in list - can omit any too
39ORDERING_KEY=['Text matches','Dataset name','Data centre name','Dataset start date','Dataset end date','Popularity of dataset by links followed','Popularity of dataset by links followed',
40              'Number of times dataset included in other results','Proximity to centre of spatial search','Date of most recent change to metadata','Date of ingest into DDS catalogue']
41             
42
43# various error messages
44INCOMPLETE_SEARCH_INPUT_MESSAGE = "Incomplete search inputs - please enter values for: "
45INVALID_BBOX_MESSAGE = "Invalid bounding box dimensions entered: "
46INVALID_DATERANGE_MESSAGE = "Invalid dates entered: "
47INCOMPLETE_DATERANGE_MESSAGE = "Incomplete date range entered: "
Note: See TracBrowser for help on using the repository browser.