From e99a4258135aab1c1147aaaf60e06dbd63d77505 Mon Sep 17 00:00:00 2001 From: "konstantina.galouni" Date: Tue, 9 Nov 2021 23:04:01 +0200 Subject: [PATCH] 1. environments/ & env-properties.json: #7159: "doiURL" property updated from https://dx.doi.org/ to https://doi.org/. 2. searchDatacite.service.ts & searchOrcid.service.ts: #7159: In result.url "doiURL" property is used instead of a constant prefix. 3. parsingFunctions.class.ts: #7155: Added field "instanceWithDoiExists", to check if publisher with doi related url should be added as instance (download from section). 4. showIdentifiers.component.ts: Removed "space" class from external icon. 5. relatedDatasourcesTab.component.ts: #7004: Updated message on top of the tab. --- claims/claim-utils/service/searchDatacite.service.ts | 3 ++- claims/claim-utils/service/searchOrcid.service.ts | 3 ++- .../dataProvider/relatedDatasourcesTab.component.ts | 2 +- landingPages/landing-utils/parsingFunctions.class.ts | 12 +++++++++--- .../landing-utils/showIdentifiers.component.ts | 8 ++++---- 5 files changed, 18 insertions(+), 10 deletions(-) diff --git a/claims/claim-utils/service/searchDatacite.service.ts b/claims/claim-utils/service/searchDatacite.service.ts index 03299674..887b6a7e 100644 --- a/claims/claim-utils/service/searchDatacite.service.ts +++ b/claims/claim-utils/service/searchDatacite.service.ts @@ -4,6 +4,7 @@ import {HttpClient} from '@angular/common/http'; import {EnvProperties} from '../../../utils/properties/env-properties'; import {ClaimEntity, ClaimResult} from '../claimHelper.class'; import {catchError, map} from 'rxjs/operators'; +import {properties} from "../../../../../environments/environment"; @Injectable() @@ -55,7 +56,7 @@ export class SearchDataciteService { entity.result.DOI = item.attributes.doi; entity.id = item.attributes.doi; entity.title = item.attributes.title; - entity.result.url = 'http://dx.doi.org/' + item.attributes.doi; + entity.result.url = properties.doiURL + item.attributes.doi; entity.result.source = 'datacite'; entity.type = 'dataset'; entity.result.date = item.attributes.published; diff --git a/claims/claim-utils/service/searchOrcid.service.ts b/claims/claim-utils/service/searchOrcid.service.ts index 1b10aa5d..208ce16e 100644 --- a/claims/claim-utils/service/searchOrcid.service.ts +++ b/claims/claim-utils/service/searchOrcid.service.ts @@ -4,6 +4,7 @@ import {EnvProperties} from '../../../utils/properties/env-properties'; import {ClaimEntity, ClaimResult} from '../claimHelper.class'; import {map} from "rxjs/operators"; import {StringUtils} from "../../../utils/string-utils.class"; +import {properties} from "../../../../../environments/environment"; @Injectable() @@ -114,7 +115,7 @@ export class SearchOrcidService { const id = item['external-ids']['external-id'][j]; if (id['external-id-type'] == "doi") { entity.result.DOI = id['external-id-value']; - entity.result.url = "http://dx.doi.org/" + entity.result.DOI; + entity.result.url = properties.doiURL + entity.result.DOI; break; }else if (id['external-id-type'] == "handle" && !handleId) { handleId= id['external-id-value']; diff --git a/landingPages/dataProvider/relatedDatasourcesTab.component.ts b/landingPages/dataProvider/relatedDatasourcesTab.component.ts index fa6c0f64..b17539ec 100644 --- a/landingPages/dataProvider/relatedDatasourcesTab.component.ts +++ b/landingPages/dataProvider/relatedDatasourcesTab.component.ts @@ -17,7 +17,7 @@ import {properties} from "../../../../environments/environment";
- *Only top 100 content providers that host research outcomes and are aggregated by {{collectedFromName}} are shown. + *Only top 100 content providers that host research outcomes which are also available via the Federated Research Data Repository are shown.
/*, title: { "name": string, "url": string, "accessMode": string}*/) { - if (publisher && identifiers != null && identifiers.has('doi')) { + if (!this.instanceWithDoiExists && publisher && identifiers != null && identifiers.has('doi')) { if (hostedBy_collectedFrom == null) { hostedBy_collectedFrom = []; } @@ -172,7 +175,7 @@ export class ParsingFunctions { available.downloadName = publisher; } - let url = "https://dx.doi.org/" + identifiers.get("doi")[0]; + let url = properties.doiURL + identifiers.get("doi")[0]; available.downloadUrl = new Array(); available.accessMode = new Array(); @@ -311,6 +314,9 @@ export class ParsingFunctions { available.accessMode = new Array(); available.downloadUrl = new Array(); available['downloadUrl'].push(url); + if(url.includes("doi.org/")) { + this.instanceWithDoiExists = true; + } if (instance.hasOwnProperty("accessright")) { if (url) { available['accessMode'].push(instance['accessright'].classname); @@ -352,7 +358,7 @@ export class ParsingFunctions { } else { available.icon = this.unknown; } - + hostedBy_collectedFrom.push(available); } diff --git a/landingPages/landing-utils/showIdentifiers.component.ts b/landingPages/landing-utils/showIdentifiers.component.ts index b3e78bf8..8c064837 100644 --- a/landingPages/landing-utils/showIdentifiers.component.ts +++ b/landingPages/landing-utils/showIdentifiers.component.ts @@ -25,16 +25,16 @@ import {properties} from "../../../../environments/environment"; {{key}}: - {{item}} + {{item}} - {{item}} + {{item}} - {{item}} + {{item}} - {{item}} + {{item}} ,