Changeset 8196 for mauRepo


Ignore:
Timestamp:
28/03/12 23:03:47 (8 years ago)
Author:
mnagni
Message:

Incomplete - # 22418: CEDA Observation - moles2 link
 http://team.ceda.ac.uk/trac/ceda/ticket/22418

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

Legend:

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

    r8195 r8196  
    9494    ''' 
    9595        @param docStatus: one value from commons.docStatus 
    96         @param docType: one value from commons.docCollections  
     96        @param docType: one value from commons.docTypes  
    9797        @param docOwner: one value from commons.docOwners 
    9898        @param docName: one value from commons.docOwners         
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/deployment.py

    r8195 r8196  
    1818    createCI_Telephone, extractMolesTemporalRange, isoDateStringToTimeDate,\ 
    1919    createTM_Period, createCI_Individual, findAccessLinksInMigrationDocument,\ 
    20     findLinksInDeployment 
     20    findLinksInDeployment, DT_DEPLOYMENTS, buildExistDocPath 
    2121from ea_model.moles3_4.utilities.mo_rolevalue import MO_RoleValue 
    2222from ea_model.ceda_metadatamodel.ceda_observation.ceda_observation import CEDA_Observation 
     
    247247                ci_date = createCI_Date(CI_DateTypeCode.cl_publication, date = dt) 
    248248            if ci_date:                 
    249                 identifier.authority = createCI_Citation("", date = ci_date)  
    250             Moles3EPB.addIdentifierToObservation(identifier, observation, self._migrationSessions.molesSession)                     
     249                identifier.authority = createCI_Citation("", date = ci_date) 
     250            moles3Append(observation, 'identifier', identifier)                  
     251            #Moles3EPB.addIdentifierToObservation(identifier, observation, self._migrationSessions.molesSession)                     
    251252 
    252253    def _assignPublisherCurator(self, observation):         
     
    311312        ## TO BE DONE 
    312313             
    313              
    314               
     314    def _assignMoles2Link(self, ceda_observation): 
     315        i_code = 'http://badc.nerc.ac.uk/view/%s__ATOM__%s' % (self._deploymentMigration.doc_owner, self._deploymentMigration.doc_name) 
     316        i_code = i_code.replace('.atom', '') 
     317        #i_code = buildExistDocPath(self._deploymentMigration.doc_status, DT_DEPLOYMENTS, self._deploymentMigration.doc_owner, self._deploymentMigration.doc_name) 
     318        i_authority = createCI_Citation('moles2url') 
     319        identifier = createMD_Identifier(code = i_code, authority = i_authority) 
     320        moles3Append(ceda_observation, 'identifier', identifier) 
    315321 
    316322     
     
    330336        self._assignPhenomenonTime(ceda_observation)         
    331337        self._assignPermission(ceda_observation)         
     338        self._assignMoles2Link(ceda_observation)         
    332339        #self._migrationSessions.molesSession.commit() 
    333340        #self._commitMoles3() 
Note: See TracChangeset for help on using the changeset viewer.