Ignore:
Timestamp:
19/04/12 11:56:51 (8 years ago)
Author:
mnagni
Message:
 
File:
1 edited

Legend:

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

    r8256 r8258  
    4848from ea_model.iso_19115_2006_metadata_corrigendum.citation_and_responsible_party_information.ci_rolecode import CI_RoleCode 
    4949from ea_model.iso_19115_2006_metadata_corrigendum.maintenance_information.md_maintenancefrequencycode import MD_MaintenanceFrequencyCode 
     50from ea_model.ceda_metadatamodel.ceda_result.ceda_curationvalue import CEDA_CurationValue 
    5051 
    5152class DeploymentProcessor(object): 
     
    274275                                              self._deploymentMigration.ceda_observation_id) 
    275276        return ceda_observation 
    276  
    277     def _getcurationcategory(self, curationcategory): 
    278         """ 
    279             Returns a CEDA_CurationValue code if the parameter match any CEDA_CurationValue code 
    280             @param curationcategory: a String  
    281         """ 
    282         if curationcategory is None: 
    283             return None 
    284          
    285         for code in ceda_curationvalue.CEDA_CurationValue.__dict__: 
    286             if code.startswith('cl_'): 
    287                 if code.lower() == curationcategory.lower(): 
    288                     return code 
    289         return None 
    290277         
    291278 
     
    310297                                                   function = CI_OnLineFunctionCode.cl_download, \ 
    311298                                                   description = int_description, applicationProfile = int_applicationProfile) 
    312             dataentity_id = '%s__ATOM__%s' % (self._dataEntityMigration.doc_owner, self._dataEntityMigration.doc_name) 
    313             dataentity_id = dataentity_id.replace('.atom', '')            
    314             infodb_de = InfodbEPB.getCedaInfoApp_dataentityByDE_ID(dataentity_id) 
    315             i_logical_path = '/dummy' 
    316             if infodb_de['logical_path']: 
    317                 i_logical_path = infodb_de['logical_path'] 
    318              
    319             i_category = ceda_curationvalue.CEDA_CurationValue.cl_a                             
    320             if infodb_de['category']: 
    321                 i_category = self._getcurationcategory(infodb_de['category']) 
    322                  
    323             observation.result = createCEDA_Result(i_category, i_logical_path, source = [i_source])                                 
     299             
     300        dataentity_id = '%s__ATOM__%s' % (self._dataEntityMigration.doc_owner, self._dataEntityMigration.doc_name) 
     301        dataentity_id = dataentity_id.replace('.atom', '')            
     302        infodb_de = InfodbEPB.getCedaInfoApp_dataentityByDE_ID(dataentity_id) 
     303        i_logical_path = '/dummy' 
     304        if infodb_de['logical_path']: 
     305            i_logical_path = infodb_de['logical_path'] 
     306         
     307        i_category = ceda_curationvalue.CEDA_CurationValue.cl_a                             
     308        if infodb_de['category']: 
     309            i_category = CEDA_CurationValue.from_string(infodb_de['category'].lower()) #self._getcurationcategory(infodb_de['category'])                 
     310        observation.result = createCEDA_Result(i_category, i_logical_path, source = [i_source])                                 
    324311 
    325312 
Note: See TracChangeset for help on using the changeset viewer.