[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
This commit is contained in:
parent
0a23dd3d3b
commit
b76db39510
|
@ -476,21 +476,21 @@ export class ParsingFunctions {
|
|||
parseIdentifiers(pid: any): Map<string, string[]> {
|
||||
let identifiers = new Map<string, string[]>();
|
||||
|
||||
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<string>());
|
||||
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<string>());
|
||||
}
|
||||
|
||||
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<string>());
|
||||
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<string>());
|
||||
}
|
||||
identifiers.get(pid[i].classname).push(pid[i].content);
|
||||
identifiers.get(pid[i].classid).push(pid[i].content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue