source: TI02-CSML/trunk/parser/API/parser_api.py @ 1025

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

adding api modules for all features

Line 
1''' parser_api.py  '''
2
3#import parser from parent directory
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    from Parser import *
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
15import ops_Dataset
16import ops_AbstractFeature
17import ops_PointFeature
18import ops_ProfileFeature
19
20
21#Assign methods  .. hmmm perhaps a loop needed here!!
22
23#Dataset methods:
24Dataset.parse=ops_Dataset.parse
25Dataset.getFeatureList=ops_Dataset.getFeatureList
26Dataset.getFeature=ops_Dataset.getFeature
27
28
29#AbstractFeature methods:
30AbstractFeature.testmethod=ops_AbstractFeature.testmethod
31
32#PointFeature methods:
33PointFeature.testmethod=ops_PointFeature.testmethod
34
35#PointSeriesFeature methods:
36PointSeriesFeature.testmethod=ops_PointSeriesFeature.testmethod
37
38#ProfileFeature methods:
39ProfileFeature.testmethod=ops_ProfileFeature.testmethod
40
41#ProfileSeriesFeature methods:
42ProfileSeriesFeature.testmethod=ops_ProfileSeriesFeature.testmethod
43
44#Grid methods:
45Grid.testmethod=ops_GridFeature.testmethod
46
47#GridSeries methods:
48GridSeries.testmethod=ops_GridSeriesFeature.testmethod
49
50#Trajectory methods:
51Trajectory.testmethod=ops_TrajectoryFeature.testmethod
Note: See TracBrowser for help on using the repository browser.