Ignore:
Timestamp:
26/01/07 10:13:07 (15 years ago)
Author:
domlowe
Message:

xlinks in domain resolve to insertedElement.

File:
1 edited

Legend:

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

    r2052 r2057  
    5656 
    5757#Some variable definitions: these things are often repeated so store in variables. 
    58 FILEFORMATS=[CSML('NetCDFExtract'),CSML('NASAAmesExtract'), CSML('GRIBExtract'),CSML('CDMLExtract'), CSML('RawFileExtract')] 
     58FILEFORMATS=[CSML('NetCDFExtract'),CSML('NASAAmesExtract'), CSML('GRIBExtract'),CSML('CDMLExtract'), CSML('RawFileExtract'), CSML('AggregatedArray')] 
    5959 
    6060 
     
    6868        if not hasattr(self, 'ATTRIBUTES'): 
    6969            self.__dict__['ATTRIBUTES']=[] 
     70                
    7071     
    7172    #The __setattr__ and __getattribute__ special methods have been overridden. 
     
    369370    def __init__(self, **kwargs): 
    370371        AbstractGML.__init__(self,**kwargs) 
    371         children={} 
     372        #note __insertedExtract is used in resolving xlinks and shouldn't be written to directly (except by the code which handles the xlink resolutions) 
     373        children={'__insertedExtract':[FILEFORMATS,'FileExtract']} 
    372374        addchildren(self,children) 
    373375        a =['uom']  
    374376        addatts(self,a) 
    375377        csElement.__init__(self,**kwargs) 
     378         
    376379         
    377380class CompositeValue(AbstractGML,csElement): 
     
    478481    def __init__(self, **kwargs): 
    479482        AbstractGML.__init__(self,**kwargs) 
    480         children={'coordinateList':[CSML('coordinateList'),'csString'], 'timePositionList':[CSML('timePositionList'),'TimePositionList']} 
     483        children={'coordinateList':[CSML('coordinateList'),'csString'], 'timePositionList':[CSML('timePositionList'),'TimePositionList'],'__insertedExtract':[[CSML('NetCDFExtract'),CSML('NASAAmesExtract'),CSML('AggregatedArray')],'FileExtract',CSML('__insertedExtract')]} 
    481484        addchildren(self,children) 
    482485        a=['frame'] 
    483486        addatts(self,a) 
    484487        csElement.__init__(self,**kwargs) 
     488children={'descriptors':[[CSML('NetCDFExtract'),CSML('AggregatedArray')], 'FileExtract', CSML('descriptor'),1]} 
     489 
     490 
    485491 
    486492class GridOrdinateDescription(AbstractGML,csElement): 
     
    795801    def __init__(self,**kwargs): 
    796802        addatts(self,[]) 
    797         children={'descriptors':[[CSML('NetCDFExtract'),CSML('PointFeature'),CSML('AggregatedArray')], 'FileExtract', CSML('descriptor'),1]} 
     803        children={'descriptors':[[CSML('NetCDFExtract'),CSML('AggregatedArray')], 'FileExtract', CSML('descriptor'),1]} 
    798804        addchildren(self,children) 
    799805        csElement.__init__(self,**kwargs) 
Note: See TracChangeset for help on using the changeset viewer.