source: TI03-DataExtractor/branches/old_stuff/dx-webservice/doc/extractMetadata.html @ 793

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI03-DataExtractor/branches/old_stuff/dx-webservice/doc/extractMetadata.html@793
Revision 793, 8.6 KB checked in by astephen, 14 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 extractMetadata</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>extractMetadata</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/extractMetadata.py">/usr/local/dx-0.1.1/extractMetadata.py</a></font></td></tr></table>
12    <p><tt>extractMetadata.py<br>
13==================<br>
14&nbsp;<br>
15Contains&nbsp;the&nbsp;base&nbsp;class&nbsp;<a href="#MetadataExtractor">MetadataExtractor</a>&nbsp;that&nbsp;is&nbsp;used&nbsp;to&nbsp;extract&nbsp;the&nbsp;<br>
16appropriate&nbsp;data&nbsp;out&nbsp;of&nbsp;a&nbsp;metadata/data&nbsp;file&nbsp;to&nbsp;view&nbsp;the&nbsp;variables,<br>
17axes&nbsp;etc.&nbsp;It&nbsp;converts&nbsp;also&nbsp;extracts&nbsp;the&nbsp;equivalent&nbsp;information&nbsp;from&nbsp;<br>
18the&nbsp;request&nbsp;so&nbsp;it&nbsp;can&nbsp;be&nbsp;checked&nbsp;against&nbsp;the&nbsp;dataset&nbsp;metadata.</tt></p>
19<p>
20<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
21<tr bgcolor="#aa55cc">
22<td colspan=3 valign=bottom>&nbsp;<br>
23<font color="#fffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
24   
25<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
26<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="cdms.html">cdms</a><br>
27<a href="os.html">os</a><br>
28</td><td width="25%" valign=top><a href="re.html">re</a><br>
29<a href="sys.html">sys</a><br>
30</td><td width="25%" valign=top><a href="time.html">time</a><br>
31<a href="types.html">types</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="extractMetadata.html#MetadataExtractor">MetadataExtractor</a>
41</font></dt></dl>
42 <p>
43<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
44<tr bgcolor="#ffc8d8">
45<td colspan=3 valign=bottom>&nbsp;<br>
46<font color="#000000" face="helvetica, arial"><a name="MetadataExtractor">class <strong>MetadataExtractor</strong></a></font></td></tr>
47   
48<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
49<td colspan=2><tt><a href="#MetadataExtractor">MetadataExtractor</a>&nbsp;class&nbsp;-&nbsp;used&nbsp;to&nbsp;extract&nbsp;the&nbsp;appropriate&nbsp;data&nbsp;<br>
50from&nbsp;a&nbsp;metadata/data&nbsp;file&nbsp;to&nbsp;view&nbsp;the&nbsp;variables,&nbsp;axes&nbsp;etc.&nbsp;It&nbsp;<br>
51converts&nbsp;also&nbsp;extracts&nbsp;the&nbsp;equivalent&nbsp;information&nbsp;from&nbsp;the&nbsp;<br>
52request&nbsp;so&nbsp;it&nbsp;can&nbsp;be&nbsp;checked&nbsp;against&nbsp;the&nbsp;dataset&nbsp;metadata.<br>&nbsp;</tt></td></tr>
53<tr><td>&nbsp;</td>
54<td width="100%">Methods defined here:<br>
55<dl><dt><a name="MetadataExtractor-__init__"><strong>__init__</strong></a>(self, filenames, request)</dt><dd><tt>__init__&nbsp;method&nbsp;-&nbsp;requires&nbsp;one&nbsp;or&nbsp;two&nbsp;filenames&nbsp;and&nbsp;a&nbsp;request&nbsp;object<br>
56and&nbsp;sets&nbsp;up&nbsp;instance&nbsp;objects.</tt></dd></dl>
57
58<dl><dt><a name="MetadataExtractor-getFileList"><strong>getFileList</strong></a>(self)</dt><dd><tt>Method&nbsp;that&nbsp;returns&nbsp;the&nbsp;list&nbsp;of&nbsp;files&nbsp;associated&nbsp;with&nbsp;a&nbsp;particular<br>
59request.&nbsp;If&nbsp;more&nbsp;than&nbsp;one&nbsp;variable&nbsp;has&nbsp;been&nbsp;selected&nbsp;then&nbsp;the&nbsp;list<br>
60contains&nbsp;a&nbsp;concatenation&nbsp;of&nbsp;allVar1Files+allVar2Files.....+allVarNFiles.</tt></dd></dl>
61
62<dl><dt><a name="MetadataExtractor-getRequestSizeInBytes"><strong>getRequestSizeInBytes</strong></a>(self)</dt><dd><tt>Method&nbsp;to&nbsp;get&nbsp;the&nbsp;size&nbsp;of&nbsp;the&nbsp;request&nbsp;in&nbsp;bytes.</tt></dd></dl>
63
64<dl><dt><a name="MetadataExtractor-getTimeStepCount"><strong>getTimeStepCount</strong></a>(self)</dt><dd><tt>Method&nbsp;to&nbsp;return&nbsp;the&nbsp;number&nbsp;of&nbsp;time&nbsp;steps&nbsp;requested.</tt></dd></dl>
65
66<dl><dt><a name="MetadataExtractor-getTimeSteps"><strong>getTimeSteps</strong></a>(self, dset_num<font color="#909090">=1</font>)</dt><dd><tt>Method&nbsp;to&nbsp;return&nbsp;a&nbsp;list&nbsp;of&nbsp;tuples&nbsp;for&nbsp;all&nbsp;timesteps&nbsp;requested.</tt></dd></dl>
67
68</td></tr></table></td></tr></table><p>
69<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
70<tr bgcolor="#55aa55">
71<td colspan=3 valign=bottom>&nbsp;<br>
72<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
73   
74<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
75<td width="100%"><strong>ADMIN_MAIL_ADDRESS</strong> = 'badc@rl.ac.uk'<br>
76<strong>ADMIN_NOTIFICATION</strong> = 0<br>
77<strong>BASEDIR</strong> = '/usr/local/dx_wv'<br>
78<strong>CDAT_BIN_PATH</strong> = '/usr/local/cdat/bin'<br>
79<strong>CF_METADATA_GLOBAL_ATTRIBUTES</strong> = ['Conventions', 'title', 'source', 'institution', 'history', 'references', 'comment']<br>
80<strong>CGI_NAME</strong> = 'http://localhost/cgi-bin/dxui-0.1.1.py'<br>
81<strong>DATASETS</strong> = {'Test Data Group 1': (('Test Dataset 1', '/usr/local/dx_wv/testdata/testdata1.xml', 'dataset1-unused-code'),), 'Test Data Group 2': (('Test Dataset 2', '/usr/local/dx_wv/testdata/testdata2.xml', 'dataset2-unused-code'),), 'Test Data Group 3': (('Test Dataset 3', '/usr/local/dx_wv/testdata/testdata3.xml', 'dataset3-unused-code'),)}<br>
82<strong>DATASET_GROUPS</strong> = {'Test Data Group 1': None, 'Test Data Group 2': None, 'Test Data Group 3': None}<br>
83<strong>DEBUG</strong> = 1<br>
84<strong>DOMAIN_PARAMS</strong> = ('start_time', 'end_time', 'time_interval', 'horiz_domain', 'resolution', 'vertical_units', 'vertical_domain', 'output_type')<br>
85<strong>EXTRAS_DIR</strong> = '/dx_extra'<br>
86<strong>HORIZ_KEYS</strong> = ('northernExtent', 'easternExtent', 'southernExtent', 'westernExtent')<br>
87<strong>HTML_DIR</strong> = '/usr/local/dx_wv/html'<br>
88<strong>HTTP_HEADER</strong> = 'Content-Type: text/html<font color="#c040c0">\n\n</font>'<br>
89<strong>HTTP_OUTPUT_DIR</strong> = 'http://localhost/output'<br>
90<strong>LEFT_LOGO</strong> = 'dx_logo.jpg'<br>
91<strong>LOCAL_CGI_NAME</strong> = '/srv/www/cgi-bin/dxui-0.1.1.py'<br>
92<strong>LOCAL_MAIL_HOST</strong> = 'outbox.rl.ac.uk'<br>
93<strong>LOCAL_PYTHONPATH</strong> = ['/usr/local/badcdat/lib', '/usr/local/badcdat/lib/python', '/home/tornado/internal/badc/software/pythonlib/badc', '/usr/local/cdat/lib/python2.3', '/usr/local/cdat/lib/python2.3/site-packages', '/usr/local/cdat/lib/python2.3/site-packages/Numeric']<br>
94<strong>LOCAL_RULES</strong> = 0<br>
95<strong>LOGO_DIR</strong> = '/dx_extra/logos'<br>
96<strong>MAP_APPLET</strong> = '/dx_extra/LiveMap_30/extractorMap.html'<br>
97<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>
98<strong>OUTPUT_DIR</strong> = '/srv/www/htdocs/output'<br>
99<strong>OUTPUT_DIR_PERMISSION</strong> = 488<br>
100<strong>OUTPUT_FILE_GROUP</strong> = 'users'<br>
101<strong>OUTPUT_FILE_PERMISSION</strong> = 416<br>
102<strong>OUTPUT_FILE_USER</strong> = 'wwwrun'<br>
103<strong>OUTPUT_FORMATS</strong> = ['NetCDF']<br>
104<strong>PACKAGE_NAME</strong> = 'Data Extractor'<br>
105<strong>REGISTRATION_PAGE</strong> = 'http://badc.nerc.ac.uk/data/list_all_datasets.html?source=home'<br>
106<strong>REQUEST_DIR</strong> = '/usr/local/dx_wv/requests'<br>
107<strong>REQUEST_SIZE_LIMIT</strong> = 100<br>
108<strong>RESTRICTED_DATA</strong> = 0<br>
109<strong>RIGHT_LOGO</strong> = 'dx_logo.jpg'<br>
110<strong>STAGES</strong> = ['DatasetGroupPage', 'DatasetPage', 'VariablesPage', 'DomainPage', 'ResultsPage']<br>
111<strong>TIME_KEYS</strong> = ('year', 'month', 'day', 'hour', 'min', 'sec')<br>
112<strong>TIMING_SCALE_FACTOR</strong> = 0.001<br>
113<strong>USER_HOMEDIR</strong> = '/var/lib/wwwrun'<br>
114<strong>VISUALISOR_NAME</strong> = '/cgi-bin/splatui-0.1.1.py'<br>
115<strong>helpMessage</strong> = '<font color="#c040c0">\n\n</font>times.py<font color="#c040c0">\n</font>========<font color="#c040c0">\n\n</font>Holds the class DateTime th...00:00:00", "1999-01-22 12:00:00", (6, "hour"))<font color="#c040c0">\n\n\n</font>'</td></tr></table>
116</body></html>
Note: See TracBrowser for help on using the repository browser.