Ignore:
Timestamp:
05/04/07 15:01:07 (13 years ago)
Author:
lawrence
Message:

Improvements in date and person handling.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI07-MOLES/trunk/PythonCode/wsgi/DIF.py

    r2366 r2386  
    44from Utilities import * 
    55from geoUtilities import * 
    6 from People import * 
     6from People2 import * 
    77from AccessControl import AccessControl 
    88from ETxmlView import loadET, nsdumb 
     
    113113         
    114114        #load up information about temporal extent 
    115         tc=( 
    116             helper.getText(self.tree,'Temporal_Coverage/Start_Date'), 
    117             helper.getText(self.tree,'Temporal_Coverage/Stop_Date'), 
    118             helper.getText(self.tree,'Data_Set_Progress') ) 
    119         self.timeCoverage=TimeCoverage(tc) 
     115        # nb, some DIFS use Stop Date, some use End Date 
     116        date=helper.find(self.tree,'Temporal_Coverage') 
     117        e1,e2=helper.getText(date,'Stop_Date'),helper.getText(date,'End_Date') 
     118        start=helper.getText(date,'Start_Date') 
     119        status=helper.getText(self.tree,'Data_Set_Progress') 
     120        if e1<>'': 
     121            self.timeCoverage=TimeCoverage((start,e1,status)) 
     122        else: 
     123            self.timeCoverage=TimeCoverage((start,e2,status)) 
    120124         
    121125        #load up those silly paleo keywords 
     
    126130             
    127131        #Data curator information 
    128         self.centre=DIFcontact(helper.find(self.tree,'Data_Center'),ctype='centre',helper=helper) 
    129         self.curator=DIFcontact(helper.find(self.tree,'Data_Curator'),ctype='centre',helper=helper) 
    130         if self.curator is None:self.curator=self.centre  
     132        self.centre=DIFcontact(helper,helper.find(self.tree,'Data_Center')) 
     133        self.curator=DIFcontact(helper,helper.find(self.tree,'Data_Curator')) 
     134        if self.curator.core is None:self.curator=self.centre  
    131135        
    132136        #Data Creators 
Note: See TracChangeset for help on using the changeset viewer.