Changeset 8415 for mauRepo/MolesManager
- Timestamp:
- 27/06/12 10:34:37 (9 years ago)
- Location:
- mauRepo/MolesManager/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
mauRepo/MolesManager/trunk/src/MolesManager/static/js/cedaObservation.js
r8287 r8415 101 101 if (typeof coObs.relatedParty[loopVal].role !='undefined'){ 102 102 103 if (typeof coObs.relatedParty[loopVal].role .name !='undefined' && coObs.relatedParty[loopVal].role.name !=null && coObs.relatedParty[loopVal].party.length > 0){104 //console.log(coObs.relatedParty[loopVal].role .name,loopVal)103 if (typeof coObs.relatedParty[loopVal].role !='undefined' && coObs.relatedParty[loopVal].role !=null && coObs.relatedParty[loopVal].party.length > 0){ 104 //console.log(coObs.relatedParty[loopVal].role,loopVal) 105 105 for (loopInner=0; loopInner<coObs.relatedParty[loopVal].party.length; loopInner++){ 106 106 var innerDetails = {}; 107 107 innerDetails['type'] = coObs.relatedParty[loopVal].party[loopInner].__class__ 108 108 109 if (coObs.relatedParty[loopVal].role .name == 'cl_pointofcontact'){109 if (coObs.relatedParty[loopVal].role == 'pointofcontact'){ 110 110 try{ 111 111 innerDetails['helpEmail'] = coObs.relatedParty[loopVal].party[loopInner].contactInfo[0].address.electronicMailAddress[0]; … … 118 118 details[coObs.relatedParty[loopVal].party[loopInner].name] = innerDetails 119 119 120 relatedPartyDict[coObs.relatedParty[loopVal].role .name] = details;//names;120 relatedPartyDict[coObs.relatedParty[loopVal].role] = details;//names; 121 121 } 122 122 } … … 147 147 function createCitation(coObs,ids,rps,pubDetails,guid){ 148 148 var citationString =''; 149 authName = Object.keys(rps[' cl_author'])[0]150 citationString += '<p>' + citeNameArrange(authName,rps[' cl_author'][authName].type);151 if (rps.hasOwnProperty('c l_coinvestigator')){149 authName = Object.keys(rps['author'])[0] 150 citationString += '<p>' + citeNameArrange(authName,rps['author'][authName].type); 151 if (rps.hasOwnProperty('coinvestigator')){ 152 152 var orgCoauth = ''; 153 153 var indCoauth = ''; 154 154 155 for (loopVal=0; loopVal<Object.keys(rps['c l_coinvestigator']).length; loopVal++){155 for (loopVal=0; loopVal<Object.keys(rps['coinvestigator']).length; loopVal++){ 156 156 157 var coInvName = Object.keys(rps['c l_coinvestigator'])[loopVal];157 var coInvName = Object.keys(rps['coinvestigator'])[loopVal]; 158 158 // console.log(coInvName) 159 // console.log(rps['c l_coinvestigator'][coInvName])160 // console.log(rps['c l_coinvestigator'][coInvName].type)161 if (rps['c l_coinvestigator'][coInvName].type == 'CI_Organisation'){162 orgCoauth += '; ' + citeNameArrange(coInvName,rps['c l_coinvestigator'][coInvName].type);159 // console.log(rps['coinvestigator'][coInvName]) 160 // console.log(rps['coinvestigator'][coInvName].type) 161 if (rps['coinvestigator'][coInvName].type == 'CI_Organisation'){ 162 orgCoauth += '; ' + citeNameArrange(coInvName,rps['coinvestigator'][coInvName].type); 163 163 } 164 164 else { 165 165 166 indCoauth +='; ' + citeNameArrange(coInvName,rps['c l_coinvestigator'][coInvName].type);166 indCoauth +='; ' + citeNameArrange(coInvName,rps['coinvestigator'][coInvName].type); 167 167 } 168 168 } … … 179 179 } 180 180 181 if (rps.hasOwnProperty(' cl_publisher')){182 citationString += ' ' + Object.keys(rps[' cl_publisher'])[0] +'.';181 if (rps.hasOwnProperty('publisher')){ 182 citationString += ' ' + Object.keys(rps['publisher'])[0] +'.'; 183 183 } 184 184 else { … … 385 385 var access_id = new dojo.html.set(dojo.byId("access_id"),accessLink(coObs.permission)); 386 386 387 var help_id = new dojo.html.set(dojo.byId("help_id"),rps[' cl_pointofcontact'][Object.keys(rps['cl_pointofcontact'])[0]].helpString);387 var help_id = new dojo.html.set(dojo.byId("help_id"),rps['pointofcontact'][Object.keys(rps['pointofcontact'])[0]].helpString); 388 388 389 389 drawMap(coObs.geographicExtent,'map',ids); -
mauRepo/MolesManager/trunk/src/libs/migration/processor/commons.py
r8409 r8415 456 456 return _returnNotNoneText(title) 457 457 458 def extractSummary( deploymentMigration, dataEntityMigration):459 resourceXML = getAtomDocumentByMO( deploymentMigration)458 def extractSummary(migrationObject): 459 resourceXML = getAtomDocumentByMO(migrationObject) 460 460 summary = resourceXML.find('%ssummary' % (atomNS)) 461 461 return _returnNotNoneText(summary) … … 738 738 return ci_date 739 739 740 def createCI_Citation(title, date = None, citedResponsibleParty = None):740 def createCI_Citation(title, date = None, icitedResponsibleParty = None): 741 741 """ 742 742 Creates a new CI_Citation 743 743 @param title: the CI_Citation title 744 744 @param date: an array of CI_Date instances 745 @param citedResponsibleParty: a list of CI_ResponsibleParty instances745 @param icitedResponsibleParty: a list of CI_ResponsibleParty instances 746 746 """ 747 747 ci_citation = CI_Citation() … … 749 749 if date and type(date) == list: 750 750 ci_citation.date.extend(date) 751 if citedResponsibleParty:752 ci_citation. extend(citedResponsibleParty)751 if icitedResponsibleParty: 752 ci_citation.citedResponsibleParty.extend(icitedResponsibleParty) 753 753 return ci_citation 754 754 -
mauRepo/MolesManager/trunk/src/libs/migration/processor/dataEntity.py
r8409 r8415 109 109 if doc_date: 110 110 i_date = createDate(isoDateTimeStringToTimeDate(doc_date)) 111 ci_dates.append(createCI_Date( CI_DateTypeCode.cl_publication, date = i_date))111 ci_dates.append(createCI_Date(getCLValue(CI_DateTypeCode.cl_publication), date = i_date)) 112 112 113 113 doc_date = findUpdatedDate(self._dataEntityMigration) 114 114 if doc_date: 115 115 i_date = createDate(isoDateTimeStringToTimeDate(doc_date)) 116 ci_dates.append(createCI_Date( CI_DateTypeCode.cl_revision, date = i_date))116 ci_dates.append(createCI_Date(getCLValue(CI_DateTypeCode.cl_revision), date = i_date)) 117 117 118 118 i_citation = createCI_Citation(title = 'ceda_moles2_citation', date=ci_dates) -
mauRepo/MolesManager/trunk/src/libs/migration/processor/deployment_data.py
r8408 r8415 36 36 createMO_OnlineResource, findLinksInDeployment 37 37 from ea_model.moles3_4.utilities.ceda_publicationstatevalue import CEDA_PublicationStateValue 38 from MolesManager.codelist import getCLValue 38 39 39 40 class DeploymentDataProcessor(object): … … 64 65 i_documentation = createCI_Citation("Documentation resource") 65 66 i_resource = createMO_OnlineResource(doc_link[0]['href']) 66 project = createCEDA_Project(abstract=i_abstract, publication_state= CEDA_PublicationStateValue.cl_working, \67 project = createCEDA_Project(abstract=i_abstract, publication_state=getCLValue(CEDA_PublicationStateValue.cl_working), \ 67 68 documentation=i_documentation, project_resource=i_resource) 68 69 self._commitDeploymentMigration(project, activity, 'ceda_project_id')
Note: See TracChangeset
for help on using the changeset viewer.