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.
This commit is contained in:
Konstantina Galouni 2021-11-09 23:04:01 +02:00
parent fcf29d801f
commit e99a425813
5 changed files with 18 additions and 10 deletions

View File

@ -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;

View File

@ -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'];

View File

@ -17,7 +17,7 @@ import {properties} from "../../../../environments/environment";
<div *ngIf="fetchResults.searchUtils.status == errorCodes.DONE && !loading">
<div class="uk-text-muted uk-text-small uk-margin-bottom">
*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.
</div>
<no-load-paging *ngIf="results.length >pageSize"
[type]="'content providers'"

View File

@ -1,6 +1,7 @@
import {HostedByCollectedFrom, Journal, Project, RelationResult} from "../../utils/result-preview/result-preview";
import {Reference} from "../../utils/entities/resultLandingInfo";
import {Injectable} from '@angular/core';
import {properties} from "../../../../environments/environment";
@Injectable({
providedIn: 'root'
@ -15,6 +16,8 @@ export class ParsingFunctions {
public closed = 'assets/common-assets/lock.svg';
public unknown = 'assets/common-assets/question.svg';
private instanceWithDoiExists: boolean = false;
constructor() {
}
@ -150,7 +153,7 @@ export class ParsingFunctions {
addPublisherToHostedBy_collectedFrom(hostedBy_collectedFrom: HostedByCollectedFrom[],
publisher: string, journal: Journal,
identifiers: Map<string, string[]>/*, 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<string>();
available.accessMode = new Array<string>();
@ -311,6 +314,9 @@ export class ParsingFunctions {
available.accessMode = new Array<string>();
available.downloadUrl = new Array<string>();
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);
}

View File

@ -25,16 +25,16 @@ import {properties} from "../../../../environments/environment";
<span class="uk-text-bold uk-text-uppercase">{{key}}: </span>
<ng-container *ngFor="let item of identifiers.get(key) let j=index">
<a *ngIf="key=='doi'" [href]="properties.doiURL + item" target="_blank" class="uk-display-inline">
{{item}} <span class="custom-external custom-icon space"></span>
{{item}} <span class="custom-external custom-icon"></span>
</a>
<a *ngIf="key=='pmc'" [href]="properties.pmcURL + item" target="_blank">
{{item}} <span class="custom-external custom-icon space"></span>
{{item}} <span class="custom-external custom-icon"></span>
</a>
<a *ngIf="key=='pmid'" [href]="properties.pmidURL + item" target="_blank">
{{item}} <span class="custom-external custom-icon space"></span>
{{item}} <span class="custom-external custom-icon"></span>
</a>
<a *ngIf="key=='handle'" [href]="properties.handleURL + item" target="_blank">
{{item}} <span class="custom-external custom-icon space"></span>
{{item}} <span class="custom-external custom-icon"></span>
</a>
<ng-container *ngIf="(j !== (identifiers.get(key).length - 1))">, </ng-container>
</ng-container>