Changeset 8265


Ignore:
Timestamp:
19/04/12 17:17:22 (8 years ago)
Author:
mnagni
Message:

Complete - # 22409: CEDA Observation - resultTime
 http://team.ceda.ac.uk/trac/ceda/ticket/22409

Location:
mauRepo/MolesManager/trunk/src/libs/migration/processor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/commons.py

    r8258 r8265  
    203203    return _returnNotNoneText(creationDate) 
    204204 
     205def findMolesPublishedDate(resourceXML): 
     206    creationDate = resourceXML.find('%sentity/%smolesISO/%spublished' % (molesNS, molesNS, molesNS)) 
     207    return _returnNotNoneText(creationDate) 
     208 
    205209def findMolesLineage(dataEntityMigration): 
    206210    resourceXML = getAtomDocumentByMO(dataEntityMigration) 
     
    228232    resourceXML = getAtomDocumentByMO(migrationObject) 
    229233    return findMolesCreationDate(resourceXML) 
     234 
     235def extractMolesPublishedDate(migrationObject): 
     236    resourceXML = getAtomDocumentByMO(migrationObject) 
     237    return findMolesPublishedDate(resourceXML) 
    230238 
    231239def extractQuality(dataEntityMigration): 
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/deployment.py

    r8263 r8265  
    2222    createMD_Metadata, createMO_OnlineResource, createCEDA_Review, calculateHash,\ 
    2323    createCI_ResponsibleParty, extractUpdateFrequency,\ 
    24     findLinksInMigrationDocument, findSubTypeInDPT 
     24    findLinksInMigrationDocument, findSubTypeInDPT, extractMolesPublishedDate 
    2525from ea_model.moles3_4.utilities.mo_rolevalue import MO_RoleValue 
    2626from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
     
    324324    def _assignCreationDate(self, observation): 
    325325        # TDB - Check that if is an update or not! 
    326         creation_date = extractMolesCreationDate(self._deploymentMigration) 
     326        creation_date = extractMolesPublishedDate(self._deploymentMigration) 
    327327        py_datetime = isoDateTimeStringToTimeDate(creation_date) 
    328328        date_time = createDateTime(py_datetime)     
Note: See TracChangeset for help on using the changeset viewer.