Changeset 5852


Ignore:
Timestamp:
20/10/09 11:53:37 (10 years ago)
Author:
sdonegan
Message:

Update creation date handling to mimic r5847 in MSI thread

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/tags/stable-TI01-ingestAutomation_Proglue_upgradesAndReporting/temp/OAIBatch/DIF.py

    r5047 r5852  
    7272        self.abbreviation=self.name[0:min(5,len(self.name))] 
    7373         
    74         #add some extra parameters here to extract further columns to aid in ranking & ordering         
    75         if len(helper.getText(self.tree,'DIF_Creation_Date')) < 1:             
    76             #set to null as bad timestamp will screw up the sql commands (will scan for it later) 
    77             self.metadataCreationDate='null' 
    78         else: 
    79             self.metadataCreationDate=helper.getText(self.tree,'DIF_Creation_Date') 
     74        #add some extra parameters here to extract further columns to aid in ranking & ordering 
     75                #updated to mimic trunk MSI dev at r5847 20/10/09 
     76                if len(helper.getText(self.tree,'Last_DIF_Revision_Date')) == '': 
     77                        self.metadataCreationDate=helper.getText(self.tree,'Last_DIF_Revision_Date') 
     78                else: 
     79                        self.metadataCreationDate=helper.getText(self.tree,'DIF_Creation_Date') 
     80                 
     81        #if len(helper.getText(self.tree,'DIF_Creation_Date')) < 1:             
     82            #set to null as bad timestamp will screw up the sql commands (will scan for it later)             
     83        #else: 
     84            #self.metadataCreationDate=helper.getText(self.tree,'DIF_Creation_Date') 
    8085             
    8186        self.datacentreName=helper.getText(self.tree,'Data_Center/Data_Center_Name/Short_Name') 
     
    126131        # use author here because a full dif entry for creator wont necessarily exist in citation ... 
    127132        self.authors=DIFAuthors(self.tree,helper) 
    128         self.date=dateParse(helper.getText(self.tree,'Data_Set_Citation/Dataset_Release_Date'),'YYYY') 
     133        self.date=dateParse(helper.getText(self.tree,'Data_Set_Citation/Dataset_Release_Date'),'YYYY')  
    129134        if self.date=='': self.date='XXXX' 
    130135        self.title=helper.getText(self.tree,'Data_Set_Citation/Dataset_Title') 
Note: See TracChangeset for help on using the changeset viewer.