extractMetadata
index
/usr/local/dx-0.1.1/extractMetadata.py

extractMetadata.py
==================
 
Contains the base class MetadataExtractor that is used to extract the 
appropriate data out of a metadata/data file to view the variables,
axes etc. It converts also extracts the equivalent information from 
the request so it can be checked against the dataset metadata.

 
Modules
       
cdms
os
re
sys
time
types

 
Classes
       
MetadataExtractor

 
class MetadataExtractor
    MetadataExtractor class - used to extract the appropriate data 
from a metadata/data file to view the variables, axes etc. It 
converts also extracts the equivalent information from the 
request so it can be checked against the dataset metadata.
 
  Methods defined here:
__init__(self, filenames, request)
__init__ method - requires one or two filenames and a request object
and sets up instance objects.
getFileList(self)
Method that returns the list of files associated with a particular
request. If more than one variable has been selected then the list
contains a concatenation of allVar1Files+allVar2Files.....+allVarNFiles.
getRequestSizeInBytes(self)
Method to get the size of the request in bytes.
getTimeStepCount(self)
Method to return the number of time steps requested.
getTimeSteps(self, dset_num=1)
Method to return a list of tuples for all timesteps requested.

 
Data
        ADMIN_MAIL_ADDRESS = 'badc@rl.ac.uk'
ADMIN_NOTIFICATION = 0
BASEDIR = '/usr/local/dx_wv'
CDAT_BIN_PATH = '/usr/local/cdat/bin'
CF_METADATA_GLOBAL_ATTRIBUTES = ['Conventions', 'title', 'source', 'institution', 'history', 'references', 'comment']
CGI_NAME = 'http://localhost/cgi-bin/dxui-0.1.1.py'
DATASETS = {'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'),)}
DATASET_GROUPS = {'Test Data Group 1': None, 'Test Data Group 2': None, 'Test Data Group 3': None}
DEBUG = 1
DOMAIN_PARAMS = ('start_time', 'end_time', 'time_interval', 'horiz_domain', 'resolution', 'vertical_units', 'vertical_domain', 'output_type')
EXTRAS_DIR = '/dx_extra'
HORIZ_KEYS = ('northernExtent', 'easternExtent', 'southernExtent', 'westernExtent')
HTML_DIR = '/usr/local/dx_wv/html'
HTTP_HEADER = 'Content-Type: text/html\n\n'
HTTP_OUTPUT_DIR = 'http://localhost/output'
LEFT_LOGO = 'dx_logo.jpg'
LOCAL_CGI_NAME = '/srv/www/cgi-bin/dxui-0.1.1.py'
LOCAL_MAIL_HOST = 'outbox.rl.ac.uk'
LOCAL_PYTHONPATH = ['/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']
LOCAL_RULES = 0
LOGO_DIR = '/dx_extra/logos'
MAP_APPLET = '/dx_extra/LiveMap_30/extractorMap.html'
MESSAGE_TO_USERS = 'This is a test version of the Data Extractor so ...error occurs so that we can improve this service.'
OUTPUT_DIR = '/srv/www/htdocs/output'
OUTPUT_DIR_PERMISSION = 488
OUTPUT_FILE_GROUP = 'users'
OUTPUT_FILE_PERMISSION = 416
OUTPUT_FILE_USER = 'wwwrun'
OUTPUT_FORMATS = ['NetCDF']
PACKAGE_NAME = 'Data Extractor'
REGISTRATION_PAGE = 'http://badc.nerc.ac.uk/data/list_all_datasets.html?source=home'
REQUEST_DIR = '/usr/local/dx_wv/requests'
REQUEST_SIZE_LIMIT = 100
RESTRICTED_DATA = 0
RIGHT_LOGO = 'dx_logo.jpg'
STAGES = ['DatasetGroupPage', 'DatasetPage', 'VariablesPage', 'DomainPage', 'ResultsPage']
TIME_KEYS = ('year', 'month', 'day', 'hour', 'min', 'sec')
TIMING_SCALE_FACTOR = 0.001
USER_HOMEDIR = '/var/lib/wwwrun'
VISUALISOR_NAME = '/cgi-bin/splatui-0.1.1.py'
helpMessage = '\n\ntimes.py\n========\n\nHolds the class DateTime th...00:00:00", "1999-01-22 12:00:00", (6, "hour"))\n\n\n'