source: TI03-DataExtractor/branches/old_stuff/dx_source/for_usr_local/dx/doc/datasetdb.html @ 793

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

Put all the old code in the old_stuff branch.

Line 
1
2<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
3<html><head><title>Python: module datasetdb</title>
4</head><body bgcolor="#f0f0f8">
5
6<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
7<tr bgcolor="#7799ee">
8<td valign=bottom>&nbsp;<br>
9<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>datasetdb</strong></big></big></font></td
10><td align=right valign=bottom
11><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/dx-0.1.1/datasetdb.py">/usr/local/dx-0.1.1/datasetdb.py</a></font></td></tr></table>
12    <p><tt>datasets.py<br>
13===========<br>
14&nbsp;<br>
15Datasets&nbsp;module&nbsp;for&nbsp;the&nbsp;dx&nbsp;package.<br>
16&nbsp;<br>
17This&nbsp;module&nbsp;holds&nbsp;the&nbsp;<a href="#Datasetdb">Datasetdb</a>&nbsp;class&nbsp;that&nbsp;is&nbsp;used<br>
18to&nbsp;hold&nbsp;and&nbsp;access&nbsp;information&nbsp;about&nbsp;datasets&nbsp;visible<br>
19to&nbsp;the&nbsp;dx&nbsp;package.</tt></p>
20<p>
21<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
22<tr bgcolor="#aa55cc">
23<td colspan=3 valign=bottom>&nbsp;<br>
24<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
25   
26<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
27<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="cdms.html">cdms</a><br>
28<a href="cdtime.html">cdtime</a><br>
29</td><td width="25%" valign=top><a href="os.html">os</a><br>
30<a href="re.html">re</a><br>
31</td><td width="25%" valign=top><a href="shelve.html">shelve</a><br>
32</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
33<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
34<tr bgcolor="#ee77aa">
35<td colspan=3 valign=bottom>&nbsp;<br>
36<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
37   
38<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
39<td width="100%"><dl>
40<dt><font face="helvetica, arial"><a href="dxdmlHandler.html#DXDMLHandler">dxdmlHandler.DXDMLHandler</a>
41</font></dt><dd>
42<dl>
43<dt><font face="helvetica, arial"><a href="datasetdb.html#Datasetdb">Datasetdb</a>
44</font></dt></dl>
45</dd>
46</dl>
47 <p>
48<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
49<tr bgcolor="#ffc8d8">
50<td colspan=3 valign=bottom>&nbsp;<br>
51<font color="#000000" face="helvetica, arial"><a name="Datasetdb">class <strong>Datasetdb</strong></a>(<a href="dxdmlHandler.html#DXDMLHandler">dxdmlHandler.DXDMLHandler</a>)</font></td></tr>
52   
53<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
54<td colspan=2><tt><a href="#Datasetdb">Datasetdb</a>&nbsp;class&nbsp;-&nbsp;a&nbsp;group&nbsp;of&nbsp;methods&nbsp;to&nbsp;connect&nbsp;to&nbsp;a&nbsp;dataset&nbsp;group&nbsp;or<br>
55dataset&nbsp;to&nbsp;extract&nbsp;information&nbsp;about&nbsp;the&nbsp;contents.<br>&nbsp;</tt></td></tr>
56<tr><td>&nbsp;</td>
57<td width="100%">Methods defined here:<br>
58<dl><dt><a name="Datasetdb-__init__"><strong>__init__</strong></a>(self)</dt><dd><tt>__init__&nbsp;method&nbsp;-&nbsp;set&nbsp;up&nbsp;instance&nbsp;variables.</tt></dd></dl>
59
60<dl><dt><a name="Datasetdb-getCFGlobalAttributes"><strong>getCFGlobalAttributes</strong></a>(self, datafile)</dt><dd><tt>getCFGlobalAttributes&nbsp;method&nbsp;-&nbsp;gets&nbsp;any&nbsp;CF&nbsp;metadta&nbsp;global&nbsp;attributes&nbsp;that&nbsp;are&nbsp;available<br>
61from&nbsp;the&nbsp;source&nbsp;dataset/file.</tt></dd></dl>
62
63<dl><dt><a name="Datasetdb-getDomain"><strong>getDomain</strong></a>(self, datasetGroup<font color="#909090">=None</font>, dataset<font color="#909090">=None</font>, variable<font color="#909090">=None</font>, datasetURI<font color="#909090">=None</font>)</dt><dd><tt>getDomain&nbsp;method&nbsp;-&nbsp;returns&nbsp;the&nbsp;combined&nbsp;horizontal,&nbsp;vertical&nbsp;and&nbsp;temporal&nbsp;domains.</tt></dd></dl>
64
65<dl><dt><a name="Datasetdb-getHorizontalDomain"><strong>getHorizontalDomain</strong></a>(self, datasetGroup<font color="#909090">=None</font>, dataset<font color="#909090">=None</font>, variable<font color="#909090">=None</font>, datasetURI<font color="#909090">=None</font>)</dt></dl>
66
67<dl><dt><a name="Datasetdb-getTemporalDomain"><strong>getTemporalDomain</strong></a>(self, datasetGroup<font color="#909090">=None</font>, dataset<font color="#909090">=None</font>, variable<font color="#909090">=None</font>, datasetURI<font color="#909090">=None</font>)</dt><dd><tt>getTemporalDomain&nbsp;method&nbsp;-&nbsp;returns&nbsp;the&nbsp;temporal&nbsp;domain&nbsp;as&nbsp;a&nbsp;tuple&nbsp;of&nbsp;(start&nbsp;time,&nbsp;end&nbsp;time,&nbsp;<br>
68(interval&nbsp;value,&nbsp;interval&nbsp;units)).</tt></dd></dl>
69
70<dl><dt><a name="Datasetdb-getVariables"><strong>getVariables</strong></a>(self, datasetGroup<font color="#909090">=None</font>, dataset<font color="#909090">=None</font>, datasetURI<font color="#909090">=None</font>)</dt><dd><tt>getVariables&nbsp;method&nbsp;-&nbsp;returns&nbsp;a&nbsp;list&nbsp;of&nbsp;variables&nbsp;ior&nbsp;the&nbsp;given&nbsp;dataset<br>
71group/dataset&nbsp;combination&nbsp;or&nbsp;datasetURI.&nbsp;The&nbsp;variable&nbsp;name&nbsp;used&nbsp;is&nbsp;selected<br>
72hierarchically&nbsp;depending&nbsp;on&nbsp;the&nbsp;available&nbsp;attributes.</tt></dd></dl>
73
74<dl><dt><a name="Datasetdb-getVerticalSpatialDomain"><strong>getVerticalSpatialDomain</strong></a>(self, datasetGroup<font color="#909090">=None</font>, dataset<font color="#909090">=None</font>, variable<font color="#909090">=None</font>, datasetURI<font color="#909090">=None</font>)</dt><dd><tt>getVerticalSpatialDomain&nbsp;method&nbsp;-&nbsp;returns&nbsp;the&nbsp;vertical&nbsp;domain&nbsp;as&nbsp;a&nbsp;tuple&nbsp;containing<br>
75a&nbsp;list&nbsp;of&nbsp;levels&nbsp;(or&nbsp;"Single&nbsp;level"&nbsp;string)&nbsp;and&nbsp;the&nbsp;units.</tt></dd></dl>
76
77<hr>
78Methods inherited from <a href="dxdmlHandler.html#DXDMLHandler">dxdmlHandler.DXDMLHandler</a>:<br>
79<dl><dt><a name="Datasetdb-getDatasetGroupFromURI"><strong>getDatasetGroupFromURI</strong></a>(self, datasetURI)</dt><dd><tt>getDatasetGroupFromURI&nbsp;method&nbsp;-&nbsp;gets&nbsp;the&nbsp;id&nbsp;of&nbsp;the&nbsp;dataset&nbsp;group&nbsp;from&nbsp;a<br>
80datasetURI&nbsp;(if&nbsp;it&nbsp;is&nbsp;known&nbsp;to&nbsp;the&nbsp;dx).</tt></dd></dl>
81
82<dl><dt><a name="Datasetdb-getDatasetGroups"><strong>getDatasetGroups</strong></a>(self)</dt><dd><tt>Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;the&nbsp;Dataset&nbsp;Groups&nbsp;that&nbsp;the&nbsp;dx&nbsp;knows&nbsp;about.</tt></dd></dl>
83
84<dl><dt><a name="Datasetdb-getDatasetURI"><strong>getDatasetURI</strong></a>(self, datasetGroup, dataset)</dt><dd><tt>Returns&nbsp;a&nbsp;datasetURI&nbsp;from&nbsp;a&nbsp;known&nbsp;dataset&nbsp;group&nbsp;and&nbsp;dataset.</tt></dd></dl>
85
86<dl><dt><a name="Datasetdb-getDatasetURIList"><strong>getDatasetURIList</strong></a>(self)</dt><dd><tt>Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;all&nbsp;the&nbsp;datasetURIs&nbsp;visible&nbsp;to&nbsp;this&nbsp;version&nbsp;of&nbsp;dx.<br>
87NOTE:&nbsp;datasetURI&nbsp;maps&nbsp;to&nbsp;usageMetadataLink&nbsp;in&nbsp;the&nbsp;XML.</tt></dd></dl>
88
89<dl><dt><a name="Datasetdb-getDatasets"><strong>getDatasets</strong></a>(self, datasetGroup)</dt><dd><tt>Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;the&nbsp;Datasets&nbsp;available&nbsp;for&nbsp;the&nbsp;given&nbsp;Dataset&nbsp;Group.</tt></dd></dl>
90
91<dl><dt><a name="Datasetdb-getDatasetsAndDatasetURIs"><strong>getDatasetsAndDatasetURIs</strong></a>(self, datasetGroup)</dt><dd><tt>Returns&nbsp;a&nbsp;list&nbsp;of&nbsp;(dataset,&nbsp;datasetURI)&nbsp;tuples&nbsp;for&nbsp;each&nbsp;dataset&nbsp;availabe&nbsp;in&nbsp;the<br>
92fiven&nbsp;datasetGroup.</tt></dd></dl>
93
94<dl><dt><a name="Datasetdb-getFileNamePrefix"><strong>getFileNamePrefix</strong></a>(self, datasetGroup)</dt><dd><tt>Returns&nbsp;the&nbsp;filename&nbsp;prefix&nbsp;for&nbsp;the&nbsp;given&nbsp;Dataset&nbsp;Group.</tt></dd></dl>
95
96<dl><dt><a name="Datasetdb-getFileNameSection"><strong>getFileNameSection</strong></a>(self, datasetGroup, dataset)</dt><dd><tt>Return&nbsp;the&nbsp;filename&nbsp;section&nbsp;for&nbsp;the&nbsp;Dataset&nbsp;given&nbsp;(within&nbsp;the&nbsp;Dataset&nbsp;Group&nbsp;given).</tt></dd></dl>
97
98<dl><dt><a name="Datasetdb-getProtectID"><strong>getProtectID</strong></a>(self, datasetGroup<font color="#909090">=None</font>, dataset<font color="#909090">=None</font>, datasetURI<font color="#909090">=None</font>)</dt><dd><tt>getProtectID&nbsp;method&nbsp;-&nbsp;returns&nbsp;the&nbsp;(permittedRoles,&nbsp;permittedUsers)&nbsp;tuple&nbsp;for&nbsp;a&nbsp;given&nbsp;<br>
99dataset&nbsp;group,&nbsp;dataset&nbsp;or&nbsp;datasetURI&nbsp;(if&nbsp;known&nbsp;to&nbsp;the&nbsp;dx).&nbsp;This&nbsp;goes&nbsp;down&nbsp;to&nbsp;the&nbsp;level<br>
100provided&nbsp;by&nbsp;the&nbsp;caller.&nbsp;If&nbsp;just&nbsp;the&nbsp;dataset&nbsp;group&nbsp;is&nbsp;given&nbsp;then&nbsp;only&nbsp;the&nbsp;permissions<br>
101for&nbsp;that&nbsp;are&nbsp;returned.&nbsp;But&nbsp;if&nbsp;the&nbsp;dataset&nbsp;or&nbsp;datasetURI&nbsp;is&nbsp;given&nbsp;then&nbsp;the&nbsp;permissions<br>
102on&nbsp;that&nbsp;are&nbsp;returned.&nbsp;These&nbsp;should&nbsp;always&nbsp;be&nbsp;the&nbsp;same,&nbsp;but&nbsp;one&nbsp;day&nbsp;might&nbsp;not&nbsp;be.</tt></dd></dl>
103
104</td></tr></table></td></tr></table><p>
105<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
106<tr bgcolor="#55aa55">
107<td colspan=3 valign=bottom>&nbsp;<br>
108<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
109   
110<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
111<td width="100%"><strong>ADMIN_MAIL_ADDRESS</strong> = 'yourmail@yourhost'<br>
112<strong>ADMIN_NOTIFICATION</strong> = 0<br>
113<strong>BASEDIR</strong> = '/usr/local/dx'<br>
114<strong>CDAT_BIN_PATH</strong> = '/usr/local/cdat/bin'<br>
115<strong>CF_METADATA_GLOBAL_ATTRIBUTES</strong> = {'comments': 'Created by test data extractor.'}<br>
116<strong>CF_METADATA_GLOBAL_ATTRIBUTE_KEYS</strong> = ['Conventions', 'title', 'source', 'institution', 'history', 'references', 'comment']<br>
117<strong>CGI_NAME</strong> = 'http://localhost/cgi-bin/dxui.py'<br>
118<strong>CONFIRMATION_PAGE</strong> = 1<br>
119<strong>DEBUG</strong> = 1<br>
120<strong>DOMAIN_PARAMS</strong> = ('start_time', 'end_time', 'time_interval', 'horiz_domain', 'resolution', 'vertical_units', 'vertical_domain', 'outputFormat')<br>
121<strong>EXTRAS_DIR</strong> = '/dx_extra'<br>
122<strong>HORIZ_KEYS</strong> = ['northernExtent', 'easternExtent', 'southernExtent', 'westernExtent']<br>
123<strong>HTML_DIR</strong> = '/usr/local/dx/html'<br>
124<strong>HTTP_HEADER</strong> = 'Content-Type: text/html<font color="#c040c0">\n\n</font>'<br>
125<strong>HTTP_OUTPUT_DIR</strong> = 'http://localhost/output'<br>
126<strong>HTTP_REQUEST_XML_DIR</strong> = 'http://localhost/request_xmls'<br>
127<strong>INPUT_DATASETS_FILE</strong> = '/usr/local/dx/datasets/inputDatasets.xml'<br>
128<strong>LEFT_LOGO</strong> = 'dx_logo.jpg'<br>
129<strong>LOCAL_CGI_NAME</strong> = '/srv/www/cgi-bin/cgiInterface.py'<br>
130<strong>LOCAL_MAIL_HOST</strong> = 'youroutbox.yourdomain'<br>
131<strong>LOCAL_PYTHONPATH</strong> = ['YOUR_CDAT/lib/python2.4', 'YOUR_CDAT/lib/python2.4/site-packages', 'YOUR_CDAT/cdat/lib/python2.4/site-packages/Numeric', 'YOUR_CDAT/lib/python2.3', 'YOUR_CDAT/lib/python2.3/site-packages', 'YOUR_CDAT/cdat/lib/python2.3/site-packages/Numeric']<br>
132<strong>LOCAL_RULES</strong> = 0<br>
133<strong>LOGO_DIR</strong> = '/dx_extra/logos'<br>
134<strong>MAP_APPLET</strong> = '/dx_extra/LiveMap_30/extractorMap.html'<br>
135<strong>MAX_FILE_SIZE</strong> = 1<br>
136<strong>MAX_NUM_DATASETS</strong> = 2<br>
137<strong>MESSAGE_TO_USERS</strong> = 'This is a test version of the Data Extractor so ...error occurs so that we can improve this service.'<br>
138<strong>NAPPY_PATH</strong> = '/usr/local/nappy'<br>
139<strong>OUTPUT_DIR</strong> = '/srv/www/htdocs/output'<br>
140<strong>OUTPUT_DIR_PERMISSION</strong> = 493<br>
141<strong>OUTPUT_FILE_GROUP</strong> = 'users'<br>
142<strong>OUTPUT_FILE_PERMISSION</strong> = 420<br>
143<strong>OUTPUT_FILE_USER</strong> = 'wwwrun'<br>
144<strong>OUTPUT_FORMATS</strong> = ['NetCDF', 'NASA Ames']<br>
145<strong>PACKAGE_NAME</strong> = 'Data Extractor'<br>
146<strong>PROCESS_LIST_DIR</strong> = '/usr/local/dx/processes'<br>
147<strong>REGISTRATION_PAGE</strong> = 'http://yourhost/your_link.html'<br>
148<strong>REQUEST_DIR</strong> = '/usr/local/dx/requests'<br>
149<strong>REQUEST_SIZE_LIMIT</strong> = 100<br>
150<strong>REQUEST_XML_DIR</strong> = '/srv/www/htdocs/request_xmls'<br>
151<strong>RESTRICTED_DATA</strong> = 0<br>
152<strong>RIGHT_LOGO</strong> = 'dx_logo.jpg'<br>
153<strong>STAGES</strong> = ['DatasetGroupPage', 'DatasetPage', 'VariablesPage', 'DomainPage', 'ResultsPage']<br>
154<strong>TIME_KEYS</strong> = ['Year', 'Month', 'Day', 'Hour', 'Minute', 'Second']<br>
155<strong>TIMING_SCALE_FACTOR</strong> = 1.0000000000000001e-05<br>
156<strong>TOP_LEVEL</strong> = 'datasetGroup'<br>
157<strong>USER_HOMEDIR</strong> = '/var/lib/wwwrun'<br>
158<strong>VISUALISOR_NAME</strong> = '/cgi-bin/splatui-0.1.1.py'</td></tr></table>
159</body></html>
Note: See TracBrowser for help on using the repository browser.