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

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

Put all the old code in the old_stuff branch.

Line 
1Help on module optionHandler:
2
3NAME
4    optionHandler
5
6FILE
7    /usr/local/dx-0.1.1/optionHandler.py
8
9DESCRIPTION
10    optionHandler.py
11    ================
12   
13    Holds the OptionHandler class that is used to generate available
14    option lists to send to the user via whichever presentation layer
15    is being used.
16
17CLASSES
18    datasetdb.Datasetdb(dxdmlHandler.DXDMLHandler)
19        OptionHandler
20   
21    class OptionHandler(datasetdb.Datasetdb)
22     |  I think this should be a sub-class of Datasetdb so that you
23     |  wrap the functionality already in place but send it the userRoles and username
24     |  so that it can send back a list of everything available.
25     |  All lists are sorted alphanumerically here before being exported to
26     |  other parts of the dx package.
27     | 
28     |  Method resolution order:
29     |      OptionHandler
30     |      datasetdb.Datasetdb
31     |      dxdmlHandler.DXDMLHandler
32     | 
33     |  Methods defined here:
34     | 
35     |  __init__(self, userRoles, username)
36     |      Method to initialise class. Calls __init__ method for parent class
37     |      and sets userRoles and username instance variable.
38     | 
39     |  getDatasetGroupList(self)
40     |      Method returning a sorted list of all the dataset groups available
41     |      to the particular user.
42     | 
43     |  getDatasetList(self, datasetGroup)
44     |      Method to return the available datasets within a given dataset group as
45     |      a sorted list.
46     | 
47     |  getVariableList(self, datasetGroup=None, dataset=None, datasetURI=None)
48     |      Method to return list of available variables for the given datasetGroup
49     |      and dataset/datasetURI.
50     | 
51     |  ----------------------------------------------------------------------
52     |  Methods inherited from datasetdb.Datasetdb:
53     | 
54     |  getCFGlobalAttributes(self, datafile)
55     |      getCFGlobalAttributes method - gets any CF metadta global attributes that are available
56     |      from the source dataset/file.
57     | 
58     |  getDomain(self, datasetGroup=None, dataset=None, variable=None, datasetURI=None)
59     |      getDomain method - returns the combined horizontal, vertical and temporal domains.
60     | 
61     |  getHorizontalDomain(self, datasetGroup=None, dataset=None, variable=None, datasetURI=None)
62     | 
63     |  getTemporalDomain(self, datasetGroup=None, dataset=None, variable=None, datasetURI=None)
64     |      getTemporalDomain method - returns the temporal domain as a tuple of (start time, end time,
65     |      (interval value, interval units)).
66     | 
67     |  getVariables(self, datasetGroup=None, dataset=None, datasetURI=None)
68     |      getVariables method - returns a list of variables ior the given dataset
69     |      group/dataset combination or datasetURI. The variable name used is selected
70     |      hierarchically depending on the available attributes.
71     | 
72     |  getVerticalSpatialDomain(self, datasetGroup=None, dataset=None, variable=None, datasetURI=None)
73     |      getVerticalSpatialDomain method - returns the vertical domain as a tuple containing
74     |      a list of levels (or "Single level" string) and the units.
75     | 
76     |  ----------------------------------------------------------------------
77     |  Methods inherited from dxdmlHandler.DXDMLHandler:
78     | 
79     |  getDatasetGroupFromURI(self, datasetURI)
80     |      getDatasetGroupFromURI method - gets the id of the dataset group from a
81     |      datasetURI (if it is known to the dx).
82     | 
83     |  getDatasetGroups(self)
84     |      Returns a list of the Dataset Groups that the dx knows about.
85     | 
86     |  getDatasetURI(self, datasetGroup, dataset)
87     |      Returns a datasetURI from a known dataset group and dataset.
88     | 
89     |  getDatasetURIList(self)
90     |      Returns a list of all the datasetURIs visible to this version of dx.
91     |      NOTE: datasetURI maps to usageMetadataLink in the XML.
92     | 
93     |  getDatasets(self, datasetGroup)
94     |      Returns a list of the Datasets available for the given Dataset Group.
95     | 
96     |  getDatasetsAndDatasetURIs(self, datasetGroup)
97     |      Returns a list of (dataset, datasetURI) tuples for each dataset availabe in the
98     |      fiven datasetGroup.
99     | 
100     |  getFileNamePrefix(self, datasetGroup)
101     |      Returns the filename prefix for the given Dataset Group.
102     | 
103     |  getFileNameSection(self, datasetGroup, dataset)
104     |      Return the filename section for the Dataset given (within the Dataset Group given).
105     | 
106     |  getProtectID(self, datasetGroup=None, dataset=None, datasetURI=None)
107     |      getProtectID method - returns the (permittedRoles, permittedUsers) tuple for a given
108     |      dataset group, dataset or datasetURI (if known to the dx). This goes down to the level
109     |      provided by the caller. If just the dataset group is given then only the permissions
110     |      for that are returned. But if the dataset or datasetURI is given then the permissions
111     |      on that are returned. These should always be the same, but one day might not be.
112
Note: See TracBrowser for help on using the repository browser.