Changeset 1875 for TI02-CSML


Ignore:
Timestamp:
15/12/06 15:10:24 (13 years ago)
Author:
domlowe
Message:

added Section feature

Location:
TI02-CSML/branches/CSML2
Files:
2 edited

Legend:

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

    r1874 r1875  
    372372 
    373373 
     374class TimePositionList(AbstractGML,csElement): 
     375    def __init__(self,**kwargs): 
     376        a=['frame', 'calendarEraName','indeterminatePosition'] 
     377        addatts(self,a) 
     378     
     379 
    374380class GridCoordinatesTable(AbstractGML,csElement): 
    375381    def __init__(self,**kwargs): 
     
    446452        addchildren(self,children) 
    447453 
    448  
    449  
    450454class ProfileSeriesCoverage(AbstractDiscreteCoverage,csElement): 
    451455    def __init__(self, **kwargs): 
     
    454458        addchildren(self,children) 
    455459         
    456  
    457 class GridSeriesDomain(ReferenceableGrid, DomainSet, csElement): 
     460class SectionDomain(ReferenceableGrid, DomainSet, csElement): 
    458461    def __init__(self, **kwargs): 
    459462        DomainSet.__init__(self,**kwargs) 
     
    462465        addchildren(self,children) 
    463466         
     467class SectionCoverage(AbstractDiscreteCoverage,csElement): 
     468    def __init__(self, **kwargs): 
     469        AbstractDiscreteCoverage.__init__(self,**kwargs) 
     470        children={'sectionDomain':[CSML('SectionDomain'),'SectionDomain' ,CSML('sectionDomain') ], 'rangeSet':[GML('rangeSet'), 'RangeSet'],'coverageFunction':[GML('coverageFunction'),'csString']} 
     471        addchildren(self,children) 
     472 
     473class GridSeriesDomain(ReferenceableGrid, DomainSet, csElement): 
     474    def __init__(self, **kwargs): 
     475        DomainSet.__init__(self,**kwargs) 
     476        ReferenceableGrid.__init__(self,**kwargs) 
     477        children={} 
     478        addchildren(self,children) 
     479         
    464480class GridSeriesCoverage(AbstractDiscreteCoverage,csElement): 
    465481    def __init__(self, **kwargs): 
     
    533549    def __init__(self, **kwargs): 
    534550        AbstractFeature.__init__(self,**kwargs) 
    535         children={'stationLocations':[CSML('stationLocations'), 'csString'], 'stationTimes':[CSML('stationTimes'), 'csString'],'value':[CSML('SectionCoverage'), 'SectionCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
     551        children={'stationLocations':[CSML('stationLocations'), 'csString'], 'stationTimes':[CSML('stationTimes'), 'TimePositionList'],'value':[CSML('SectionCoverage'), 'SectionCoverage', CSML('value')], 'parameter':[CSML('parameter'), 'Phenomenon']} 
    536552        addchildren(self,children) 
    537553 
     
    575591    def __init__(self,**kwargs): 
    576592        AbstractFeatureCollection.__init__(self,**kwargs) 
    577         children={'members':[[CSML('GridFeature'), CSML('GridSeriesFeature'),CSML('PointFeature'),CSML('ProfileFeature'),CSML('ProfileSeriesFeature'),CSML('RaggedProfileSeriesFeature'),CSML('PointSeriesFeature'),CSML('AlternatePointFeature')], 'AbstractFeature', GML('featureMembers')]} 
     593        children={'members':[[CSML('GridFeature'), CSML('GridSeriesFeature'),CSML('PointFeature'),CSML('ProfileFeature'),CSML('ProfileSeriesFeature'),CSML('RaggedProfileSeriesFeature'),CSML('RaggedSectionFeature'),CSML('SectionFeature'),CSML('PointSeriesFeature'),CSML('AlternatePointFeature')], 'AbstractFeature', GML('featureMembers')]} 
    578594        addchildren(self,children) 
    579595    def _getSubstitutionType(self,tag): 
     
    592608        elif tag==CSML('RaggedProfileSeriesFeature'): 
    593609            return 'RaggedProfileSeriesFeature' 
     610        elif tag==CSML('RaggedSectionFeature'): 
     611            return 'RaggedSectionFeature' 
     612        elif tag==CSML('SectionFeature'): 
     613            return 'SectionFeature' 
    594614        elif tag==CSML('AlternatePointFeature'): 
    595615            return 'AlternatePointFeature' 
     
    606626        elif typename == 'ProfileSeriesFeature': 
    607627            return CSML('ProfileSeriesFeature') 
     628        elif typename == 'SectionFeature': 
     629            return CSML('SectionFeature') 
     630        elif typename == 'RaggedSectionFeature': 
     631            return CSML('RaggedSectionFeature') 
    608632        elif typename == 'RaggedProfileSeriesFeature': 
    609633            return CSML('RaggedProfileSeriesFeature') 
  • TI02-CSML/branches/CSML2/test.xml

    r1874 r1875  
    378378            </parameter> 
    379379        </ProfileSeriesFeature> 
    380         --> 
    381380        <RaggedProfileSeriesFeature gml:id="ID001"> 
    382381            <profileLength>2147483647 2147483647 2147483647 2147483647 2147483647 2147483647 2147483647 2147483647 2147483647</profileLength> 
     
    400399            </parameter> 
    401400</RaggedProfileSeriesFeature> 
     401--> 
     402<RaggedSectionFeature> 
     403    <stationLocations>3.14159E0 3.14159E0 3.14159E0</stationLocations> 
     404    <stationTimes>2006-05-04 2006-05-04T18:13:51.0Z 2006 2006 2006-05-04T18:13:51.0Z 3.141592653589 01:01:01.001 http://www.oxygenxml.com/</stationTimes> 
     405    <profileLength>2147483647 2147483647 2147483647 2147483647 2147483647 2147483647 2147483647 2147483647 2147483647 2147483647</profileLength> 
     406    <value> 
     407        <SectionCoverage gml:id="ID003"> 
     408            <sectionDomain> 
     409                <SectionDomain gml:id="ID005"> 
     410                </SectionDomain> 
     411            </sectionDomain> 
     412            <gml:rangeSet> 
     413                <gml:DataBlock> 
     414                    <gml:rangeParameters> 
     415                    </gml:rangeParameters> 
     416                    <gml:tupleList>tupleList0</gml:tupleList> 
     417                </gml:DataBlock> 
     418            </gml:rangeSet> 
     419        </SectionCoverage> 
     420    </value> 
     421    <parameter> 
     422        <swe:ConstrainedPhenomenon gml:id="ID007"> 
     423            <gml:identifier codeSpace="http://www.oxygenxml.com/">identifier0</gml:identifier> 
     424            <swe:base/> 
     425        </swe:ConstrainedPhenomenon> 
     426    </parameter> 
     427</RaggedSectionFeature> 
     428<SectionFeature  gml:id="ID001"> 
     429    <stationLocations>3.14159E0 3.14159E0 3.14159E0</stationLocations> 
     430    <stationTimes>2006-05-04 http://www.oxygenxml.com/ 2006-05-04</stationTimes> 
     431    <value> 
     432        <SectionCoverage gml:id="ID003"> 
     433            <sectionDomain> 
     434                <SectionDomain gml:id="ID005"> 
     435                </SectionDomain> 
     436            </sectionDomain> 
     437            <gml:rangeSet> 
     438                <gml:File> 
     439                    <gml:rangeParameters> 
     440                    </gml:rangeParameters> 
     441                    <gml:fileName>http://www.oxygenxml.com/</gml:fileName> 
     442                    <gml:fileStructure>Record Interleaved</gml:fileStructure> 
     443                </gml:File> 
     444            </gml:rangeSet> 
     445        </SectionCoverage> 
     446    </value> 
     447    <parameter> 
     448        <swe:Phenomenon gml:id="ID007"> 
     449            <gml:identifier codeSpace="http://www.oxygenxml.com/">identifier0</gml:identifier> 
     450        </swe:Phenomenon> 
     451    </parameter> 
     452</SectionFeature> 
     453 
     454 
    402455        </gml:featureMembers> 
    403456        </gml:FeatureCollection> 
Note: See TracChangeset for help on using the changeset viewer.