Changeset 1040


Ignore:
Timestamp:
26/05/06 15:40:27 (13 years ago)
Author:
domlowe
Message:

added getDomain() to API

Location:
TI02-CSML/trunk
Files:
2 deleted
3 edited

Legend:

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

    r1032 r1040  
    66scannerPath=os.sep.join(currentPath.split(os.sep)[:-1]) + '/Scanner' 
    77sys.path.append(scannerPath) #append the parser path to sys.path  
    8 print sys.path 
    98try: 
    109    import csmllibs.csmldataiface as csmldataiface 
     
    7069Parser.GridSeriesFeature.getDomainReference=ops_GridSeriesFeature.getDomainReference 
    7170Parser.GridSeriesFeature.getDomainComplement=ops_GridSeriesFeature.getDomainComplement 
     71Parser.GridSeriesFeature.getDomain=ops_GridSeriesFeature.getDomain 
    7272 
    7373#TrajectoryFeature methods: 
  • TI02-CSML/trunk/parser/API/ops_GridSeriesFeature.py

    r1032 r1040  
    3131    return domaincomp 
    3232 
    33 # #     def getDomain(self): 
    34 # #         #returns both the domain reference axes and domain compliment axes in a single domain dictionary 
    35 # #         #axes are in no particular order 
    36 # #         domain = {} 
    37 # #         dr=self.__getDomainReference() 
    38 # #         dc=self.__getDomainComplement() 
    39 # #         for key in dc.keys(): 
    40 # #             domain[key]=dc[key] 
    41 # #         for key in dr.keys(): 
    42 # #             domain[key]=dr[key] 
    43 # #         return domain 
     33def getDomain(self): 
     34    #returns both the domain reference axes and domain compliment axes in a single domain dictionary 
     35    #axes are in no particular order 
     36    domain = {} 
     37    dr=getDomainReference(self) 
     38    dc=getDomainComplement(self) 
     39    for key in dc.keys(): 
     40        domain[key]=dc[key] 
     41    for key in dr.keys(): 
     42        domain[key]=dr[key] 
     43    return domain 
  • TI02-CSML/trunk/parser/apicalls.py

    r1032 r1040  
    2626print '\n The feature has domain complement :'  
    2727print feature.getDomainComplement() 
     28 
     29#get combined domain 
     30print '\n The feature has domain:'  
     31print feature.getDomain() 
Note: See TracChangeset for help on using the changeset viewer.