Ignore:
Timestamp:
12/04/12 11:33:53 (8 years ago)
Author:
mnagni
Message:

Incomplete - # 22385: CEDA Observation - result
 http://team.ceda.ac.uk/trac/ceda/ticket/22385

File:
1 edited

Legend:

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

    r8218 r8221  
    333333    """ 
    334334    linksDict = findLinksInMigrationDocument(migrationObject) 
    335     return linksDict['DOWNLOAD'] 
     335    if linksDict.has_key('DOWNLOAD'): 
     336        return linksDict['DOWNLOAD']     
     337    return {}        
    336338 
    337339def findAccessLinksInMigrationDocument(migrationObject): 
     
    343345    """ 
    344346    linksDict = findLinksInMigrationDocument(migrationObject) 
    345     return linksDict['ACCESS'] 
     347    if linksDict.has_key('ACCESS'): 
     348        return linksDict['ACCESS']      
     349    return {}     
    346350 
    347351def findDocumentationInMigrationDocument(migrationObject): 
     
    353357    """ 
    354358    linksDict = findLinksInMigrationDocument(migrationObject) 
    355     return linksDict['DOCUMENT'] 
     359    if linksDict.has_key('DOCUMENT'): 
     360        return linksDict['DOCUMENT']      
     361    return {} 
    356362 
    357363def findDOIInMigrationDocument(migrationObject): 
     
    652658    mo_responsableInfo = MO_ResponsiblePartyInfo() 
    653659    mo_responsableInfo.role = role 
    654     mo_responsableInfo.party = i_party 
     660    mo_responsableInfo.party.extend(i_party) 
    655661    return mo_responsableInfo 
    656662 
     
    770776        @param applicationProfile: the MO_OnlineResource.applicationProfile field 
    771777    """ 
    772     on_line_resource = MO_OnlineResource() 
    773     url = URL() 
    774     #url.???? = linkage     
    775     on_line_resource.linkage = url 
     778    on_line_resource = MO_OnlineResource()     
     779    on_line_resource.linkage = linkage 
    776780    if name:  
    777781        on_line_resource.name = name 
     
    784788    return on_line_resource         
    785789 
    786 def createCEDA_Result(linkage, name = None, function = None, description = None, applicationProfile = None): 
     790def createCEDA_Result(curation_category, internal_path, source = None): 
    787791    """ 
    788792        Creates a new CEDA_Result 
    789         @param linkage: the CEDA_Result.source.linkage.url.??? field 
    790         @param name: the CEDA_Result.source.linkage.name field 
    791         @param function: the CEDA_Result.source.function field  
     793        @param curation_category: a CEDA_CurationValue instance 
     794        @param internal_path: a String  
     795        @param source: an array of MO_OnlineResource instances 
    792796    """ 
    793797    ceda_result = CEDA_Result() 
    794     on_line_resource = createMO_OnlineResource(linkage, name, function, description, applicationProfile)         
    795     ceda_result.source.append(on_line_resource) 
     798    ceda_result.curationCategory = curation_category 
     799    ceda_result.internalPath = internal_path            
     800    if source:  
     801        ceda_result.source = source 
    796802    return ceda_result 
    797803 
Note: See TracChangeset for help on using the changeset viewer.