From c27227923e93f82c315ff1bec70f9b3042033d3d Mon Sep 17 00:00:00 2001 From: Alex Martzios Date: Mon, 29 Aug 2022 15:23:33 +0300 Subject: [PATCH] split methodology into 2 pages (terminology & see-how-it-works) --- monitor/methodology/methodology.module.ts | 21 +++-- .../methodology/see-how-it-works.component.ts | 83 +++++++++++++++++++ ....component.ts => terminology.component.ts} | 30 +------ monitor/services/resources.service.ts | 6 +- 4 files changed, 104 insertions(+), 36 deletions(-) create mode 100644 monitor/methodology/see-how-it-works.component.ts rename monitor/methodology/{methodology.component.ts => terminology.component.ts} (91%) diff --git a/monitor/methodology/methodology.module.ts b/monitor/methodology/methodology.module.ts index f47f116d..a9c933ea 100644 --- a/monitor/methodology/methodology.module.ts +++ b/monitor/methodology/methodology.module.ts @@ -1,25 +1,36 @@ import {NgModule} from "@angular/core"; import {CommonModule} from "@angular/common"; -import {MethodologyComponent} from "./methodology.component"; +import {TerminologyComponent} from "./terminology.component"; +import {SeeHowItWorksComponent} from "./see-how-it-works.component"; import {RouterModule} from "@angular/router"; import {PreviousRouteRecorder} from "../../utils/piwik/previousRouteRecorder.guard"; import {PageContentModule} from "../../dashboard/sharedComponents/page-content/page-content.module"; -import {HowModule} from "../../monitor/how/how.module"; +import {HowModule} from "../how/how.module"; import {TabsModule} from "../../utils/tabs/tabs.module"; import {IconsModule} from "../../utils/icons/icons.module"; import {IconsService} from "../../utils/icons/icons.service"; import {graph} from "../../utils/icons/icons"; @NgModule({ - declarations: [MethodologyComponent], + declarations: [TerminologyComponent, SeeHowItWorksComponent], imports: [CommonModule, RouterModule.forChild([ { path: '', - component: MethodologyComponent, + redirectTo: 'terminology', + canDeactivate: [PreviousRouteRecorder] + }, + { + path: 'terminology', + component: TerminologyComponent, + canDeactivate: [PreviousRouteRecorder] + }, + { + path: 'how', + component: SeeHowItWorksComponent, canDeactivate: [PreviousRouteRecorder] }, ]), PageContentModule, HowModule, TabsModule, IconsModule], - exports: [MethodologyComponent] + exports: [TerminologyComponent, SeeHowItWorksComponent] }) export class MethodologyModule { constructor(private iconsService: IconsService) { diff --git a/monitor/methodology/see-how-it-works.component.ts b/monitor/methodology/see-how-it-works.component.ts new file mode 100644 index 00000000..73574a53 --- /dev/null +++ b/monitor/methodology/see-how-it-works.component.ts @@ -0,0 +1,83 @@ +import {Component, OnDestroy, OnInit} from "@angular/core"; +import {Subscription} from "rxjs"; +import {Meta, Title} from "@angular/platform-browser"; +import {ActivatedRoute, Router} from "@angular/router"; +import {Stakeholder} from "../entities/stakeholder"; +import {OpenaireEntities} from "../../utils/properties/searchFields"; +import {StakeholderService} from "../services/stakeholder.service"; +import {SEOService} from "../../sharedComponents/SEO/SEO.service"; +import {properties} from "../../../../environments/environment"; + +@Component({ + selector: 'see-how-it-works', + template: ` +
+
+

+ Inclusion, transparency,
quality, state of the art
technology. +

+
+

Our methodological approach is based on the following operational quality criteria:

+
    +
  • Openness and transparency: Methodological assumptions are openly and clearly presented.
  • +
  • Coverage and accuracy: As detailed in graph.openaire.eu + multiple data sources are ingested in the OpenAIRE research graph for coverage to the fullest extent possible, in order to provide meaningful indicators.
  • +
  • Clarity and replicability: We describe our construction methodology in detail, so that + it can be verified and used by the scholarly communication community to create ongoing updates to our proposed statistics and indicators.
  • +
  • Readiness and timeliness: The methodology is built around well-established open databases + and already tested knowledge extraction technologies - natural language processing (NLP)/machine-learning (ML) - using operational + workflows in OpenAIRE to warrant timely results.
  • +
  • Trust and robustness: Our methodology also strives to be reliable, robust, and aligned + to other assessment methods so that it can be operationalized, used and reused, in conjunction with other assessment methods.
  • +
+
The text above is modified from this report (DOI: 10.2777/268348).
+
+
+

Step-by-step

+ +
+
+
+ ` +}) +export class SeeHowItWorksComponent implements OnInit, OnDestroy { + public stakeholder: Stakeholder; + public tab: 'entities' | 'attributes' = 'entities'; + private subscriptions: any[] = []; + public openaireEntities = OpenaireEntities; + + constructor(private stakeholderService: StakeholderService, + private seoService: SEOService, + private _meta: Meta, + private _router: Router, + private route: ActivatedRoute, + private _title: Title) { + } + + ngOnInit() { + 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); + } + })); + } + + ngOnDestroy() { + this.subscriptions.forEach(subscription => { + if (subscription instanceof Subscription) { + subscription.unsubscribe(); + } + }); + } +} diff --git a/monitor/methodology/methodology.component.ts b/monitor/methodology/terminology.component.ts similarity index 91% rename from monitor/methodology/methodology.component.ts rename to monitor/methodology/terminology.component.ts index 5a84b1a5..f41176b0 100644 --- a/monitor/methodology/methodology.component.ts +++ b/monitor/methodology/terminology.component.ts @@ -9,7 +9,7 @@ import {SEOService} from "../../sharedComponents/SEO/SEO.service"; import {properties} from "../../../../environments/environment"; @Component({ - selector: 'methodology', + selector: 'terminology', template: `
@@ -394,36 +394,10 @@ import {properties} from "../../../../environments/environment"; .
-
-

- Inclusion, transparency,
quality, state of the art
technology. -

-
-

Our methodological approach is based on the following operational quality criteria:

-
    -
  • Openness and transparency: Methodological assumptions are openly and clearly presented.
  • -
  • Coverage and accuracy: As detailed in graph.openaire.eu - multiple data sources are ingested in the OpenAIRE research graph for coverage to the fullest extent possible, in order to provide meaningful indicators.
  • -
  • Clarity and replicability: We describe our construction methodology in detail, so that - it can be verified and used by the scholarly communication community to create ongoing updates to our proposed statistics and indicators.
  • -
  • Readiness and timeliness: The methodology is built around well-established open databases - and already tested knowledge extraction technologies - natural language processing (NLP)/machine-learning (ML) - using operational - workflows in OpenAIRE to warrant timely results.
  • -
  • Trust and robustness: Our methodology also strives to be reliable, robust, and aligned - to other assessment methods so that it can be operationalized, used and reused, in conjunction with other assessment methods.
  • -
-
The text above is modified from this report (DOI: 10.2777/268348).
-
-
-

Step-by-step

- -
-
` }) -export class MethodologyComponent implements OnInit, OnDestroy { +export class TerminologyComponent implements OnInit, OnDestroy { public stakeholder: Stakeholder; public tab: 'entities' | 'attributes' = 'entities'; private subscriptions: any[] = []; diff --git a/monitor/services/resources.service.ts b/monitor/services/resources.service.ts index 083a079b..3d528c63 100644 --- a/monitor/services/resources.service.ts +++ b/monitor/services/resources.service.ts @@ -32,10 +32,10 @@ export class ResourcesService { null, {}, null, null, null, null, '_self'), ResourcesService.setLink(new MenuItem("methodology", "Terminology and construction", "", "", false, [], null, {}, null, null, null, null, '_self'), - prefix + "/methodology", portal), + prefix + "/methodology/terminology", portal), ResourcesService.setLink(new MenuItem("methodology", "See how it works", - "", "", false, [], null, {}, null, "how", null, null, '_self'), - prefix + "/methodology", portal)]; + "", "", false, [], null, {}, null, null, null, null, '_self'), + prefix + "/methodology/how", portal)]; items.push(new MenuItem("indicators-page", "Indicators", "", "", false, [], null, {})); items.push(ResourcesService.setLink(new MenuItem("indicator-themes", "Indicator Themes",