From aab0341bea0d10fcdf287aa29d4cb6dfc4e65d4e Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Mon, 27 Sep 2021 12:19:24 +0300 Subject: [PATCH] [Explore | Trunk]: 1. dataProvider.service.ts & project.service.ts & resultLanding.service.ts & searchDataproviders.service.ts & searchOrganizations.service.ts & searchProjects.service.ts & searchResearchResults.service.ts: Removed case sensitivity in parsing relations (rels.rel.to.class). 2. orcid.service.ts: Removed unused imports | Added comment related to KPI metrics calculated by orcid API. --- landingPages/dataProvider/dataProvider.service.ts | 2 +- landingPages/project/project.service.ts | 4 ++-- landingPages/result/resultLanding.service.ts | 12 ++++++------ orcid/orcid.service.ts | 5 ++--- services/searchDataproviders.service.ts | 2 +- services/searchOrganizations.service.ts | 2 +- services/searchProjects.service.ts | 2 +- services/searchResearchResults.service.ts | 2 +- 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/landingPages/dataProvider/dataProvider.service.ts b/landingPages/dataProvider/dataProvider.service.ts index 3882851f..7446a6c7 100644 --- a/landingPages/dataProvider/dataProvider.service.ts +++ b/landingPages/dataProvider/dataProvider.service.ts @@ -240,7 +240,7 @@ export class DataProviderService { for(let i=0; i(); diff --git a/landingPages/project/project.service.ts b/landingPages/project/project.service.ts index ae4c65d6..b74a1d37 100644 --- a/landingPages/project/project.service.ts +++ b/landingPages/project/project.service.ts @@ -174,7 +174,7 @@ export class ProjectService { this.projectInfo.organizations = [];//new Map(); if(!Array.isArray(data[2])) { - if(data[2].hasOwnProperty("to") && data[2]['to'].class == "hasParticipant") { + if(data[2].hasOwnProperty("to") && data[2]['to'].class && data[2]['to'].class.toLowerCase() == "hasparticipant") { let acronym: string = ""; let name: string = ""; let id: string = ""; @@ -200,7 +200,7 @@ export class ProjectService { let acronym: string = ""; let name: string = ""; let id: string = ""; - if(data[2][i].hasOwnProperty("to") && data[2][i]['to'].class == "hasParticipant") { + if(data[2][i].hasOwnProperty("to") && data[2][i]['to'].class && data[2][i]['to'].class.toLowerCase() == "hasparticipant") { if(data[2][i].hasOwnProperty("legalshortname")) { acronym = data[2][i].legalshortname; } diff --git a/landingPages/result/resultLanding.service.ts b/landingPages/result/resultLanding.service.ts index c4e029f6..6d0a2ee8 100644 --- a/landingPages/result/resultLanding.service.ts +++ b/landingPages/result/resultLanding.service.ts @@ -185,22 +185,22 @@ export class ResultLandingService { for(let i=0; i(); diff --git a/services/searchResearchResults.service.ts b/services/searchResearchResults.service.ts index 92b0a2d8..1877c7a9 100644 --- a/services/searchResearchResults.service.ts +++ b/services/searchResearchResults.service.ts @@ -305,7 +305,7 @@ export class SearchResearchResultsService { let relation = Array.isArray(resData['rels']['rel']) ? resData['rels']['rel'][j] : resData['rels']['rel']; if (relation.hasOwnProperty("to")) { - if (relation['to'].class == "isProducedBy") { + if (relation['to'].class && relation['to'].class.toLowerCase() == "isproducedby") { result['projects'] = this.parseProjects(result['projects'], relation); } }