source: TI03-DataExtractor/branches/old_stuff/dx_source/for_usr_local/dx/doc/understanding_the_dx.txt @ 793

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/branches/old_stuff/dx_source/for_usr_local/dx/doc/understanding_the_dx.txt@793
Revision 793, 2.5 KB checked in by astephen, 13 years ago (diff)

Put all the old code in the old_stuff branch.

Line 
1Understanding the dx
2
3(see also the web page "dx objects")
4
5Common usage control flow
6
71. Session initiation
8
9
10A user enters the data extractor with an optional dictionary of arguments.
11
12The arguments are passed to an instance of the ControlExtract class. This controls the flow of all processes within the dx session.
13
14The full dx package is imported so that other classes are visible.
15Configuration data is read from the configuration file (config.py).
16
17Arguments are parsed by the _parseArgs() method and then stored in a Requestdb class instance. Requestdb is a class wrapper around a python shelve database which is a set of python variables serialised into a dictionary on disk. When the first arguments are provided, the Requestdb object is created and given a requestID (the filename of the shelve object). If the requestID has been provided as an argument then the appropriate shelve object is opened to read all the other arguments in. Requestdb preserves state between multiple calls of the dx.
18
19If the RESTRICTED_DATA configuration variable is switched on then ControlExtract then calls the Security class to check whether a user can be authenticated and if so return a list of the allowed groups (i.e. dataset IDs) that they are allowed to view.
20
21ControlExtract can then begin to create an interface using its _createInterface() method. This calls the appropriate interface class from (CGIInterface, CommandLineInterface and WebServiceInterface - only the first of these exists at present). The CGIInterface instance takes in the current request information including the dataset groups that the user is allowed to see and generates the appropriate interface page to show the user. Depending on the arguments provided this will vary but the usual order is:
22
231. DatasetGroupPage
242. DatasetPage
253. VariablesPage
264. SpatioTemporalPage
275. ResultsPage
28
29Note 1: I plan to include a VerificationPage where the user can check their request before submitting it.
30Note 2: I plan to include an operations page (relevant only to selections of two datasets) that allows the user to specify a number of potential operations that they can perform on the data such as:
31   . var1 - var2
32   . var1 + var2
33   . var1 * var2
34   . var1 / var2
35   . (var1**2 + var2**2)**0.5
36   . others?
37
38The currently implemented CGIInterface has the following methods that are explained below:
39
40
41
42
43
44
45Other control flows
46
47
48
49
50dx objects
51
52config.py
53ControlExtract
54RequestDict
55Requestdb
56Datasetdb
57CGIInterface (and more generic userInterface)
58OptionHandler
59MetadataExtractor
60RequestCost
61Product
62MailUser
63ErrorHandler
Note: See TracBrowser for help on using the repository browser.