import {
AfterContentChecked,
AfterViewInit,
ChangeDetectorRef,
Component,
OnDestroy,
OnInit,
ViewChild
} from "@angular/core";
import {Subscription} from "rxjs";
import {Meta, Title} from "@angular/platform-browser";
import {ActivatedRoute, Router} from "@angular/router";
import {OpenaireEntities} from "../../utils/properties/searchFields";
import {SEOService} from "../../sharedComponents/SEO/SEO.service";
import {properties} from "../../../../environments/environment";
import {Breadcrumb} from "../../utils/breadcrumbs/breadcrumbs.component";
import {HelperService} from "../../utils/helper/helper.service";
declare var ResizeObserver;
@Component({
selector: 'terminology',
template: `
Terminology and
construction.
3. Constructed Attributes
All attributes in this tab are constructed by us, with the methodology presented below.
- Attribute
- Definition
- How we build it
Journal Business Models
- Fully Open Access (OA)
-
A journal that publishes only in open access.
-
We follow Unpaywall’s approach on defining fully Open Access journals and publishers and we construct the lists of the latter using Unpaywall data.
In brief, a journal is fully Open Access if one or more of the following occur:
- It is in the Directory of Open Access Journals (DOAJ)
- It has a known fully OA Publisher (curated list).
- It only publishes OA articles.
- Subscription
-
A journal that charges for access to its articles.
-
Journals without any open access articles.
- Hybrid
-
A subscription journal where some of its articles are open access.
-
Journals with open access articles that are not fully OA journals.
- Transformative
-
"A Transformative Journal is a subscription/hybrid journal that is actively committed to
transitioning to a fully Open Access journal.
In addition, a Transformative Journal must:
- gradually increase the share of Open Access content; and
- offset subscription income from payments for publishing services (to avoid double payments)."
Source: Plan S initiative
-
We identify Transformative Journals by ISSN matching with the publicly available Transformative Journals data from Plan S initiative.
Journal APC Business Models
- Diamond OA
-
A fully OA journal that does not charge article processing charges (APCs).
In other words, fully OA journals are either diamond, or charge APCs.
-
We obtain APC data from DOAJ using DOAJ’s Public Data Dump (an exportable version of the journal metadata). We used it to determine whether a particular fully OA journal charges APCs.
Routes to Open Access (OA)
- Green OA
-
An open access scientific publication deposited in a repository
-
As in definition
- Gold OA
-
A scientific publication published in a fully OA journal.
-
We define fully OA journals above.
- Hybrid OA
-
An open access scientific publication published in a hybrid journal with an open license.
-
We define hybrid journals above.
At this point we consider only CC licenses “open”. We are currently working on cleaning non-CC
licenses as well to identify other open ones.
In principle, this means that we may be underestimating the number of hybrid OA articles and
overestimating the number of bronze.
- Bronze OA
-
An open access scientific publication published in a hybrid journal without an open license.
-
Miscellaneous
- Downloads
-
The number of downloads of a publication’s full text in a specific time frame, from a given set of
data sources.
-
We utilize the usage data for the downloads from OpenAIRE’s Usage Counts service that harvests it from a set of
datasources. The time range of available downloads varies for each datasource.
`
})
export class TerminologyComponent implements OnInit, OnDestroy, AfterViewInit, AfterContentChecked {
public tab: 'entities' | 'attributes' = 'entities';
private subscriptions: any[] = [];
public openaireEntities = OpenaireEntities;
public breadcrumbs: Breadcrumb[] = [{name: 'home', route: '/'}, {name: 'Resources - Terminology and construction', keepFormat: true}];
public graph_offset: number = 0;
public graph_height: number = 0;
@ViewChild("graph_element") graph_element;
public contentSections: string[] = ['entities', 'inherited-and-inferred-attributes', 'constructed-attributes'];
public activeSection: string;
public properties = properties;
public divContents: any;
constructor(private seoService: SEOService,
private meta: Meta,
private router: Router,
private route: ActivatedRoute,
private title: Title,
private cdr: ChangeDetectorRef,
private helper: HelperService) {
}
ngOnInit() {
this.subscriptions.push(this.route.params.subscribe(params => {
const description = "Monitor | Terminology and construction";
const title = "Monitor | Terminology and construction";
this.metaTags(title, description);
this.breadcrumbs[0].route = '/' + (params['stakeholder']?params['stakeholder']:'');
this.breadcrumbs[0].name = (params['stakeholder']?'dashboard':'home');
}));
this.subscriptions.push(this.route.fragment.subscribe(fragment => {
if(fragment) {
this.activeSection = fragment;
} else {
this.activeSection = 'entities';
}
}));
this.getDivContents();
}
ngAfterViewInit() {
if (typeof document !== 'undefined') {
if(this.graph_element) {
this.observeGraphElement();
}
}
}
ngAfterContentChecked() {
if(this.graph_element && typeof document !== 'undefined') {
this.graph_offset = this.calcGraphOffset(this.graph_element.nativeElement);
}
}
ngOnDestroy() {
this.subscriptions.forEach(subscription => {
if (subscription instanceof Subscription) {
subscription.unsubscribe();
}
});
}
private getDivContents() {
this.subscriptions.push(this.helper.getDivHelpContents(this.properties, 'monitor', this.router.url).subscribe(contents => {
this.divContents = contents;
}));
}
public observeGraphElement() {
let resizeObs = new ResizeObserver(entries => {
entries.forEach(entry => {
setTimeout(() => {
this.graph_offset = this.calcGraphOffset(entry.target);
this.cdr.detectChanges();
});
})
});
this.subscriptions.push(resizeObs);
resizeObs.observe(this.graph_element.nativeElement);
}
calcGraphOffset(element) {
this.graph_height = element.offsetHeight;
return window.innerHeight-this.graph_height;
}
metaTags(title, description) {
const url = properties.domain + properties.baseLink + this.router.url;
this.seoService.createLinkForCanonicalURL(url, false);
this.meta.updateTag({content: url}, "property='og:url'");
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);
}
}