Changeset 984


Ignore:
Timestamp:
23/05/06 15:21:02 (13 years ago)
Author:
domlowe
Message:

Added getBestName method, and removed test methods from api

Location:
TI02-CSML/trunk/parser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/parser/apiDemo.py

    r982 r984  
    2222    #csml.getFeature is the method to  get a particular feature by name. 
    2323    feature=csml.getFeature(featureList[1]) 
     24    print '\n the best name for the feature is %s '%feature.getBestName() 
    2425    print '\n The feature has the following methods:' 
    2526    print '\n Feature is of type: %s' % feature.getFeatureType() 
  • TI02-CSML/trunk/parser/csmldoc.py

    r982 r984  
    115115        return str(self.parsedFeature) 
    116116     
    117     def testMethod(self): 
    118         #default "testMethod" for all features 
    119         print '/n Underlying feature type: ' + str(self.parsedFeature) 
    120         return 'abstract test method called and not overwritten' 
     117    def getBestName(self): 
     118        #okay it's still to be determined what the best name for feature is, 
     119        #so for now return gml:id 
     120        return self.parsedFeature.id 
    121121         
    122122    def getDomain(self): 
     
    144144            #return output options for Point feature... not implemented 
    145145        pass 
    146     def testMethod(self): 
    147         """Over writes abstract testMethod""" 
    148         print 'underlying feature type:' + str(self.parsedFeature) 
    149         return 'abstract test method overwritten by CSMLPointFeature class' 
    150146 
    151147class CSMLPointSeriesFeature(CSMLAbstractFeature): 
     
    155151            #return output options for PointSeries feature... not implemented 
    156152        pass 
    157     def testMethod(self): 
    158         """Over writes abstract testMethod""" 
    159         print 'underlying feature type:' + str(self.parsedFeature) 
    160         return 'abstract test method overwritten by CSMLPointSeriesFeature class' 
    161      
     153 
    162154     
    163155class CSMLProfileFeature(CSMLAbstractFeature): 
Note: See TracChangeset for help on using the changeset viewer.