[Library | Trunk]
update parsing for doi - add check if it is array and get value when it is not git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@60159 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
d738597882
commit
75e2d6bcdc
|
@ -183,6 +183,13 @@ export class SearchResearchResultsService {
|
||||||
}
|
}
|
||||||
/////////////////////////// Athena Code ///////////////////////////
|
/////////////////////////// Athena Code ///////////////////////////
|
||||||
if(resData['pid']) {
|
if(resData['pid']) {
|
||||||
|
if(!Array.isArray(resData['pid'])) {
|
||||||
|
if(resData['pid'].classid && resData['pid'].classid == 'doi'){
|
||||||
|
if(resData['pid'].content != '' && resData['pid'].content != null){
|
||||||
|
result.DOIs.push(resData['pid'].content.replace("https://doi.org/",""));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
for(let i=0; i<resData['pid'].length; i++){
|
for(let i=0; i<resData['pid'].length; i++){
|
||||||
if(resData['pid'][i].classid == 'doi'){
|
if(resData['pid'][i].classid == 'doi'){
|
||||||
if(resData['pid'][i].content != '' && resData['pid'][i].content != null){
|
if(resData['pid'][i].content != '' && resData['pid'][i].content != null){
|
||||||
|
@ -191,6 +198,7 @@ export class SearchResearchResultsService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
/////////////////////////// Athena Code ///////////////////////////
|
/////////////////////////// Athena Code ///////////////////////////
|
||||||
if(resData['programmingLanguage'] && resData['programmingLanguage'] != null) {
|
if(resData['programmingLanguage'] && resData['programmingLanguage'] != null) {
|
||||||
result.programmingLanguages = new Array<string>();
|
result.programmingLanguages = new Array<string>();
|
||||||
|
|
Loading…
Reference in New Issue