source: TI02-CSML/trunk/parser/API/__init__.py @ 1029

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI02-CSML/trunk/parser/API/__init__.py@1029
Revision 1029, 2.3 KB checked in by domlowe, 14 years ago (diff)

init.py added to svn

Line 
1''' __init__.py  '''
2
3#import everything needed
4import os, sys
5currentPath=os.getcwd()
6parserPath=os.sep.join(currentPath.split(os.sep)[:-1])
7sys.path.append(parserPath) #append the parser path to sys.path
8try:
9    import Parser
10    import parser_extra
11except:
12    print 'Could not import CSML Parser. Make sure the Parser code is in parent directory.'
13    sys.exit()
14
15from cElementTree import *
16import ops_Dataset
17import ops_AbstractFeature
18import ops_PointFeature
19import ops_PointSeriesFeature
20import ops_ProfileFeature
21import ops_ProfileSeriesFeature
22import ops_GridFeature
23import ops_GridSeriesFeature
24import ops_TrajectoryFeature
25
26
27#Assign methods  .. hmmm perhaps a loop needed here!!
28
29#Dataset methods:
30Parser.Dataset.parse=ops_Dataset.parse
31Parser.Dataset.getFeatureList=ops_Dataset.getFeatureList
32Parser.Dataset.getFeature=ops_Dataset.getFeature
33Parser.Dataset.getFileExtract=ops_Dataset.getFileExtract
34
35
36#AbstractFeature methods:
37Parser.AbstractFeature.testmethod=ops_AbstractFeature.testmethod
38Parser.AbstractFeature.getAllowedSubsettings=ops_AbstractFeature.getAllowedSubsettings
39
40#PointFeature methods:
41Parser.PointFeature.testmethod=ops_PointFeature.testmethod
42#PointFeature.getAllowedSubsettings=ops_PointFeature.getAllowedSubsettings
43
44#PointSeriesFeature methods:
45Parser.PointSeriesFeature.testmethod=ops_PointSeriesFeature.testmethod
46#PointSeriesFeature.getAllowedSubsettings=ops_PointSeriesFeature.getAllowedSubsettings
47
48#ProfileFeature methods:
49Parser.ProfileFeature.testmethod=ops_ProfileFeature.testmethod
50#ProfileFeature.getAllowedSubsettings=ops_ProfileFeature.getAllowedSubsettings
51
52#ProfileSeriesFeature methods:
53Parser.ProfileSeriesFeature.testmethod=ops_ProfileSeriesFeature.testmethod
54#ProfileSeriesFeature.getAllowedSubsettings=ops_ProfileSeriesFeature.getAllowedSubsettings
55
56#GridFeature methods:
57Parser.GridFeature.testmethod=ops_GridFeature.testmethod
58#GridFeature.getAllowedSubsettings=ops_GridFeature.getAllowedSubsettings
59
60#GridSeriesFeature methods:
61Parser.GridSeriesFeature.testmethod=ops_GridSeriesFeature.testmethod
62Parser.GridSeriesFeature.getAllowedSubsettings=ops_GridSeriesFeature.getAllowedSubsettings
63Parser.GridSeriesFeature.getDomainReference=ops_GridSeriesFeature.getDomainReference
64
65#TrajectoryFeature methods:
66Parser.TrajectoryFeature.testmethod=ops_TrajectoryFeature.testmethod
Note: See TracBrowser for help on using the repository browser.