From b76db395104e4c6309cff5d1d72a88aa43f9873c Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 13 Jul 2020 11:48:22 +0000 Subject: [PATCH] [Trunk | Library]: parsingFunctions.class.ts: [Bug fix] Parsing for "pid" field updated - group identifiers by "classid" not "classname". git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@59087 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../landing-utils/parsingFunctions.class.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts index a319f120..2c06cc8d 100644 --- a/landingPages/landing-utils/parsingFunctions.class.ts +++ b/landingPages/landing-utils/parsingFunctions.class.ts @@ -476,21 +476,21 @@ export class ParsingFunctions { parseIdentifiers(pid: any): Map { let identifiers = new Map(); - if (pid.hasOwnProperty("classname") && pid['classname'] != "") { - if (pid.classname == "doi" || pid.classname == "pmc" || pid.classname == "handle" || pid.classname == "pmid") { - if (!identifiers.has(pid.classname)) { - identifiers.set(pid.classname, new Array()); + if (pid.hasOwnProperty("classid") && pid['classid'] != "") { + if (pid.classid == "doi" || pid.classid == "pmc" || pid.classid == "handle" || pid.classid == "pmid") { + if (!identifiers.has(pid.classid)) { + identifiers.set(pid.classid, new Array()); } - identifiers.get(pid.classname).push(pid.content); + identifiers.get(pid.classid).push(pid.content); } } else { for (let i = 0; i < pid.length; i++) { - if (pid[i].classname == "doi" || pid[i].classname == "pmc" || pid[i].classname == "handle" || pid[i].classname == "pmid") { - if (!identifiers.has(pid[i].classname)) { - identifiers.set(pid[i].classname, new Array()); + if (pid[i].classid == "doi" || pid[i].classid == "pmc" || pid[i].classid == "handle" || pid[i].classid == "pmid") { + if (!identifiers.has(pid[i].classid)) { + identifiers.set(pid[i].classid, new Array()); } - identifiers.get(pid[i].classname).push(pid[i].content); + identifiers.get(pid[i].classid).push(pid[i].content); } } }