[Library] Claims: fix id field from orcid results
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@54766 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
93b760143a
commit
cd7da4cc3b
|
@ -61,7 +61,7 @@ export class SearchOrcidService {
|
||||||
return this.http.get(url, { headers: headers })
|
return this.http.get(url, { headers: headers })
|
||||||
.map(res => res.json()['group'])
|
.map(res => res.json()['group'])
|
||||||
.do(res => console.log(res))
|
.do(res => console.log(res))
|
||||||
.map(request => (parse?this.parse(request):request));
|
.map(request => (parse?this.parse(id, request):request));
|
||||||
//.map(res => res['orcid-work']);
|
//.map(res => res['orcid-work']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ export class SearchOrcidService {
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
parse(response):ClaimResult[]{
|
parse(authorId, response):ClaimResult[]{
|
||||||
var results:ClaimResult[] = [];
|
var results:ClaimResult[] = [];
|
||||||
for(var i=0; i<response.length; i++){
|
for(var i=0; i<response.length; i++){
|
||||||
var item=response[i];
|
var item=response[i];
|
||||||
|
@ -152,11 +152,11 @@ export class SearchOrcidService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.id = item['put-code'];
|
result.id = authorId+"-"+item['put-code'];
|
||||||
if(item.title && item.title.title){
|
if(item.title && item.title.title){
|
||||||
result.title = item['title']['title'].value;
|
result.title = item['title']['title'].value;
|
||||||
}
|
}
|
||||||
result.journal = item['journal-title'];
|
result.journal = item['journal-title'];
|
||||||
result.source = 'orcid';
|
result.source = 'orcid';
|
||||||
result.type = 'publication';
|
result.type = 'publication';
|
||||||
if(item['publication-date'] && item['publication-date']['year']){
|
if(item['publication-date'] && item['publication-date']['year']){
|
||||||
|
|
Loading…
Reference in New Issue