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

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

Additions to make default search all and generate sensible list of orderby fields

RevLine 
[5261]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'''
[5489]8DISCOVERY_HOME_TITLE = "Discovery service search (Beta release)"
[5785]9DISCOVERY_HELP_EMAIL = "ceda@stfc.ac.uk"
10OAI_PROVIDER_PAGE = "http://ndg3beta.badc.rl.ac.uk/oai-info-editor/home"
[5261]11
[5785]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 = {'A.    Text matches':'textRelevance',
26                          'B.    Dataset name':'datasetOrder',
27                          'C.    Data centre name':'dataCentre',
28                          'D.    Dataset start date':'datasetStartDate',
29                          'E.    Dataset end date':'datasetEndDate',                         
30                          'F.    Popularity of dataset by links followed':'datasetLinkedPopularity',
31                          'G.    Number of times dataset included in other results':'datasetResultsetPopularity',
32                          'H.    Proximity to centre of spatial search':'proximity',
33                          'I.    Results not in but within 10% of original AOI':'proximityNearMiss',
34                          'J.    Date of most recent change to metadata':'datasetUpdateOrder',
35                          'K.    Date of ingest into DDS catalogue':'discoveryIngestDate'
36                          }
37
38
[5261]39# various error messages
40INCOMPLETE_SEARCH_INPUT_MESSAGE = "Incomplete search inputs - please enter values for: "
41INVALID_BBOX_MESSAGE = "Invalid bounding box dimensions entered: "
42INVALID_DATERANGE_MESSAGE = "Invalid dates entered: "
[5489]43INCOMPLETE_DATERANGE_MESSAGE = "Incomplete date range entered: "
Note: See TracBrowser for help on using the repository browser.