Ignore:
Timestamp:
06/12/07 12:10:59 (12 years ago)
Author:
lawrence
Message:

Minor dif mods and configuration options for discovery standalone service

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/ows_framework/trunk/ows_server/ows_server/models/DIF.py

    r3102 r3119  
    8686        self.distribution=[] 
    8787        for e in helper.findall(self.tree,'Distribution'): 
    88             self.distribution.append(dict([(k,helper.getText(e,k)) for k in  
    89                 ('Fees','Distribution_Media','Distribution_Size','Distribution_Format')])) 
     88            d=dict([(k,helper.getText(e,k)) for k in  
     89                ('Fees','Distribution_Media','Distribution_Size','Distribution_Format')]) 
     90            addit=0 
     91            for k in d:  
     92                if d[k]!='': addit=1 
     93            if addit: self.distribution.append(d) 
    9094        #need entity.parameters, entity.bbox, entity.timeCoverage, entity.curator, entity.creators 
    9195        # nb, two ways of parameters being stored 
     96       
    9297        self.parameters=[] 
    9398        for parameter in helper.findall(self.tree,'Parameters'): 
     
    154159        self.citation=self.briefCitation 
    155160         
     161        #an empty element sends something back, we don't want that: 
    156162        self.personnel=[DIFcontact(helper,f) for f in helper.findall(self.tree,'Personnel')] 
    157          
    158163        #services 
    159164        self.services=[] 
Note: See TracChangeset for help on using the changeset viewer.