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

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

getFeature, getFeatureList methods

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#ProfileFeature methods:
36ProfileFeature.testmethod=ops_ProfileFeature.testmethod
Note: See TracBrowser for help on using the repository browser.