Ignore:
Timestamp:
07/07/09 12:32:27 (10 years ago)
Author:
sdonegan
Message:

Allow start date to be inserted into new column in original doc to allow ordering by date - even if no date entry in record

Location:
TI01-discovery/branches/ingestAutomation-upgrade/OAIBatch
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • TI01-discovery/branches/ingestAutomation-upgrade/OAIBatch/PostgresDAO.py

    r5416 r5464  
    293293            self._record.originalFormat + "', '" + self._record.getAuthorsInfo() + "', '" + \ 
    294294            self._record.getParametersInfo() + "', '" + self._record.getScopeInfo() + "', '" + \ 
    295             self._record.dataset_name + "', '" + self._record.datacentre_name + "', '" + self._record.dataset_lastEdit + "');"  
     295            self._record.dataset_name + "', '" + self._record.datacentre_name + "', '" + self._record.dataset_lastEdit + "', '" + self.datasetStartNom+ "');"  
    296296 
    297297        id = self.pgc.runSQLCommand(sqlCmd) 
     
    323323            self._record.discovery_id + "', '" + self._record.docType + "', '" + \ 
    324324            self._record.originalFormat + "', '" + self._record.getAuthorsInfo() + "', '" + \ 
    325             self._record.getParametersInfo() + "', '" + self._record.getScopeInfo() + "', '" + str(self._record.scn) + "', '" + self._record.dataset_name + "', '" + self._record.datacentre_name + "', '" + self._record.dataset_lastEdit +"');" 
     325            self._record.getParametersInfo() + "', '" + self._record.getScopeInfo() + "', '" + str(self._record.scn) + "', '" + self._record.dataset_name + "', '" + self._record.datacentre_name + "', '" + self._record.dataset_lastEdit + "', '" + self.datasetStartNom+ "');"  
    326326             
    327327        self.pgc.runSQLCommand(sqlCmd) 
  • TI01-discovery/branches/ingestAutomation-upgrade/OAIBatch/PostgresRecord.py

    r5415 r5464  
    3333         
    3434    #def __init__(self, filename, ndg_dataprovider, datacentre_groups, datacentre_namespace, discovery_id, xq, docType): 
    35     def __init__(self, filename, ndg_dataprovider, datacentre_groups, datacentre_namespace, discovery_id,datasetName,datacentreName,datasetLastEditUpdateDate, xq, docType): 
     35    def __init__(self, filename, ndg_dataprovider, datacentre_groups, datacentre_namespace, discovery_id,datasetName,datacentreName,datasetLastEditUpdateDate,datasetStartDateNom, xq, docType): 
    3636                  
    3737        logging.info("Setting up Postgres record for file, " + filename) 
     
    5757        self.dataset_lastEdit = datasetLastEditUpdateDate 
    5858        self.datacentre_name = datacentreName 
     59        self.datasetStartNom = datasetStartDateNom 
    5960 
    6061        self._molesFormat = None    # initialise this, so we can guarantee a value - to avoid using getattr 
  • TI01-discovery/branches/ingestAutomation-upgrade/OAIBatch/Utilities.py

    r5413 r5464  
    266266            self.datacentreName = helper.getText(et,'Data_Center/Data_Center_Name/Short_Name') 
    267267            self.metadataCreationDate=helper.getText(et,'DIF_Creation_Date') 
     268            self.datasetStartDateNom = helper.getText(et,'Temporal_Coverage/Start_Date') 
    268269             
    269270        elif self._datacentre_format == 'MDIP': 
     
    273274            self.datacentreName = helper.getText(et,'Distributor/DistributorName/DistributorNameName') 
    274275            self.metadataCreationDate=helper.getText(et,'DateOfUpdateOfMetadata') 
     276            self.datasetStartDateNom = helper.getText(et,'Date/DatasetStartDate') 
    275277        else: 
    276278            raise TypeError,'idget does not support datatype [%s]'%dataType 
  • TI01-discovery/branches/ingestAutomation-upgrade/OAIBatch/abstractdocumentingester.py

    r5414 r5464  
    137137                        datacentreName = basicParameters.datacentreName 
    138138                        datasetLastEditUpdateDate = basicParameters.metadataCreationDate 
     139                        datasetStartDateNom = basicParameters.datasetStartDateNom 
    139140                         
    140141                        #record whats attempting to be ingested 
     
    144145                        record = PostgresRecord(filename, self._NDG_dataProvider, \ 
    145146                                                            self._datacentre_groups, self._datacentre_namespace, \ 
    146                                                             discoveryID,datasetName,datacentreName,datasetLastEditUpdateDate, \ 
     147                                                            discoveryID,datasetName,datacentreName,datasetLastEditUpdateDate,datasetStartDateNom, \ 
    147148                                                            self._xq, self._datacentre_format) 
    148149                         
Note: See TracChangeset for help on using the changeset viewer.