From 867e79536bb9e666d95cf3ee96682c256f7deff1 Mon Sep 17 00:00:00 2001 From: Konstantinos Triantafyllou Date: Mon, 5 Apr 2021 13:40:40 +0000 Subject: [PATCH] [Monitor Dashboard | Trunk]: Add how on methodology page git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-monitor-portal/trunk/monitor_dashboard@60798 d315682c-612b-4755-9ff5-7f18f6832af3 --- src/app/app.component.ts | 18 +- .../methodology.component.css} | 4 + src/app/methodology/methodology.component.ts | 260 ++++++++++++++++++ .../methodology.module.ts} | 14 +- src/app/monitor/monitor-routing.module.ts | 4 +- src/app/terminology/terminology.component.ts | 228 --------------- 6 files changed, 288 insertions(+), 240 deletions(-) rename src/app/{terminology/terminology.component.css => methodology/methodology.component.css} (92%) create mode 100644 src/app/methodology/methodology.component.ts rename src/app/{terminology/terminology.module.ts => methodology/methodology.module.ts} (54%) delete mode 100644 src/app/terminology/terminology.component.ts diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 8b6cc14..4fc2c77 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -273,8 +273,13 @@ export class AppComponent implements OnInit, OnDestroy { "", "/" + this.stakeholder.alias, false, [], null, {}), items: [] }); this.menuItems.push({ - rootItem: new MenuItem("terminology", "Terminology", - "", "/" + this.stakeholder.alias + "/terminology", false, [], null, {}), items: [] + rootItem: new MenuItem("methodology", "Methodology", + "/" + this.stakeholder.alias + "/methodology", "", false, [], null, {}), items: [ + new MenuItem("methodology", "Overview", + "/" + this.stakeholder.alias + "/methodology", "", false, [], null, {}), + new MenuItem("methodology", "Terminology and construction", + "/" + this.stakeholder.alias + "/methodology#terminology", "", false, [], null, {}), + ] }); if(this.stakeholder.type === "funder") { this.menuItems.push({ @@ -301,8 +306,13 @@ export class AppComponent implements OnInit, OnDestroy { stickyAnimation: false }; this.menuItems.push({ - rootItem: new MenuItem("terminology", "Terminology", - "", "/" + this.stakeholder.alias + "/terminology", false, [], null, {}), items: [] + rootItem: new MenuItem("methodology", "Methodology", + "/" + this.stakeholder.alias + "/methodology", "", false, [], null, {}), items: [ + new MenuItem("methodology", "Overview", + "/" + this.stakeholder.alias + "/methodology", "", false, [], null, {}), + new MenuItem("methodology", "Terminology and construction", + "/" + this.stakeholder.alias + "/methodology#terminology", "", false, [], null, {}), + ] }); if(this.stakeholder.type === "funder") { this.menuItems.push({ diff --git a/src/app/terminology/terminology.component.css b/src/app/methodology/methodology.component.css similarity index 92% rename from src/app/terminology/terminology.component.css rename to src/app/methodology/methodology.component.css index dcde66e..90f82d1 100644 --- a/src/app/terminology/terminology.component.css +++ b/src/app/methodology/methodology.component.css @@ -10,6 +10,10 @@ table th, table td { text-align: start; } +table th.important { + background-color: #eff6e6; +} + ul.portal-circle { list-style: none; padding-left: 40px; diff --git a/src/app/methodology/methodology.component.ts b/src/app/methodology/methodology.component.ts new file mode 100644 index 0000000..d27dbb7 --- /dev/null +++ b/src/app/methodology/methodology.component.ts @@ -0,0 +1,260 @@ +import {Component, OnDestroy, OnInit} from "@angular/core"; +import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service"; +import {Stakeholder} from "../openaireLibrary/monitor/entities/stakeholder"; +import {Subscription} from "rxjs"; +import {Meta, Title} from "@angular/platform-browser"; +import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; +import {properties} from "../../environments/environment"; +import {ActivatedRoute, Router} from "@angular/router"; + +@Component({ + selector: 'methodology', + template: ` +
+
+
+ +
+
+
+

+ Overview +

+
+ +
+
+
+

+ Terminology and construction +

+
+ + + + + + + + + + + + + + + + + + + + + + +
Research Outcomes +
There are currently four different types of research outcomes in the OpenAIRE Research + Graph: +
+
    +
  • Publication
  • +
  • Dataset
  • +
  • Software
  • +
  • Other Research Product
  • +
+
+ OpenAIRE deduplicates (merges) different records of research outcomes and keeps the metadata of all + instances. +
+
PublicationResearch outcomes intended for human reading (published articles, pre-prints, conference papers, + presentations, technical reports, etc.) +
Dataset +

Research data

+

Granularity is not defined by OpenAIRE, it reflects the granularity supported by + the sources from which the description of the dataset has been collected.

+
SoftwareSource code or software package developed and/or used in a research context.
Other Research ProductAnything that does not fall in the previous categories (e.g. workflow, methods, protocols).
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Organization & Country +

For research outcomes: the affiliated organizations of its + authors (and their country)

+

For projects: the organizations participating in the project + (i.e. beneficiaries of the grant) and + their countries +

+

+ Country code mapping: + + https://api.openaire.eu/vocabularies/dnet:countries +

+
Type +

The sub-type of a research outcome (e.g., a publication can be a pre-print, conference proceeding, + article, + etc.)

+

Resource type mapping: + https://api.openaire.eu/vocabularies/dnet:result_typologies + (click on the code to see the specific types for each result type) +

+
Access mode +

The best available (across all instances) access rights of a research outcome.

+

Types: open, restricted, closed, embargo (= closed for a specific period of time, then open)

+

Note: definition of restricted + may vary by data source.

+
PID (persistent identifier) +

A long-lasting reference to a resource

+

Types: http://api.openaire.eu/vocabularies/dnet:pid_types +

+
ContextRelated research community, initiative or infrastructure
JournalThe scientific journal an article is published in.
PublisherThe publisher of the venue (journal, book, etc.) of a research outcome
Content Providers (Datasources) +

The different data sources ingested in the OpenAIRE Research Graph.

+
Content Provider Types:
+
    +
  • Repositories
  • +
  • Open Access Publishers & Journals
  • +
  • Aggregators
  • +
  • Entity Registries
  • +
  • Journal Aggregators
  • +
  • CRIS (Current Research Information System)
  • +
+
RepositoryInformation systems where scientists upload the bibliographic metadata and payloads of their + research outcomes (e.g. PDFs of their scientific articles, CSVs of their data, archive with their + software), due to obligations from their organizations, their funders, or due to community practices + (e.g. ArXiv, Europe PMC, Zenodo). +
Open Access Publishers & JournalsInformation systems of open access publishers or relative journals, which offer bibliographic + metadata and PDFs of their published articles. +
AggregatorsInformation systems that collect descriptive metadata about research products from multiple sources + in order to enable cross-data source discovery of given research products (e,g, DataCite, + BASE, DOAJ). +
Entity RegistriesInformation systems created with the intent of maintaining authoritative registries of given + entities in the scholarly communication, such as OpenDOAR for the institutional repositories, re3data + for the data repositories, CORDA and other funder databases for projects and funding information. +
CRIS (Current Research Information System)Information systems adopted by research and academic organizations to keep track of their research + administration records and relative results; examples of CRIS content are articles or datasets funded + by projects, their principal investigators, facilities acquired thanks to funding, etc. +
+
+ + More information for OpenAIRE Research Graph. +
+
+
+
+
+
+ `, + styleUrls: ['methodology.component.css'] +}) +export class MethodologyComponent implements OnInit, OnDestroy { + public loading = true; + public stakeholder: Stakeholder; + public tab: 'entities' | 'attributes' = 'entities'; + private subscriptions: any[] = []; + + constructor(private stakeholderService: StakeholderService, + private seoService: SEOService, + private _meta: Meta, + private _router: Router, + private route: ActivatedRoute, + private _title: Title) { + } + + ngOnInit() { + this.loading = true; + this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => { + this.stakeholder = stakeholder; + if (this.stakeholder) { + /* Metadata */ + const url = properties.domain + properties.baseLink + this._router.url; + this.seoService.createLinkForCanonicalURL(url, false); + this._meta.updateTag({content: url}, "property='og:url'"); + const description = "Methodology | " + this.stakeholder.name; + const title = "Methodology | " + this.stakeholder.name; + this._meta.updateTag({content: description}, "name='description'"); + this._meta.updateTag({content: description}, "property='og:description'"); + this._meta.updateTag({content: title}, "property='og:title'"); + this._title.setTitle(title); + setTimeout(() => { + this.loading = false; + this.subscriptions.push(this.route.fragment.subscribe(fragment => { + setTimeout(() => { + this.goTo(fragment); + }, 100); + })); + }, 500) + } + })); + } + + goTo(id: string) { + const yOffset = -100; + const element = document.getElementById(id); + if(element) { + const y = element.getBoundingClientRect().top + window.pageYOffset + yOffset; + window.scrollTo({top: y, behavior: 'smooth'}); + } + } + + ngOnDestroy() { + this.subscriptions.forEach(subscription => { + if (subscription instanceof Subscription) { + subscription.unsubscribe(); + } + }); + } +} diff --git a/src/app/terminology/terminology.module.ts b/src/app/methodology/methodology.module.ts similarity index 54% rename from src/app/terminology/terminology.module.ts rename to src/app/methodology/methodology.module.ts index e7602f1..cb0dde8 100644 --- a/src/app/terminology/terminology.module.ts +++ b/src/app/methodology/methodology.module.ts @@ -1,21 +1,23 @@ import {NgModule} from "@angular/core"; import {CommonModule} from "@angular/common"; -import {TerminologyComponent} from "./terminology.component"; +import {MethodologyComponent} from "./methodology.component"; import {RouterModule} from "@angular/router"; import {PreviousRouteRecorder} from "../openaireLibrary/utils/piwik/previousRouteRecorder.guard"; import {PageContentModule} from "../openaireLibrary/dashboard/sharedComponents/page-content/page-content.module"; +import {HowModule} from "../openaireLibrary/monitor/how/how.module"; +import {LoadingModule} from "../openaireLibrary/utils/loading/loading.module"; @NgModule({ - declarations: [TerminologyComponent], + declarations: [MethodologyComponent], imports: [CommonModule, RouterModule.forChild([ { path: '', - component: TerminologyComponent, + component: MethodologyComponent, canDeactivate: [PreviousRouteRecorder] }, - ]), PageContentModule], - exports: [TerminologyComponent] + ]), PageContentModule, HowModule, LoadingModule], + exports: [MethodologyComponent] }) -export class TerminologyModule { +export class MethodologyModule { } diff --git a/src/app/monitor/monitor-routing.module.ts b/src/app/monitor/monitor-routing.module.ts index c6420a8..f46a85a 100644 --- a/src/app/monitor/monitor-routing.module.ts +++ b/src/app/monitor/monitor-routing.module.ts @@ -22,8 +22,8 @@ import {MonitorComponent} from "./monitor.component"; } }, { - path: ':stakeholder/terminology', - loadChildren: '../terminology/terminology.module#TerminologyModule', + path: ':stakeholder/methodology', + loadChildren: '../methodology/methodology.module#MethodologyModule', canDeactivate: [PreviousRouteRecorder], data: { hasSidebar: false, diff --git a/src/app/terminology/terminology.component.ts b/src/app/terminology/terminology.component.ts deleted file mode 100644 index 1834324..0000000 --- a/src/app/terminology/terminology.component.ts +++ /dev/null @@ -1,228 +0,0 @@ -import {Component, OnDestroy, OnInit} from "@angular/core"; -import {StakeholderService} from "../openaireLibrary/monitor/services/stakeholder.service"; -import {Stakeholder} from "../openaireLibrary/monitor/entities/stakeholder"; -import {Subscription} from "rxjs"; -import {Meta, Title} from "@angular/platform-browser"; -import {SEOService} from "../openaireLibrary/sharedComponents/SEO/SEO.service"; -import {properties} from "../../environments/environment"; -import {ActivatedRoute, Router} from "@angular/router"; - -@Component({ - selector: 'terminology', - template: ` -
-
-
-

- Terminology and construction -

-
- - - - - - - - - - - - - - - - - - - - - - -
Research Outcomes -
There are currently four different types of research outcomes types in the OpenAIRE Research - Graph: -
-
    -
  • Publication
  • -
  • Dataset
  • -
  • Software
  • -
  • Other Research Products
  • -
-
- OpenAIRE deduplicates (merges) different records or research outcomes and keeps the metadata of all - instances. -
-
PublicationResearch outcomes intended for human reading (published articles, pre-prints, conference papers, - presentations, technical reports, etc.) -
DatasetResearch data (granularity is not defined by OpenAIRE, which reflects the granularity supported by - the sources from which the description of the dataset has been collected) -
SoftwareSource code or software package developed and/or used in a research context.
Other Research ProductAnything that does not fall in the previous categories (e.g. workflow, methods, protocols).
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Organization & Country -

For research outcomes: The affiliated organizations of its authors (and their country).

-

For projects: The organizations participating in the project (i.e. beneficiaries of the grant), and - their countries (when available). -

-

- Country code mapping: - - https://api.openaire.eu/vocabularies/dnet:countries -

-
Type -

The type of research output (e.g. a publication can be a pre-print, conference proceeding, article, - etc.)

-

Resource type mapping: - https://api.openaire.eu/vocabularies/dnet:result_typologies - (click on the code to see the specific types for each result type) -

-
Access mode -

The best available (across all instances) access rights of a research output.

-

Types: open, restricted, closed, embargo (= closed for a specific period of time, then open)

-
PID (persistent identifier) -

A long-lasting reference to a resource

-

Types: http://api.openaire.eu/vocabularies/dnet:pid_types -

-
ContextRelated research community/initiative/infrastructure
JournalThe scientific journal an article is published in.
PublisherThe publisher of the venue (journal, book, etc.) of a research output
Content Provider (Datasources) -

The different data sources ingested in the OpenAIRE Research Graph.

-
Content Provider Types:
-
    -
  • Repositories
  • -
  • Open Access Publishers & Journals
  • -
  • Aggregators
  • -
  • Entity Registries
  • -
  • Journal Aggregators
  • -
  • CRIS (Current Research Information System)
  • -
-
RepositoryInformation systems where scientists upload the bibliographic metadata and payloads of their - research outcomes (e.g. PDFs of their scientific articles, CSVs of their data, archive with their - software), due to obligations from their organizations, their funders, or due to community practices - (e.g. ArXiv, Europe PMC, Zenodo). -
Open Access Publishers & JournalsInformation systems of open access publishers or relative journals, which offer bibliographic - metadata and PDFs of their published articles. -
AggregatorsInformation systems that collect descriptive metadata about research products from multiple sources - in order to enable cross-data source discovery of given research products. Examples are DataCite, - BASE, DOAJ. -
Entity RegistriesInformation systems created with the intent of maintaining authoritative registries of given - entities in the scholarly communication, such as OpenDOAR for the institutional repositories, re3data - for the data repositories, CORDA and other funder databases for projects and funding information. -
CRIS (Current Research Information System)Information systems adopted by research and academic organizations to keep track of their research - administration records and relative results; examples of CRIS content are articles or datasets funded - by projects, their principal investigators, facilities acquired thanks to funding, etc. -
-
- - More information for OpenAIRE Research Graph. -
-
-
-
-
- `, - styleUrls: ['terminology.component.css'] -}) -export class TerminologyComponent implements OnInit, OnDestroy { - - public stakeholder: Stakeholder; - public tab: 'entities' | 'attributes' = 'entities'; - private subscriptions: any[] = []; - - constructor(private stakeholderService: StakeholderService, - private seoService: SEOService, - private _meta: Meta, - private _router: Router, - private route: ActivatedRoute, - private _title: Title) { - } - - ngOnInit() { - this.subscriptions.push(this.route.fragment.subscribe(tab => { - if (tab === 'attributes') { - this.tab = tab; - } else { - this.tab = 'entities'; - } - })); - this.subscriptions.push(this.stakeholderService.getStakeholderAsObservable().subscribe(stakeholder => { - this.stakeholder = stakeholder; - if (this.stakeholder) { - /* Metadata */ - const url = properties.domain + properties.baseLink + this._router.url; - this.seoService.createLinkForCanonicalURL(url, false); - this._meta.updateTag({content: url}, "property='og:url'"); - const description = "Terminology | " + this.stakeholder.name; - const title = "Terminology | " + this.stakeholder.name; - this._meta.updateTag({content: description}, "name='description'"); - this._meta.updateTag({content: description}, "property='og:description'"); - this._meta.updateTag({content: title}, "property='og:title'"); - this._title.setTitle(title); - } - })); - } - - ngOnDestroy() { - this.subscriptions.forEach(subscription => { - if (subscription instanceof Subscription) { - subscription.unsubscribe(); - } - }); - } -}