Ignore:
Timestamp:
20/12/06 15:43:32 (13 years ago)
Author:
domlowe
Message:

beginning to refactor API module

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/branches/CSML2/API/__init__.py

    r1738 r1902  
    1 #''' __init__.py  ''' 
     1''' __init__.py  ''' 
    22 
    33 
    4 ##import element tree and the parser api 
    5 #from cElementTree import * 
    6 #import csml.parser 
    7 #import ops_Dataset 
    8 #import ops_AbstractFileExtract 
    9 #import ops_ArrayGenerator 
    10 #import ops_AbstractFeature 
    11 #import ops_PointFeature 
    12 #import ops_PointSeriesFeature 
    13 #import ops_ProfileFeature 
    14 #import ops_ProfileSeriesFeature 
    15 #import ops_GridFeature 
    16 #import ops_GridSeriesFeature 
    17 #import ops_TrajectoryFeature 
    18 #import csmlContainer 
     4#import element tree and the parser api 
     5from cElementTree import * 
     6import csml.parser 
     7import ops_Dataset 
     8import ops_FileExtract 
     9import ops_ArrayGenerator 
     10import ops_AbstractFeature 
     11import ops_PointFeature 
     12import ops_PointSeriesFeature 
     13import ops_ProfileFeature 
     14import ops_ProfileSeriesFeature 
     15import ops_GridFeature 
     16import ops_GridSeriesFeature 
     17import ops_TrajectoryFeature 
     18import csmlContainer 
    1919 
    20 #def addMethods(obj, meths): 
    21     #for meth in meths: 
    22         #setattr(obj, meth.__name__, meth) 
     20def addMethods(obj, meths): 
     21    for meth in meths: 
     22        setattr(obj, meth.__name__, meth) 
    2323 
    24 ##Assign methods to parser classes 
    25 ##Dataset methods: 
    26 #addMethods(csml.parser.Dataset, [ops_Dataset.parse, ops_Dataset.getSecurity, ops_Dataset.getFeatureList, ops_Dataset.getFeature, ops_Dataset.getFileExtract]) 
     24#Assign methods to parser classes 
     25#Dataset methods: 
     26addMethods(csml.parser.Dataset, [ops_Dataset.parse, ops_Dataset.getSecurity, ops_Dataset.getFeatureList, ops_Dataset.getFeature, ops_Dataset.getFileExtract]) 
    2727 
    28 ##AbstractFileExtract methods: 
    29 #addMethods(csml.parser.AbstractFileExtract, [ops_AbstractFileExtract.getData]) 
     28#AbstractFileExtract methods: 
     29addMethods(csml.parser.FileExtract, [ops_FileExtract.getData]) 
    3030 
    31 ##ArrayGenerator methods: 
     31#ArrayGenerator methods: 
    3232#addMethods(csml.parser.ArrayGenerator, [ops_ArrayGenerator.getGeneratedValues]) 
    3333 
Note: See TracChangeset for help on using the changeset viewer.