Changeset 834 for TI03-DataExtractor


Ignore:
Timestamp:
26/04/06 12:42:50 (13 years ago)
Author:
domlowe
Message:

Copied CSMLDataHandler to CDMLDataHandler and added in some comments to CSMLDataHandler

Location:
TI03-DataExtractor/branches/csml_hooks
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • TI03-DataExtractor/branches/csml_hooks/CSMLDataHandler.py

    r799 r834  
    6363    
    6464    def _openDataFile(self, datasetGroup=None, dataset=None, datasetURI=None): 
     65        #CSML: I think this can be ignored. File opening is handled by the csmlio interface. 
    6566        """ 
    6667        Opens a file and allocates to file handle called: self.file. 
     
    8485 
    8586    def _getVariable(self, varname): 
     87        #CSML, Not needed. 
     88          
    8689        """ 
    8790        Gets variable metadata object from a data file. 
     
    102105 
    103106    def _getBestName(self, v, vcount=0): 
     107        #CSML: should probably call getFeatureParameter (which returns contents of the <parameter> element or failing that getFeatureDescription (which returns contents of the gml:description element) 
     108         
    104109        """ 
    105110        Returns the best name for a cdms variable. 
     
    134139    def getVariables(self, datasetGroup=None, dataset=None, datasetURI=None): 
    135140        """ 
     141        CSML: call getFeatureList to return list of features  
     142        """ 
     143         
     144        """ 
    136145        Returns a list of variables for the given dataset 
    137146        group/dataset combination or datasetURI. The variable name used is selected 
     
    166175 
    167176    def getDomain(self, datasetGroup=None, dataset=None, variable=None, datasetURI=None): 
     177        """ CSML: Okay, I've not got far with Domains yet, but this may need to call several csmlio methods to get the data it needs. 
     178        """ 
     179         
     180         
    168181        """ 
    169182        Returns the full domain listing for a variable returning: 
     
    185198        Returns the full domain listing for a variable returning: 
    186199         
    187         [axisIndexString, knownAxisString, id, longName, units, listType, unusedItem,  
     200        [knownAxisString, id, longName, units, listType, unusedItem,  
    188201        listValue-1, listValue-2, ..., listValue-n] 
    189202         
    190203        For example: 
    191204         
    192         ["axis1.0", "time", "time", "Time", "hours since 1999-09-09 00:00:00", "start end interval", 
     205        ["time", "time", "Time", "hours since 1999-09-09 00:00:00", "start end interval", 
    193206        "", 0, 3, 6] 
    194207         
     
    209222        axcount=0 
    210223        for axis in var.getAxisList(): 
    211             axisIndexString="axis%s.%s" % ("77777", axcount) #(varIndex+1, axcount) 
    212224            units=None 
    213225            if axis.isTime(): 
     
    220232                knownAxis="level" 
    221233                arrayValues=axis[:] 
    222                 listType="full list" 
     234                listType="full list"axisIndexString 
    223235            elif axis.isLatitude(): 
    224236                knownAxis="latitude" 
     
    247259             
    248260            unused="" 
    249             rtlist.append([axisIndexString, knownAxis, id, longName, units, listType, unused]+arrayValues) 
     261            rtlist.append([knownAxis, id, longName, units, listType, unused]+arrayValues) 
    250262            axcount=axcount+1 
    251263             
     
    562574Output is a dictionary of attribute,value pairs got from the input file. 
    563575 
    564 CSML_END 
     576CSML_ENDaxisIndexString 
    565577"""              
    566578        if self.file==None: self._openDataFile(datasetURI=datafile) 
Note: See TracChangeset for help on using the changeset viewer.