Changeset 835 for TI02-CSML


Ignore:
Timestamp:
26/04/06 12:45:06 (14 years ago)
Author:
domlowe
Message:

Added getDatasetObj to return direct reference to parser obj

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

Legend:

Unmodified
Added
Removed
  • TI02-CSML/trunk/newparser/csmlio.py

    r831 r835  
    5050        self.currentFeature = None 
    5151         
     52    def getDatasetObj(self): 
     53        #if you want to bypass this wrapper layer, call this method and it will 
     54        #return a Parser.Dataset object, which you can interrogate... 
     55        return self.dataset 
    5256 
    5357    def getCSMLasString(self): 
     
    106110        self.__setArrayDescriptor(fileExtractID) 
    107111        file = self.currentArrayDescriptor.fileName 
    108         if isinstance(self.currentArrayDescriptor, NetCDFExtract(): 
     112        if isinstance(self.currentArrayDescriptor, NetCDFExtract): 
    109113            pass 
    110         if isinstance(self.currentArrayDescriptor, NASAAmesExtract(): 
     114        if isinstance(self.currentArrayDescriptor, NASAAmesExtract): 
    111115            pass 
    112         if isinstance(self.currentArrayDescriptor, GribExtract(): 
     116        if isinstance(self.currentArrayDescriptor, GRIBExtract): 
    113117            pass 
    114         if isinstance(self.currentArrayDescriptor, PPExtract(): 
    115             pass 
    116         if isinstance(self.currentArrayDescriptor, QXFExtract(): 
    117             pass         
     118        #if isinstance(self.currentArrayDescriptor, PPExtract): 
     119           # pass 
     120        #if isinstance(self.currentArrayDescriptor, QXFExtract): 
     121           # pass         
    118122        return file         
  • TI02-CSML/trunk/newparser/ioDemo.py

    r831 r835  
    22 
    33#ioDemo.py 
    4 #Contains example calls to Parser csml io interface 
     4#This document contains example calls to Parser csml io interface 
    55#Dominic Lowe 25th April 2006 
    66 
     
    5151 
    5252 
     53#Alternatively you can call getDatasetObj and then directly 
     54#interrogate the Parser.Dataset object returned thus bypassing the csmlio wrapper functions 
     55dataset = csml.getDatasetObj() 
     56print dir(dataset) 
    5357 
    54  
Note: See TracChangeset for help on using the changeset viewer.