2021-11-12 09:13:22 +00:00
|
|
|
export interface Dataset {
|
|
|
|
abstract_additional: Array<string>;
|
|
|
|
abstract_output: string;
|
|
|
|
author: Array<string>;
|
|
|
|
author_sort: Array<string>;
|
|
|
|
belongs_to_bibliography: boolean;
|
|
|
|
creating_corporation: string;
|
|
|
|
doctype: string;
|
|
|
|
geo_location: string;
|
|
|
|
id: number;
|
|
|
|
identifier: Array<string>;
|
|
|
|
language: string;
|
|
|
|
licence: string;
|
|
|
|
publisher_name: string;
|
|
|
|
server_date_published: Array<number>;
|
|
|
|
subject: Array<string>;
|
|
|
|
title_output: string;
|
|
|
|
year: number;
|
|
|
|
year_inverted: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export class Suggestion {
|
|
|
|
constructor(public value: string, public type: SearchType) {}
|
|
|
|
// value!: string;
|
|
|
|
// type!: SearchType;
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum SearchType {
|
|
|
|
Title = "title",
|
|
|
|
Author = "author",
|
|
|
|
Subject = "subject",
|
|
|
|
}
|
2021-12-01 14:45:01 +00:00
|
|
|
|
2021-12-13 16:01:40 +00:00
|
|
|
export class DbDataset {
|
|
|
|
public id!: number;
|
|
|
|
public url!: string;
|
|
|
|
public contributing_corporation!: string;
|
|
|
|
public creating_corporation!: string;
|
|
|
|
public publisher_name!: string;
|
|
|
|
public embargo_date!: string;
|
|
|
|
public publish_id!: number;
|
|
|
|
public project_id!: number;
|
|
|
|
public type!: string;
|
|
|
|
public language!: string;
|
|
|
|
public server_state!: string;
|
|
|
|
public belongs_to_bibliography!: boolean;
|
|
|
|
public created_at!: string;
|
|
|
|
public server_date_modified!: string;
|
|
|
|
public server_date_published!: string;
|
|
|
|
public account_id!: number;
|
|
|
|
public editor_id!: number;
|
|
|
|
public reviewer_id!: number;
|
|
|
|
public preferred_reviewer!: number;
|
|
|
|
public preferred_reviewer_email!: string;
|
|
|
|
public reject_editor_note!: string;
|
|
|
|
public reject_reviewer_note!: string;
|
|
|
|
public reviewer_note_visible!: string;
|
|
|
|
public titles!: Array<Title>;
|
|
|
|
public abstracts!: Array<Abstract>;
|
|
|
|
public authors!: Array<Author>;
|
|
|
|
public contributors!: Array<Author>;
|
|
|
|
public user!: Person;
|
|
|
|
|
|
|
|
public hasTranslatedAbstract(): boolean {
|
|
|
|
if (this.abstracts.some((e) => e.type === "Translated")) {
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public hasSeriesInformationAbstract(): boolean {
|
|
|
|
if (this.abstracts.some((e) => e.type === AbstractType.Series_information)) {
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public hasMethodsAbtract(): boolean {
|
|
|
|
if (this.abstracts.some((e) => e.type === AbstractType.Methods)) {
|
|
|
|
return true;
|
|
|
|
} else {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public get MainAbstract(): Nullable<Abstract> {
|
|
|
|
return this.abstracts.find((e) => e.type === AbstractType.Abstract);
|
|
|
|
}
|
|
|
|
|
|
|
|
public get TranslatedAbtract(): Nullable<Abstract> {
|
|
|
|
return this.abstracts.find((e) => e.type === AbstractType.Translated);
|
|
|
|
}
|
|
|
|
|
|
|
|
public get SeriesInformationAbtract(): Nullable<Abstract> {
|
|
|
|
return this.abstracts.find((e) => e.type === AbstractType.Series_information);
|
|
|
|
}
|
|
|
|
|
|
|
|
public get MethodsAbtract(): Nullable<Abstract> {
|
|
|
|
return this.abstracts.find((e) => e.type === AbstractType.Methods);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
type Nullable<T> = T | undefined;
|
|
|
|
|
|
|
|
export enum AbstractType {
|
|
|
|
Abstract = "Abstract",
|
|
|
|
Methods = "Methods",
|
|
|
|
Series_information = "Series_information",
|
|
|
|
Technical_info = "Technical_info",
|
|
|
|
Translated = "Translated",
|
|
|
|
Other = " Other",
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Title {
|
2021-12-01 14:45:01 +00:00
|
|
|
id: number;
|
|
|
|
type: string;
|
2021-12-13 16:01:40 +00:00
|
|
|
value: string;
|
2021-12-01 14:45:01 +00:00
|
|
|
language: string;
|
2021-12-07 11:22:25 +00:00
|
|
|
}
|
|
|
|
|
2021-12-13 16:01:40 +00:00
|
|
|
export interface Abstract {
|
2021-12-07 11:22:25 +00:00
|
|
|
id: number;
|
|
|
|
type: string;
|
|
|
|
value: string;
|
|
|
|
language: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Author {
|
|
|
|
id: number;
|
|
|
|
academic_title: string;
|
|
|
|
date_of_birth: string;
|
|
|
|
email: string;
|
|
|
|
first_name: string;
|
|
|
|
last_name: string;
|
|
|
|
name_type: string;
|
2021-12-01 14:45:01 +00:00
|
|
|
}
|
2021-12-13 16:01:40 +00:00
|
|
|
|
|
|
|
export interface Person {
|
|
|
|
id: number;
|
|
|
|
login: string;
|
|
|
|
email: string;
|
|
|
|
first_name: string;
|
|
|
|
last_name: string;
|
|
|
|
created_at: string;
|
|
|
|
}
|