diff --git a/landingPages/landing-utils/parsingFunctions.class.ts b/landingPages/landing-utils/parsingFunctions.class.ts index 105c54cf..d5d614a3 100644 --- a/landingPages/landing-utils/parsingFunctions.class.ts +++ b/landingPages/landing-utils/parsingFunctions.class.ts @@ -42,7 +42,7 @@ export class ParsingFunctions { "funderShortname": "", "funderName": "", "funding": "", "code": "", "provenanceAction": "", "validated": false }; - + if (relation.title != 'unidentified') { fundedByProject['id'] = relation['to'].content; fundedByProject['acronym'] = relation.acronym; @@ -538,7 +538,8 @@ export class ParsingFunctions { if (pid.hasOwnProperty("classid") && pid['classid'] != "") { if (pid.classid == "doi" || pid.classid == "pmc" || pid.classid == "handle" || pid.classid == "pmid" || pid.classid == "re3data" - || pid.classid == "swhid") { + || pid.classid == "swhid" + || pid.classid == "ROR" || pid.classid == "ISNI" || pid.classid == "Wikidata" || pid.classid == "FundRef") { if (!identifiers.has(pid.classid)) { identifiers.set(pid.classid, new Array()); } @@ -547,7 +548,8 @@ export class ParsingFunctions { } else { for (let i = 0; i < pid.length; i++) { if (pid[i].classid == "doi" || pid[i].classid == "pmc" || pid[i].classid == "handle" || pid[i].classid == "pmid" || pid[i].classid == "re3data" - || pid[i].classid == "swhid") { + || pid[i].classid == "swhid" + || pid[i].classid == "ROR" || pid[i].classid == "ISNI" || pid[i].classid == "Wikidata" || pid[i].classid == "FundRef") { if (!identifiers.has(pid[i].classid)) { identifiers.set(pid[i].classid, new Array()); } diff --git a/landingPages/landing-utils/showIdentifiers.component.ts b/landingPages/landing-utils/showIdentifiers.component.ts index 8a0b4680..11a15f14 100644 --- a/landingPages/landing-utils/showIdentifiers.component.ts +++ b/landingPages/landing-utils/showIdentifiers.component.ts @@ -26,8 +26,9 @@ import {properties} from "../../../../environments/environment"; {{key}}: - + {{item}} , @@ -113,7 +114,10 @@ export class ShowIdentifiersComponent implements AfterViewInit { }); } - public getUrl(key: string): string { + public getUrl(key: string, value: string): string { + if(value.includes("http://") || value.includes("https://")) { + return ""; + } if(key == "doi") { return properties.doiURL; } else if(key == "pmc") { @@ -126,6 +130,14 @@ export class ShowIdentifiersComponent implements AfterViewInit { return properties.r3DataURL; } else if(key == "swhid") { return properties.swhURL; + } else if(key == "ROR") { + return properties.rorURL; + } else if(key == "ISNI") { + return properties.isniURL; + } else if(key == "Wikidata") { + return properties.wikiDataURL; + } else if(key == "FundRef") { + return properties.fundRefURL; } } diff --git a/landingPages/organization/organization.component.html b/landingPages/organization/organization.component.html index 04f4235a..09f004f2 100644 --- a/landingPages/organization/organization.component.html +++ b/landingPages/organization/organization.component.html @@ -19,57 +19,28 @@
- - -
-
-
- - - Powered by OpenAIRE graph - - - Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} - +
+
+ + + Powered by OpenAIRE graph + + + Last update of records in OpenAIRE: {{indexUpdateDate | date: 'MMM dd, yyyy'}} + - -
- Found an issue? - Give us feedback -
-
-
+ +
+ Found an issue? + Give us feedback +
+
+
- -
- - -
- - + Country: {{organizationInfo.country}}
+ +
+ +
@@ -257,9 +207,7 @@
-
- -
+ @@ -270,12 +218,12 @@ + + + - - - @@ -287,6 +235,23 @@ && organizationInfo.title.name !== organizationInfo.name)?organizationInfo.name:null" [entityType]="'organization'" [prevPath]="prevPath"> +
+ + + +
+ Country: {{organizationInfo.country}} +
+ +
+ +
+

@@ -406,10 +371,7 @@ [type]="'organizations'" [prevPath]="prevPath"> - - - - +
diff --git a/landingPages/organization/organization.component.ts b/landingPages/organization/organization.component.ts index 814d7bb9..f313a196 100644 --- a/landingPages/organization/organization.component.ts +++ b/landingPages/organization/organization.component.ts @@ -77,7 +77,6 @@ export class OrganizationComponent { @ViewChild('downloadReportsFsModal') downloadReportsFsModal: FullScreenModalComponent; // @ViewChild('downloadReportModal') downloadReportModal; // @ViewChild('downloadFunderReportModal') downloadFunderReportModal; - @ViewChild('addThisModal') addThisModal; @ViewChild('addThisFsModal') addThisFsModal: FullScreenModalComponent; @ViewChild(ModalLoading) loading: ModalLoading; @@ -717,13 +716,6 @@ export class OrganizationComponent { this.downloadReportsModal.cancel(); } - public openAddThisModal() { - this.addThisModal.cancelButton = false; - this.addThisModal.okButton = false; - this.addThisModal.alertTitle = "Share this "+OpenaireEntities.ORGANIZATION+" in your social networks"; - this.addThisModal.open(); - } - public getParamsForSearchLink(type: string = "") { if(type) { return this.routerHelper.createQueryParams(['f0', 'fv0', 'type', 'qf', 'sortBy'], ['relorganizationid', this.organizationId, type, 'false', 'resultdateofacceptance,descending']); diff --git a/landingPages/organization/organization.module.ts b/landingPages/organization/organization.module.ts index 0c29500c..c7b2d24c 100644 --- a/landingPages/organization/organization.module.ts +++ b/landingPages/organization/organization.module.ts @@ -34,6 +34,7 @@ import {FullScreenModalModule} from "../../utils/modal/full-screen-modal/full-sc import {EGIDataTransferModule} from "../../utils/dataTransfer/transferData.module"; import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module"; import {OrganizationRoutingModule} from "./organization-routing.module"; +import {ResultLandingUtilsModule} from "../landing-utils/resultLandingUtils.module"; @NgModule({ @@ -51,7 +52,7 @@ import {OrganizationRoutingModule} from "./organization-routing.module"; ProjectsServiceModule, Schema2jsonldModule, SEOServiceModule, HelperModule, OrganizationsDeletedByInferenceModule, LandingHeaderModule, FeedbackModule, - TabsModule, SearchTabModule, LoadingModule, IconsModule, InputModule, FullScreenModalModule, EGIDataTransferModule, EntityActionsModule + TabsModule, SearchTabModule, LoadingModule, IconsModule, InputModule, FullScreenModalModule, EntityActionsModule, ResultLandingUtilsModule ], declarations: [ OrganizationComponent, diff --git a/services/organization.service.ts b/services/organization.service.ts index 722d1338..b74bd92f 100644 --- a/services/organization.service.ts +++ b/services/organization.service.ts @@ -8,9 +8,11 @@ import {OrganizationInfo} from '../utils/entities/organizationInfo'; import{EnvProperties} from '../utils/properties/env-properties'; import {map} from "rxjs/operators"; import {ParsingFunctions} from "../landingPages/landing-utils/parsingFunctions.class"; +import {properties} from "../../../environments/environment"; @Injectable() export class OrganizationService { + public parsingFunctions: ParsingFunctions = new ParsingFunctions(); constructor(private http: HttpClient ) {} @@ -92,6 +94,10 @@ export class OrganizationService { } } } + + if(organization['pid'] && properties.environment != "production") { + this.organizationInfo.identifiers = this.parsingFunctions.parseIdentifiers(organization['pid']); + } } //Comment Parsing Projects info diff --git a/services/searchOrganizations.service.ts b/services/searchOrganizations.service.ts index 488b0e87..019b8146 100644 --- a/services/searchOrganizations.service.ts +++ b/services/searchOrganizations.service.ts @@ -9,9 +9,11 @@ import{EnvProperties} from '../utils/properties/env-properties'; import {StringUtils} from '../utils/string-utils.class'; import {map} from "rxjs/operators"; import {ParsingFunctions} from "../landingPages/landing-utils/parsingFunctions.class"; +import {properties} from "../../../environments/environment"; @Injectable() export class SearchOrganizationsService { + public parsingFunctions: ParsingFunctions = new ParsingFunctions(); constructor(private http: HttpClient ) {} @@ -173,7 +175,11 @@ export class SearchOrganizationsService { result.country = resData.country.classname; } - results.push(result); + if(resData['pid'] && properties.environment != "production") { + result.identifiers = this.parsingFunctions.parseIdentifiers(resData['pid']); + } + + results.push(result); } return results; diff --git a/utils/entities/organizationInfo.ts b/utils/entities/organizationInfo.ts index 6bd9b68f..5194f076 100644 --- a/utils/entities/organizationInfo.ts +++ b/utils/entities/organizationInfo.ts @@ -26,4 +26,5 @@ export class OrganizationInfo { // organizations: {name: string; url: string}[]}[]; deletedByInferenceIds: string[]; + identifiers: Map; //key is the classname } diff --git a/utils/properties/env-properties.ts b/utils/properties/env-properties.ts index b6e3b370..f740381d 100644 --- a/utils/properties/env-properties.ts +++ b/utils/properties/env-properties.ts @@ -45,6 +45,10 @@ export interface EnvProperties { openDoarURL?: string; r3DataURL?: string; swhURL?: string; + rorURL?: string; + isniURL?: string; + wikiDataURL?: string; + fundRefURL?: string; fairSharingURL?: string, eoscMarketplaceURL?: string, sherpaURL?: string; diff --git a/utils/properties/environments/environment.ts b/utils/properties/environments/environment.ts index b48fe5c4..fb86e5d4 100644 --- a/utils/properties/environments/environment.ts +++ b/utils/properties/environments/environment.ts @@ -20,6 +20,10 @@ export let common: EnvProperties = { openDoarURL: "http://v2.sherpa.ac.uk/id/repository/", r3DataURL: "http://service.re3data.org/repository/", swhURL: "https://archive.softwareheritage.org/", + rorURL: "https://ror.org/", + isniURL: "https://isni.org/isni/", + wikiDataURL: "https://www.wikidata.org/wiki/", + fundRefURL: "https://api.crossref.org/funders/", fairSharingURL: "https://fairsharing.org/", eoscMarketplaceURL: "https://marketplace.eosc-portal.eu/services/", sherpaURL: "http://sherpa.ac.uk/romeo/issn/",