mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-08 22:42:54 +00:00
refactor: remodel entities for library search and results
This commit is contained in:
committed by
Jovan Krunić
parent
4ab8770fbc
commit
2dfb64bafd
64
src/meta.ts
64
src/meta.ts
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019 StApps
|
* Copyright (C) 2019-2021 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
@@ -27,8 +27,14 @@ import {SCFavorite, SCFavoriteMeta, SCFavoriteWithoutReferences} from './things/
|
|||||||
import {SCFloor, SCFloorMeta, SCFloorWithoutReferences} from './things/floor';
|
import {SCFloor, SCFloorMeta, SCFloorWithoutReferences} from './things/floor';
|
||||||
import {SCMessage, SCMessageMeta, SCMessageWithoutReferences} from './things/message';
|
import {SCMessage, SCMessageMeta, SCMessageWithoutReferences} from './things/message';
|
||||||
import {SCOrganization, SCOrganizationMeta, SCOrganizationWithoutReferences} from './things/organization';
|
import {SCOrganization, SCOrganizationMeta, SCOrganizationWithoutReferences} from './things/organization';
|
||||||
|
import {SCPeriodical, SCPeriodicalMeta, SCPeriodicalWithoutReferences} from './things/periodical';
|
||||||
import {SCPerson, SCPersonMeta, SCPersonWithoutReferences} from './things/person';
|
import {SCPerson, SCPersonMeta, SCPersonWithoutReferences} from './things/person';
|
||||||
import {SCPointOfInterest, SCPointOfInterestMeta, SCPointOfInterestWithoutReferences} from './things/point-of-interest';
|
import {SCPointOfInterest, SCPointOfInterestMeta, SCPointOfInterestWithoutReferences} from './things/point-of-interest';
|
||||||
|
import {
|
||||||
|
SCPublicationEvent,
|
||||||
|
SCPublicationEventMeta,
|
||||||
|
SCPublicationEventWithoutReferences,
|
||||||
|
} from './things/publication-event';
|
||||||
import {SCRoom, SCRoomMeta, SCRoomWithoutReferences} from './things/room';
|
import {SCRoom, SCRoomMeta, SCRoomWithoutReferences} from './things/room';
|
||||||
import {SCSemester, SCSemesterMeta, SCSemesterWithoutReferences} from './things/semester';
|
import {SCSemester, SCSemesterMeta, SCSemesterWithoutReferences} from './things/semester';
|
||||||
import {SCSetting, SCSettingMeta, SCSettingWithoutReferences} from './things/setting';
|
import {SCSetting, SCSettingMeta, SCSettingWithoutReferences} from './things/setting';
|
||||||
@@ -59,8 +65,10 @@ export const SCClasses: { [K in SCThingType]: object } = {
|
|||||||
'floor': SCFloorMeta,
|
'floor': SCFloorMeta,
|
||||||
'message': SCMessageMeta,
|
'message': SCMessageMeta,
|
||||||
'organization': SCOrganizationMeta,
|
'organization': SCOrganizationMeta,
|
||||||
|
'periodical': SCPeriodicalMeta,
|
||||||
'person': SCPersonMeta,
|
'person': SCPersonMeta,
|
||||||
'point of interest': SCPointOfInterestMeta,
|
'point of interest': SCPointOfInterestMeta,
|
||||||
|
'publication event': SCPublicationEventMeta,
|
||||||
'room': SCRoomMeta,
|
'room': SCRoomMeta,
|
||||||
'semester': SCSemesterMeta,
|
'semester': SCSemesterMeta,
|
||||||
'setting': SCSettingMeta,
|
'setting': SCSettingMeta,
|
||||||
@@ -85,8 +93,10 @@ export type SCIndexableThings =
|
|||||||
| SCFloor
|
| SCFloor
|
||||||
| SCMessage
|
| SCMessage
|
||||||
| SCOrganization
|
| SCOrganization
|
||||||
|
| SCPeriodical
|
||||||
| SCPerson
|
| SCPerson
|
||||||
| SCPointOfInterest
|
| SCPointOfInterest
|
||||||
|
| SCPublicationEvent
|
||||||
| SCRoom
|
| SCRoom
|
||||||
| SCSemester
|
| SCSemester
|
||||||
| SCSportCourse
|
| SCSportCourse
|
||||||
@@ -126,18 +136,20 @@ export type SCAssociatedThingWithoutReferences<THING extends SCThings> =
|
|||||||
THING extends SCFloor ? SCFloorWithoutReferences :
|
THING extends SCFloor ? SCFloorWithoutReferences :
|
||||||
THING extends SCMessage ? SCMessageWithoutReferences :
|
THING extends SCMessage ? SCMessageWithoutReferences :
|
||||||
THING extends SCOrganization ? SCOrganizationWithoutReferences :
|
THING extends SCOrganization ? SCOrganizationWithoutReferences :
|
||||||
THING extends SCPerson ? SCPersonWithoutReferences :
|
THING extends SCPeriodical ? SCPeriodicalWithoutReferences :
|
||||||
THING extends SCPointOfInterest ? SCPointOfInterestWithoutReferences :
|
THING extends SCPerson ? SCPersonWithoutReferences :
|
||||||
THING extends SCRoom ? SCRoomWithoutReferences :
|
THING extends SCPointOfInterest ? SCPointOfInterestWithoutReferences :
|
||||||
THING extends SCSemester ? SCSemesterWithoutReferences :
|
THING extends SCPublicationEvent ? SCPublicationEventWithoutReferences :
|
||||||
THING extends SCSetting ? SCSettingWithoutReferences :
|
THING extends SCRoom ? SCRoomWithoutReferences :
|
||||||
THING extends SCSportCourse ? SCSportCourseWithoutReferences :
|
THING extends SCSemester ? SCSemesterWithoutReferences :
|
||||||
THING extends SCStudyModule ? SCStudyModuleWithoutReferences :
|
THING extends SCSetting ? SCSettingWithoutReferences :
|
||||||
THING extends SCTicket ? SCTicketWithoutReferences :
|
THING extends SCSportCourse ? SCSportCourseWithoutReferences :
|
||||||
THING extends SCToDo ? SCToDoWithoutReferences :
|
THING extends SCStudyModule ? SCStudyModuleWithoutReferences :
|
||||||
THING extends SCTour ? SCTourWithoutReferences :
|
THING extends SCTicket ? SCTicketWithoutReferences :
|
||||||
THING extends SCVideo ? SCVideoWithoutReferences :
|
THING extends SCToDo ? SCToDoWithoutReferences :
|
||||||
never;
|
THING extends SCTour ? SCTourWithoutReferences :
|
||||||
|
THING extends SCVideo ? SCVideoWithoutReferences :
|
||||||
|
never;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Thing for a thing without references
|
* Thing for a thing without references
|
||||||
@@ -157,15 +169,17 @@ export type SCAssociatedThing<THING extends SCThings> =
|
|||||||
THING extends SCFloorWithoutReferences ? SCFloor :
|
THING extends SCFloorWithoutReferences ? SCFloor :
|
||||||
THING extends SCMessageWithoutReferences ? SCMessage :
|
THING extends SCMessageWithoutReferences ? SCMessage :
|
||||||
THING extends SCOrganizationWithoutReferences ? SCOrganization :
|
THING extends SCOrganizationWithoutReferences ? SCOrganization :
|
||||||
THING extends SCPersonWithoutReferences ? SCPerson :
|
THING extends SCPeriodicalWithoutReferences ? SCPeriodical :
|
||||||
THING extends SCPointOfInterestWithoutReferences ? SCPointOfInterest :
|
THING extends SCPersonWithoutReferences ? SCPerson :
|
||||||
THING extends SCRoomWithoutReferences ? SCRoom :
|
THING extends SCPointOfInterestWithoutReferences ? SCPointOfInterest :
|
||||||
THING extends SCSemesterWithoutReferences ? SCSemester :
|
THING extends SCPublicationEventWithoutReferences ? SCPublicationEvent :
|
||||||
THING extends SCSettingWithoutReferences ? SCSetting :
|
THING extends SCRoomWithoutReferences ? SCRoom :
|
||||||
THING extends SCSportCourseWithoutReferences ? SCSportCourse :
|
THING extends SCSemesterWithoutReferences ? SCSemester :
|
||||||
THING extends SCStudyModuleWithoutReferences ? SCStudyModule :
|
THING extends SCSettingWithoutReferences ? SCSetting :
|
||||||
THING extends SCTicketWithoutReferences ? SCTicket :
|
THING extends SCSportCourseWithoutReferences ? SCSportCourse :
|
||||||
THING extends SCToDoWithoutReferences ? SCToDo :
|
THING extends SCStudyModuleWithoutReferences ? SCStudyModule :
|
||||||
THING extends SCTourWithoutReferences ? SCTour :
|
THING extends SCTicketWithoutReferences ? SCTicket :
|
||||||
THING extends SCVideoWithoutReferences ? SCVideo :
|
THING extends SCToDoWithoutReferences ? SCToDo :
|
||||||
never;
|
THING extends SCTourWithoutReferences ? SCTour :
|
||||||
|
THING extends SCVideoWithoutReferences ? SCVideo :
|
||||||
|
never;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019 StApps
|
* Copyright (C) 2019-2021 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
@@ -16,11 +16,11 @@ import {SCLanguageCode, SCMetaTranslations, SCTranslations} from '../../general/
|
|||||||
import {SCISO8601Date} from '../../general/time';
|
import {SCISO8601Date} from '../../general/time';
|
||||||
import {SCOrganizationWithoutReferences} from '../organization';
|
import {SCOrganizationWithoutReferences} from '../organization';
|
||||||
import {SCPersonWithoutReferences} from '../person';
|
import {SCPersonWithoutReferences} from '../person';
|
||||||
|
import {SCPublicationEventWithoutReferences} from '../publication-event';
|
||||||
import {SCThingMeta, SCThingTranslatableProperties, SCThingWithoutReferences} from './thing';
|
import {SCThingMeta, SCThingTranslatableProperties, SCThingWithoutReferences} from './thing';
|
||||||
import {
|
import {
|
||||||
SCAcademicPriceGroup,
|
SCAcademicPriceGroup,
|
||||||
SCThingThatCanBeOffered,
|
SCThingThatCanBeOffered, SCThingThatCanBeOfferedMeta,
|
||||||
SCThingThatCanBeOfferedMeta,
|
|
||||||
SCThingThatCanBeOfferedTranslatableProperties,
|
SCThingThatCanBeOfferedTranslatableProperties,
|
||||||
SCThingThatCanBeOfferedWithoutReferences,
|
SCThingThatCanBeOfferedWithoutReferences,
|
||||||
} from './thing-that-can-be-offered';
|
} from './thing-that-can-be-offered';
|
||||||
@@ -38,11 +38,23 @@ export interface SCCreativeWorkWithoutReferences
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Date the creative work was published
|
* Date the creative work was published
|
||||||
*
|
|
||||||
* @filterable
|
|
||||||
*/
|
*/
|
||||||
datePublished?: SCISO8601Date;
|
datePublished?: SCISO8601Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Edition of a creative work (e.g. the book edition or edition of an article)
|
||||||
|
*
|
||||||
|
* @keyword
|
||||||
|
*/
|
||||||
|
edition?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Date (in text form) the creative work was published for the first time
|
||||||
|
*
|
||||||
|
* @keyword
|
||||||
|
*/
|
||||||
|
firstPublished?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Languages this creative work is written/recorded/... in
|
* Languages this creative work is written/recorded/... in
|
||||||
*
|
*
|
||||||
@@ -75,11 +87,26 @@ export interface SCCreativeWork
|
|||||||
*/
|
*/
|
||||||
authors?: SCPersonWithoutReferences[];
|
authors?: SCPersonWithoutReferences[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A creative work to which the creative work belongs
|
||||||
|
*/
|
||||||
|
isPartOf?: SCCreativeWorkWithoutReferences;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* List of events at which the creative work was published
|
||||||
|
*/
|
||||||
|
publications?: SCPublicationEventWithoutReferences[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* List of publishers of the creative work
|
* List of publishers of the creative work
|
||||||
*/
|
*/
|
||||||
publishers?: Array<SCPersonWithoutReferences | SCOrganizationWithoutReferences>;
|
publishers?: Array<SCPersonWithoutReferences | SCOrganizationWithoutReferences>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A text representing on organization on whose behalf the creator was working
|
||||||
|
*/
|
||||||
|
sourceOrganization?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translated fields of the creative work
|
* Translated fields of the creative work
|
||||||
*/
|
*/
|
||||||
@@ -111,22 +138,36 @@ export class SCCreativeWorkMeta
|
|||||||
de: {
|
de: {
|
||||||
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.de,
|
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.de,
|
||||||
...SCThingThatCanBeOfferedMeta.getInstance().fieldTranslations.de,
|
...SCThingThatCanBeOfferedMeta.getInstance().fieldTranslations.de,
|
||||||
authors: 'Autoren',
|
name: 'Titel',
|
||||||
|
authors: 'beteiligte Personen',
|
||||||
availableLanguages: 'verfügbare Übersetzungen',
|
availableLanguages: 'verfügbare Übersetzungen',
|
||||||
datePublished: 'Veröffentlichungsdatum',
|
datePublished: 'Veröffentlichungsdatum',
|
||||||
|
edition: 'Ausgabe',
|
||||||
|
firstPublished: 'erste Veröffentlichung',
|
||||||
inLanguage: 'Inhaltssprache',
|
inLanguage: 'Inhaltssprache',
|
||||||
|
isPartOf: 'erschienen in',
|
||||||
keywords: 'Schlagwörter',
|
keywords: 'Schlagwörter',
|
||||||
|
lastPublished: 'aktuellste Veröffentlichung',
|
||||||
publishers: 'Verleger',
|
publishers: 'Verleger',
|
||||||
|
publications: 'Veröffentlichungen',
|
||||||
|
sourceOrganization: 'Körperschaft',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.en,
|
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.en,
|
||||||
...SCThingThatCanBeOfferedMeta.getInstance().fieldTranslations.en,
|
...SCThingThatCanBeOfferedMeta.getInstance().fieldTranslations.en,
|
||||||
authors: 'authors',
|
name: 'title',
|
||||||
|
authors: 'involved persons',
|
||||||
availableLanguages: 'available languages',
|
availableLanguages: 'available languages',
|
||||||
datePublished: 'release date',
|
datePublished: 'release date',
|
||||||
|
edition: 'edition',
|
||||||
|
firstPublished: 'first published',
|
||||||
inLanguage: 'content language',
|
inLanguage: 'content language',
|
||||||
|
isPartOf: 'published in',
|
||||||
keywords: 'keywords',
|
keywords: 'keywords',
|
||||||
|
lastPublished: 'last published',
|
||||||
publishers: 'publishers',
|
publishers: 'publishers',
|
||||||
|
publications: 'publications',
|
||||||
|
sourceOrganization: 'corporation',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -136,7 +177,7 @@ export class SCCreativeWorkMeta
|
|||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.de,
|
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.de,
|
||||||
...SCThingThatCanBeOfferedMeta.getInstance().fieldValueTranslations.en,
|
...SCThingThatCanBeOfferedMeta.getInstance().fieldValueTranslations.de,
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.en,
|
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.en,
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCMetaTranslations, SCTranslations} from '../../general/i18n';
|
import {SCMetaTranslations, SCTranslations} from '../../general/i18n';
|
||||||
|
import {SCMap} from '../../general/map';
|
||||||
import {SCISO8601Date} from '../../general/time';
|
import {SCISO8601Date} from '../../general/time';
|
||||||
import {SCUuid} from '../../general/uuid';
|
import {SCUuid} from '../../general/uuid';
|
||||||
import {SCOrganizationWithoutReferences} from '../organization';
|
import {SCOrganizationWithoutReferences} from '../organization';
|
||||||
@@ -25,6 +26,7 @@ export enum SCThingType {
|
|||||||
AcademicEvent = 'academic event',
|
AcademicEvent = 'academic event',
|
||||||
Article = 'article',
|
Article = 'article',
|
||||||
Book = 'book',
|
Book = 'book',
|
||||||
|
Periodical = 'periodical',
|
||||||
Building = 'building',
|
Building = 'building',
|
||||||
Catalog = 'catalog',
|
Catalog = 'catalog',
|
||||||
ContactPoint = 'contact point',
|
ContactPoint = 'contact point',
|
||||||
@@ -38,6 +40,7 @@ export enum SCThingType {
|
|||||||
Organization = 'organization',
|
Organization = 'organization',
|
||||||
Person = 'person',
|
Person = 'person',
|
||||||
PointOfInterest = 'point of interest',
|
PointOfInterest = 'point of interest',
|
||||||
|
PublicationEvent = 'publication event',
|
||||||
Room = 'room',
|
Room = 'room',
|
||||||
Semester = 'semester',
|
Semester = 'semester',
|
||||||
Setting = 'setting',
|
Setting = 'setting',
|
||||||
@@ -60,6 +63,7 @@ export interface SCThingWithoutReferences {
|
|||||||
* @keyword
|
* @keyword
|
||||||
*/
|
*/
|
||||||
alternateNames?: string[];
|
alternateNames?: string[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Description of the thing
|
* Description of the thing
|
||||||
*
|
*
|
||||||
@@ -67,12 +71,21 @@ export interface SCThingWithoutReferences {
|
|||||||
* @text
|
* @text
|
||||||
*/
|
*/
|
||||||
description?: string;
|
description?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The identifier property represents any kind of additional identifier for any kind of SCThing
|
||||||
|
*
|
||||||
|
* E.g. GTIN codes, UUIDs, Database IDs etc.
|
||||||
|
*/
|
||||||
|
identifiers?: SCMap<string>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* URL of an image of the thing
|
* URL of an image of the thing
|
||||||
*
|
*
|
||||||
* @keyword
|
* @keyword
|
||||||
*/
|
*/
|
||||||
image?: string;
|
image?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name of the thing
|
* Name of the thing
|
||||||
*
|
*
|
||||||
@@ -82,12 +95,21 @@ export interface SCThingWithoutReferences {
|
|||||||
* @text
|
* @text
|
||||||
*/
|
*/
|
||||||
name: string;
|
name: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* URL of a reference Web page that unambiguously indicates the item's identity
|
||||||
|
*
|
||||||
|
* E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website.
|
||||||
|
*/
|
||||||
|
sameAs?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translations of specific values of the object
|
* Translations of specific values of the object
|
||||||
*
|
*
|
||||||
* Take precedence over "main" value for selected languages.
|
* Take precedence over "main" value for selected languages.
|
||||||
*/
|
*/
|
||||||
translations?: SCTranslations<SCThingTranslatableProperties>;
|
translations?: SCTranslations<SCThingTranslatableProperties>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of the thing
|
* Type of the thing
|
||||||
*
|
*
|
||||||
@@ -96,16 +118,11 @@ export interface SCThingWithoutReferences {
|
|||||||
* @aggregatable global
|
* @aggregatable global
|
||||||
*/
|
*/
|
||||||
type: SCThingType;
|
type: SCThingType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Universally unique identifier of the thing
|
* Universally unique identifier of the thing
|
||||||
*/
|
*/
|
||||||
uid: SCUuid;
|
uid: SCUuid;
|
||||||
/**
|
|
||||||
* URL of the thing
|
|
||||||
*
|
|
||||||
* @filterable
|
|
||||||
*/
|
|
||||||
url?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -252,7 +269,7 @@ export interface SCThingTranslatablePropertyOrigin {
|
|||||||
*/
|
*/
|
||||||
export class SCThingMeta implements SCMetaTranslations<SCThing> {
|
export class SCThingMeta implements SCMetaTranslations<SCThing> {
|
||||||
/**
|
/**
|
||||||
* Set type definiton for singleton instance
|
* Set type definition for singleton instance
|
||||||
*/
|
*/
|
||||||
protected static _instance = new Map<string, unknown>();
|
protected static _instance = new Map<string, unknown>();
|
||||||
|
|
||||||
@@ -263,24 +280,26 @@ export class SCThingMeta implements SCMetaTranslations<SCThing> {
|
|||||||
de: {
|
de: {
|
||||||
alternateNames: 'alternative Namen',
|
alternateNames: 'alternative Namen',
|
||||||
description: 'Beschreibung',
|
description: 'Beschreibung',
|
||||||
|
identifiers: 'Alternative Identifikation',
|
||||||
image: 'Bild',
|
image: 'Bild',
|
||||||
name: 'Name',
|
name: 'Name',
|
||||||
origin: 'Ursprung',
|
origin: 'Ursprung',
|
||||||
|
sameAs: 'ursprünglicher Link',
|
||||||
translations: 'Übersetzungen',
|
translations: 'Übersetzungen',
|
||||||
type: 'Typ',
|
type: 'Typ',
|
||||||
uid: 'Identifikation',
|
uid: 'Identifikation',
|
||||||
url: 'URL',
|
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
alternateNames: 'alternate names',
|
alternateNames: 'alternate names',
|
||||||
description: 'description',
|
description: 'description',
|
||||||
|
identifiers: 'alternative identification',
|
||||||
image: 'image',
|
image: 'image',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
origin: 'origin',
|
origin: 'origin',
|
||||||
|
sameAs: 'original link',
|
||||||
translations: 'translations',
|
translations: 'translations',
|
||||||
type: 'type',
|
type: 'type',
|
||||||
uid: 'identification',
|
uid: 'identification',
|
||||||
url: 'URL',
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019 StApps
|
* Copyright (C) 2019-2021 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
@@ -21,25 +21,37 @@ import {
|
|||||||
} from './abstract/creative-work';
|
} from './abstract/creative-work';
|
||||||
import {SCThingMeta, SCThingType} from './abstract/thing';
|
import {SCThingMeta, SCThingType} from './abstract/thing';
|
||||||
import {
|
import {
|
||||||
SCThingWithCategories,
|
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
SCThingWithCategoriesTranslatableProperties,
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
SCThingWithCategoriesWithoutReferences,
|
SCThingWithCategoriesWithoutReferences,
|
||||||
SCThingWithCategoriesWithoutReferencesMeta,
|
SCThingWithCategoriesWithoutReferencesMeta,
|
||||||
} from './abstract/thing-with-categories';
|
} from './abstract/thing-with-categories';
|
||||||
|
import {SCPeriodicalWithoutReferences} from './periodical';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Categories of an article
|
||||||
|
*/
|
||||||
|
export type SCArticleCategories = 'unipedia'
|
||||||
|
| 'article'
|
||||||
|
| 'eArticle';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An article without references
|
* An article without references
|
||||||
*/
|
*/
|
||||||
export interface SCArticleWithoutReferences
|
export interface SCArticleWithoutReferences
|
||||||
extends SCCreativeWorkWithoutReferences,
|
extends SCCreativeWorkWithoutReferences,
|
||||||
SCThingWithCategoriesWithoutReferences<SCArticleCategories, SCThingWithCategoriesSpecificValues> {
|
SCThingWithCategoriesWithoutReferences<SCArticleCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Article itself as markdown
|
* Article itself as markdown
|
||||||
*
|
*
|
||||||
* @text
|
* @text
|
||||||
*/
|
*/
|
||||||
articleBody: string;
|
articleBody?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Categories of an article
|
||||||
|
*/
|
||||||
|
categories: SCArticleCategories[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translated fields of an article
|
* Translated fields of an article
|
||||||
@@ -59,8 +71,16 @@ export interface SCArticleWithoutReferences
|
|||||||
* @indexable
|
* @indexable
|
||||||
*/
|
*/
|
||||||
export interface SCArticle
|
export interface SCArticle
|
||||||
extends SCCreativeWork, SCArticleWithoutReferences,
|
extends SCCreativeWork, SCArticleWithoutReferences {
|
||||||
SCThingWithCategories<SCArticleCategories, SCThingWithCategoriesSpecificValues> {
|
/**
|
||||||
|
* A periodical to which this article belongs
|
||||||
|
*/
|
||||||
|
isPartOf?: SCPeriodicalWithoutReferences;
|
||||||
|
/**
|
||||||
|
* Additional information about how to find the article inside of its "parent" (which is provided in 'isPartOf')
|
||||||
|
* e.g. "40, 2011, S. 2-3"
|
||||||
|
*/
|
||||||
|
reference?: string;
|
||||||
/**
|
/**
|
||||||
* Translated fields of an article
|
* Translated fields of an article
|
||||||
*/
|
*/
|
||||||
@@ -73,12 +93,7 @@ export interface SCArticle
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Categories of articles
|
* Translatable properties of an article
|
||||||
*/
|
|
||||||
export type SCArticleCategories = 'unipedia';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Translatable properties of creative works
|
|
||||||
*/
|
*/
|
||||||
export interface SCArticleTranslatableProperties
|
export interface SCArticleTranslatableProperties
|
||||||
extends SCThingWithCategoriesTranslatableProperties, SCCreativeWorkTranslatableProperties {
|
extends SCThingWithCategoriesTranslatableProperties, SCCreativeWorkTranslatableProperties {
|
||||||
@@ -103,14 +118,18 @@ export class SCArticleMeta
|
|||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
||||||
.de,
|
.de,
|
||||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
|
categories: 'Format',
|
||||||
|
reference: 'Referenz',
|
||||||
articleBody: 'Artikelinhalt',
|
articleBody: 'Artikelinhalt',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
||||||
.en,
|
.en,
|
||||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
|
categories: 'format',
|
||||||
|
reference: 'reference',
|
||||||
articleBody: 'article body',
|
articleBody: 'article body',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -122,19 +141,22 @@ export class SCArticleMeta
|
|||||||
de: {
|
de: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
.fieldValueTranslations.de,
|
.fieldValueTranslations.de,
|
||||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
|
||||||
categories: {
|
categories: {
|
||||||
'unipedia': 'Unipedia',
|
article: 'Artikel',
|
||||||
|
eArticle: 'E-Aufsatz',
|
||||||
|
unipedia: 'Unipedia',
|
||||||
},
|
},
|
||||||
type: 'Artikel',
|
type: 'Artikel',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
.fieldValueTranslations.en,
|
.fieldValueTranslations.en,
|
||||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
|
||||||
type: SCThingType.Article,
|
type: SCThingType.Article,
|
||||||
|
categories: {
|
||||||
|
article: 'article',
|
||||||
|
eArticle: 'E-Article',
|
||||||
|
unipedia: 'unipedia',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2019 StApps
|
* Copyright (C) 2019-2021 StApps
|
||||||
* This program is free software: you can redistribute it and/or modify it
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU General Public License as published by the Free
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
* Software Foundation, version 3.
|
* Software Foundation, version 3.
|
||||||
@@ -20,29 +20,52 @@ import {
|
|||||||
SCCreativeWorkWithoutReferences,
|
SCCreativeWorkWithoutReferences,
|
||||||
} from './abstract/creative-work';
|
} from './abstract/creative-work';
|
||||||
import {SCThingMeta, SCThingType} from './abstract/thing';
|
import {SCThingMeta, SCThingType} from './abstract/thing';
|
||||||
import {SCThingWithCategoriesTranslatableProperties} from './abstract/thing-with-categories';
|
import {
|
||||||
import {SCPersonWithoutReferences} from './person';
|
SCThingWithCategoriesSpecificValues,
|
||||||
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
|
SCThingWithCategoriesWithoutReferences,
|
||||||
|
SCThingWithCategoriesWithoutReferencesMeta,
|
||||||
|
} from './abstract/thing-with-categories';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Categories of a book
|
||||||
|
*/
|
||||||
|
export type SCBookCategories = 'audio'
|
||||||
|
| 'book'
|
||||||
|
| 'cd'
|
||||||
|
| 'dvd'
|
||||||
|
| 'ePhoto'
|
||||||
|
| 'ebook'
|
||||||
|
| 'hierarchy'
|
||||||
|
| 'kit'
|
||||||
|
| 'manuscript'
|
||||||
|
| 'map'
|
||||||
|
| 'microfilm'
|
||||||
|
| 'musicalscore'
|
||||||
|
| 'photo'
|
||||||
|
| 'retro'
|
||||||
|
| 'sensorimage'
|
||||||
|
| 'unknown'
|
||||||
|
| 'video';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A book without references
|
* A book without references
|
||||||
*/
|
*/
|
||||||
export interface SCBookWithoutReferences
|
export interface SCBookWithoutReferences
|
||||||
extends SCCreativeWorkWithoutReferences {
|
extends SCCreativeWorkWithoutReferences,
|
||||||
|
SCThingWithCategoriesWithoutReferences<SCBookCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Edition of a book
|
* Categories of a book
|
||||||
*
|
|
||||||
* @filterable
|
|
||||||
* @keyword
|
|
||||||
*/
|
*/
|
||||||
bookEdition?: string;
|
categories: SCBookCategories[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ISBN of a book
|
* ISBNs of a book
|
||||||
*
|
*
|
||||||
* @filterable
|
* @filterable
|
||||||
* @keyword
|
* @keyword
|
||||||
*/
|
*/
|
||||||
isbn?: string;
|
ISBNs?: string[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of pages of a book
|
* Number of pages of a book
|
||||||
@@ -70,11 +93,6 @@ export interface SCBookWithoutReferences
|
|||||||
*/
|
*/
|
||||||
export interface SCBook
|
export interface SCBook
|
||||||
extends SCCreativeWork, SCBookWithoutReferences {
|
extends SCCreativeWork, SCBookWithoutReferences {
|
||||||
/**
|
|
||||||
* Authors of the creative work
|
|
||||||
*/
|
|
||||||
authors: SCPersonWithoutReferences[];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Translated properties of a book
|
* Translated properties of a book
|
||||||
*/
|
*/
|
||||||
@@ -91,12 +109,6 @@ export interface SCBook
|
|||||||
*/
|
*/
|
||||||
export interface SCBookTranslatableFields
|
export interface SCBookTranslatableFields
|
||||||
extends SCThingWithCategoriesTranslatableProperties, SCCreativeWorkTranslatableProperties {
|
extends SCThingWithCategoriesTranslatableProperties, SCCreativeWorkTranslatableProperties {
|
||||||
/**
|
|
||||||
* Translation of an edition of a book
|
|
||||||
*
|
|
||||||
* @keyword
|
|
||||||
*/
|
|
||||||
bookEdition?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -108,17 +120,19 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
|
|||||||
*/
|
*/
|
||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.de,
|
||||||
.de,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
||||||
bookEdition: 'Buchausgabe',
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
isbn: 'ISBN',
|
categories: 'Format',
|
||||||
numberOfPages: 'Seitenzahl',
|
ISBNs: 'ISBN',
|
||||||
|
numberOfPages: 'Seitenanzahl',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.en,
|
||||||
.en,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
||||||
bookEdition: 'book edition',
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
isbn: 'ISBN',
|
categories: 'format',
|
||||||
|
ISBNs: 'ISBN',
|
||||||
numberOfPages: 'number of pages',
|
numberOfPages: 'number of pages',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -130,12 +144,56 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
|
|||||||
de: {
|
de: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
.fieldValueTranslations.de,
|
.fieldValueTranslations.de,
|
||||||
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
||||||
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||||
|
categories: {
|
||||||
|
audio: 'Tonträger',
|
||||||
|
book: 'Buch',
|
||||||
|
cd: 'CD',
|
||||||
|
dvd: 'DVD',
|
||||||
|
ePhoto: 'E-Photo',
|
||||||
|
ebook: 'E-Book',
|
||||||
|
hierarchy: 'mehrteiliges Werk',
|
||||||
|
kit: 'Medienkombination',
|
||||||
|
manuscript: 'Handschrift',
|
||||||
|
map: 'Karte',
|
||||||
|
microfilm: 'Mikrofilm, Mikrofiche',
|
||||||
|
musicalscore: 'Noten',
|
||||||
|
photo: 'Abbildung',
|
||||||
|
physicalobject: 'Objekt',
|
||||||
|
retro: 'Retro (Buch)',
|
||||||
|
sensorimage: 'Blindenschrift',
|
||||||
|
unknown: 'Unbekannt',
|
||||||
|
video: 'Film',
|
||||||
|
},
|
||||||
type: 'Buch',
|
type: 'Buch',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
.fieldValueTranslations.en,
|
.fieldValueTranslations.en,
|
||||||
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
||||||
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||||
type: SCThingType.Book,
|
type: SCThingType.Book,
|
||||||
|
categories: {
|
||||||
|
audio: 'audio material',
|
||||||
|
book: 'book',
|
||||||
|
cd: 'CD',
|
||||||
|
dvd: 'DVD',
|
||||||
|
ePhoto: 'E-Photo',
|
||||||
|
ebook: 'E-Book',
|
||||||
|
hierarchy: 'multipart item',
|
||||||
|
kit: 'media combination',
|
||||||
|
manuscript: 'manuscript',
|
||||||
|
map: 'map',
|
||||||
|
microfilm: 'microfilm, microfiche',
|
||||||
|
musicalscore: 'sheet music',
|
||||||
|
photo: 'illustration',
|
||||||
|
physicalobject: 'object',
|
||||||
|
retro: 'retro (book)',
|
||||||
|
sensorimage: 'braille',
|
||||||
|
unknown: 'unknown',
|
||||||
|
video: 'film',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,14 +22,24 @@ import {
|
|||||||
} from './abstract/creative-work';
|
} from './abstract/creative-work';
|
||||||
import {SCThingMeta, SCThingType} from './abstract/thing';
|
import {SCThingMeta, SCThingType} from './abstract/thing';
|
||||||
import {SCThingThatCanBeOfferedTranslatableProperties} from './abstract/thing-that-can-be-offered';
|
import {SCThingThatCanBeOfferedTranslatableProperties} from './abstract/thing-that-can-be-offered';
|
||||||
|
import {
|
||||||
|
SCThingWithCategoriesSpecificValues,
|
||||||
|
SCThingWithCategoriesWithoutReferences, SCThingWithCategoriesWithoutReferencesMeta,
|
||||||
|
} from './abstract/thing-with-categories';
|
||||||
import {SCUserGroup} from './abstract/user-groups';
|
import {SCUserGroup} from './abstract/user-groups';
|
||||||
import {SCOrganizationWithoutReferences} from './organization';
|
import {SCOrganizationWithoutReferences} from './organization';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Categories of a message
|
||||||
|
*/
|
||||||
|
export type SCMessageCategories = 'news';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A message without references
|
* A message without references
|
||||||
*/
|
*/
|
||||||
export interface SCMessageWithoutReferences
|
export interface SCMessageWithoutReferences
|
||||||
extends SCCreativeWorkWithoutReferences {
|
extends SCCreativeWorkWithoutReferences,
|
||||||
|
SCThingWithCategoriesWithoutReferences<SCMessageCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Organizational unit for which the message is intended
|
* Organizational unit for which the message is intended
|
||||||
*/
|
*/
|
||||||
@@ -42,6 +52,11 @@ export interface SCMessageWithoutReferences
|
|||||||
*/
|
*/
|
||||||
audiences: SCUserGroup[];
|
audiences: SCUserGroup[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Categories of a message
|
||||||
|
*/
|
||||||
|
categories: SCMessageCategories[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When the message was created
|
* When the message was created
|
||||||
*
|
*
|
||||||
@@ -117,6 +132,8 @@ export class SCMessageMeta
|
|||||||
de: {
|
de: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
||||||
.de,
|
.de,
|
||||||
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCMessageCategories,
|
||||||
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
audienceOrganizations: 'Zielgruppenorganisationen',
|
audienceOrganizations: 'Zielgruppenorganisationen',
|
||||||
audiences: 'Zielgruppen',
|
audiences: 'Zielgruppen',
|
||||||
dateCreated: 'Erstellungsdatum',
|
dateCreated: 'Erstellungsdatum',
|
||||||
@@ -126,6 +143,8 @@ export class SCMessageMeta
|
|||||||
en: {
|
en: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
||||||
.en,
|
.en,
|
||||||
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCMessageCategories,
|
||||||
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
audienceOrganizations: 'audience organizations',
|
audienceOrganizations: 'audience organizations',
|
||||||
audiences: 'audiences',
|
audiences: 'audiences',
|
||||||
dateCreated: 'date created',
|
dateCreated: 'date created',
|
||||||
@@ -142,9 +161,12 @@ export class SCMessageMeta
|
|||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
.fieldValueTranslations.de,
|
.fieldValueTranslations.de,
|
||||||
audiences: {
|
audiences: {
|
||||||
'employees': 'Angestellte',
|
employees: 'Angestellte',
|
||||||
'guests': 'Gäste',
|
guests: 'Gäste',
|
||||||
'students': 'Studenten',
|
students: 'Studenten',
|
||||||
|
},
|
||||||
|
categories: {
|
||||||
|
news: 'Neuigkeiten',
|
||||||
},
|
},
|
||||||
type: 'Nachricht',
|
type: 'Nachricht',
|
||||||
},
|
},
|
||||||
|
|||||||
137
src/things/periodical.ts
Normal file
137
src/things/periodical.ts
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 StApps
|
||||||
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
import {SCMetaTranslations, SCTranslations} from '../general/i18n';
|
||||||
|
import {
|
||||||
|
SCCreativeWork,
|
||||||
|
SCCreativeWorkMeta,
|
||||||
|
SCCreativeWorkTranslatableProperties,
|
||||||
|
SCCreativeWorkWithoutReferences,
|
||||||
|
} from './abstract/creative-work';
|
||||||
|
import {SCThingMeta, SCThingType} from './abstract/thing';
|
||||||
|
import {
|
||||||
|
SCThingWithCategoriesSpecificValues,
|
||||||
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
|
SCThingWithCategoriesWithoutReferences,
|
||||||
|
SCThingWithCategoriesWithoutReferencesMeta,
|
||||||
|
} from './abstract/thing-with-categories';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Categories of a periodical
|
||||||
|
*/
|
||||||
|
export type SCPeriodicalCategories = 'journal' | 'electronic';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A periodical without references
|
||||||
|
*/
|
||||||
|
export interface SCPeriodicalWithoutReferences
|
||||||
|
extends SCCreativeWorkWithoutReferences,
|
||||||
|
SCThingWithCategoriesWithoutReferences<SCPeriodicalCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
|
/**
|
||||||
|
* Categories of a periodical
|
||||||
|
*/
|
||||||
|
categories: SCPeriodicalCategories[];
|
||||||
|
/**
|
||||||
|
* A list of ISSNs of a periodical
|
||||||
|
*
|
||||||
|
* @filterable
|
||||||
|
* @keyword
|
||||||
|
*/
|
||||||
|
ISSNs?: string[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translated properties of a periodical
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCPeriodicalTranslatableFields>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of a periodical
|
||||||
|
*/
|
||||||
|
type: SCThingType.Periodical;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A publication published at regular intervals (e.g. a magazine or newspaper)
|
||||||
|
*
|
||||||
|
* @validatable
|
||||||
|
* @indexable
|
||||||
|
*/
|
||||||
|
export interface SCPeriodical
|
||||||
|
extends SCCreativeWork, SCPeriodicalWithoutReferences {
|
||||||
|
/**
|
||||||
|
* Translated properties of a periodical
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCPeriodicalTranslatableFields>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of a periodical
|
||||||
|
*/
|
||||||
|
type: SCThingType.Periodical;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translatable properties of a periodical
|
||||||
|
*/
|
||||||
|
export interface SCPeriodicalTranslatableFields
|
||||||
|
extends SCThingWithCategoriesTranslatableProperties, SCCreativeWorkTranslatableProperties {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Meta information about a periodical
|
||||||
|
*/
|
||||||
|
export class SCPeriodicalMeta extends SCThingMeta implements SCMetaTranslations<SCPeriodical> {
|
||||||
|
/**
|
||||||
|
* Translations of fields
|
||||||
|
*/
|
||||||
|
fieldTranslations = {
|
||||||
|
de: {
|
||||||
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.de,
|
||||||
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPeriodicalCategories,
|
||||||
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
|
categories: 'Format',
|
||||||
|
ISSNs: 'ISSN',
|
||||||
|
},
|
||||||
|
en: {
|
||||||
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.en,
|
||||||
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPeriodicalCategories,
|
||||||
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
|
categories: 'format',
|
||||||
|
ISSNs: 'ISSN',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translations of values of fields
|
||||||
|
*/
|
||||||
|
fieldValueTranslations = {
|
||||||
|
de: {
|
||||||
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
|
.fieldValueTranslations.de,
|
||||||
|
type: 'Periodikum',
|
||||||
|
categories: {
|
||||||
|
electronic: 'E-Journal',
|
||||||
|
journal: 'Zeitschrift',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
en: {
|
||||||
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
|
.fieldValueTranslations.en,
|
||||||
|
type: 'periodical',
|
||||||
|
categories: {
|
||||||
|
electronic: 'E-Journal',
|
||||||
|
journal: 'journal',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -57,7 +57,7 @@ export interface SCPersonWithoutReferences
|
|||||||
* @filterable
|
* @filterable
|
||||||
* @keyword
|
* @keyword
|
||||||
*/
|
*/
|
||||||
familyName: string;
|
familyName?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The private fax number of the person.
|
* The private fax number of the person.
|
||||||
@@ -80,7 +80,7 @@ export interface SCPersonWithoutReferences
|
|||||||
* @filterable
|
* @filterable
|
||||||
* @keyword
|
* @keyword
|
||||||
*/
|
*/
|
||||||
givenName: string;
|
givenName?: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Honorific prefix of the person.
|
* Honorific prefix of the person.
|
||||||
|
|||||||
105
src/things/publication-event.ts
Normal file
105
src/things/publication-event.ts
Normal file
@@ -0,0 +1,105 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2021 StApps
|
||||||
|
* This program is free software: you can redistribute it and/or modify it
|
||||||
|
* under the terms of the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation, version 3.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||||
|
* more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along with
|
||||||
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
import {SCMetaTranslations, SCTranslations} from '../general/i18n';
|
||||||
|
import {SCEvent, SCEventMeta, SCEventWithoutReferences} from './abstract/event';
|
||||||
|
import {SCThingMeta, SCThingTranslatableProperties, SCThingType} from './abstract/thing';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An publication event without references
|
||||||
|
*/
|
||||||
|
export interface SCPublicationEventWithoutReferences
|
||||||
|
extends SCEventWithoutReferences {
|
||||||
|
/**
|
||||||
|
* All the locations related to the event (e.g. where a creative work was published)
|
||||||
|
*/
|
||||||
|
locations?: string[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An organization (or a person) that is publishing at the event
|
||||||
|
*/
|
||||||
|
publisher?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translated fields of an publication event
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCPublicationEventTranslatableProperties>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of an publication event
|
||||||
|
*/
|
||||||
|
type: SCThingType.PublicationEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* An publication event
|
||||||
|
*
|
||||||
|
* @validatable
|
||||||
|
* @indexable
|
||||||
|
*/
|
||||||
|
export interface SCPublicationEvent
|
||||||
|
extends SCEvent, SCPublicationEventWithoutReferences {
|
||||||
|
/**
|
||||||
|
* Translated fields of an publication event
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCPublicationEventTranslatableProperties>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type of an publication event
|
||||||
|
*/
|
||||||
|
type: SCThingType.PublicationEvent;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translatable properties of an publication event
|
||||||
|
*/
|
||||||
|
export interface SCPublicationEventTranslatableProperties extends SCThingTranslatableProperties {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Meta information about publication events
|
||||||
|
*/
|
||||||
|
export class SCPublicationEventMeta
|
||||||
|
extends SCThingMeta
|
||||||
|
implements SCMetaTranslations<SCPublicationEvent> {
|
||||||
|
/**
|
||||||
|
* Translations of fields
|
||||||
|
*/
|
||||||
|
fieldTranslations = {
|
||||||
|
de: {
|
||||||
|
...SCEventMeta.getInstance<SCEventMeta>().fieldTranslations.de,
|
||||||
|
locations: 'Erscheinungsorte',
|
||||||
|
publisher: 'Verlag',
|
||||||
|
},
|
||||||
|
en: {
|
||||||
|
...SCEventMeta.getInstance<SCEventMeta>().fieldTranslations.en,
|
||||||
|
locations: 'places of publication',
|
||||||
|
publisher: 'publisher',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translations of values of fields
|
||||||
|
*/
|
||||||
|
fieldValueTranslations = {
|
||||||
|
de: {
|
||||||
|
...SCEventMeta.getInstance<SCEventMeta>().fieldValueTranslations.de,
|
||||||
|
type: 'Veröffentlichung',
|
||||||
|
},
|
||||||
|
en: {
|
||||||
|
...SCEventMeta.getInstance<SCEventMeta>().fieldValueTranslations.en,
|
||||||
|
type: 'publication event',
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
"categories": [
|
"categories": [
|
||||||
"unipedia"
|
"unipedia"
|
||||||
],
|
],
|
||||||
"url": "https://www.mydesk.tu-berlin.de/wiki/abk%C3%BCrzungen",
|
"sameAs": "https://www.mydesk.tu-berlin.de/wiki/abk%C3%BCrzungen",
|
||||||
"name": "Abkürzungen",
|
"name": "Abkürzungen",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Abkürzungen",
|
"Abkürzungen",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"categories": [
|
"categories": [
|
||||||
"unipedia"
|
"unipedia"
|
||||||
],
|
],
|
||||||
"url": "https://www.mydesk.tu-berlin.de/wiki/ag_ziethen",
|
"sameAs": "https://www.mydesk.tu-berlin.de/wiki/ag_ziethen",
|
||||||
"name": "AG Ziethen",
|
"name": "AG Ziethen",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Bologna",
|
"Bologna",
|
||||||
|
|||||||
36
test/resources/Article.3.json
Normal file
36
test/resources/Article.3.json
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"errorNames": [],
|
||||||
|
"instance": {
|
||||||
|
"type": "article",
|
||||||
|
"uid": "d541eda5-1542-59b2-969e-7dbbee0bd2a8",
|
||||||
|
"name": "Mozart und Frankfurt am Main : drei Generationen Mozart in Frankfurt am Main",
|
||||||
|
"description": "Ill.",
|
||||||
|
"categories": [
|
||||||
|
"article"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"type": "person",
|
||||||
|
"uid": "56d46c9b-8ede-52ae-a40f-6800cff577e5",
|
||||||
|
"name": "Greve, Clemens"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"firstPublished": "2008",
|
||||||
|
"sameAs": "https://hds2test.hebis.de/ubffm/Record/HEB198305427",
|
||||||
|
"origin": {
|
||||||
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
|
"name": "HeBIS HDS",
|
||||||
|
"originalId": "HEB198305427",
|
||||||
|
"type": "remote",
|
||||||
|
"url": "https://hds2test.hebis.de/ubffm/"
|
||||||
|
},
|
||||||
|
"isPartOf": {
|
||||||
|
"uid": "bc5e5399-a24c-5c01-9c1b-0c8b83272087",
|
||||||
|
"name": "Archiv für Frankfurts Geschichte und Kunst",
|
||||||
|
"type": "periodical",
|
||||||
|
"categories": []
|
||||||
|
},
|
||||||
|
"reference": "Band 71 (2008), Seite 27-40"
|
||||||
|
},
|
||||||
|
"schema": "SCArticle"
|
||||||
|
}
|
||||||
36
test/resources/Article.4.json
Normal file
36
test/resources/Article.4.json
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"errorNames": [],
|
||||||
|
"instance": {
|
||||||
|
"type": "article",
|
||||||
|
"uid": "554a4a89-df73-5197-ac85-c8a5a3a9c5b0",
|
||||||
|
"name": "Ursula Janik : [Markthändlerin]",
|
||||||
|
"description": "Ill.",
|
||||||
|
"categories": [
|
||||||
|
"article"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"type": "person",
|
||||||
|
"uid": "c6e44e1f-f76c-53f8-a18f-47fa54ae0e90",
|
||||||
|
"name": "Fröhlich, Ute B."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"firstPublished": "2002",
|
||||||
|
"sameAs": "https://hds2test.hebis.de/ubffm/Record/HEB107025590",
|
||||||
|
"origin": {
|
||||||
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
|
"name": "HeBIS HDS",
|
||||||
|
"originalId": "HEB107025590",
|
||||||
|
"type": "remote",
|
||||||
|
"url": "https://hds2test.hebis.de/ubffm/"
|
||||||
|
},
|
||||||
|
"isPartOf": {
|
||||||
|
"uid": "f84c1851-042e-542f-ba7a-158b32dfb82f",
|
||||||
|
"name": "Frankfurter Allgemeine. R, Rhein-Main-Zeitung",
|
||||||
|
"type": "periodical",
|
||||||
|
"categories": []
|
||||||
|
},
|
||||||
|
"reference": "Heft 190 (17. 8 2002), Seite 62"
|
||||||
|
},
|
||||||
|
"schema": "SCArticle"
|
||||||
|
}
|
||||||
@@ -22,9 +22,14 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"inLanguage": "de",
|
"inLanguage": "de",
|
||||||
"bookEdition": "2., überarb. u. erw. Aufl.",
|
"edition": "2., überarb. u. erw. Aufl.",
|
||||||
"isbn": "3936608776",
|
"ISBNs": [
|
||||||
|
"3936608776"
|
||||||
|
],
|
||||||
"numberOfPages": 537,
|
"numberOfPages": 537,
|
||||||
|
"categories": [
|
||||||
|
"book"
|
||||||
|
],
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
"name": "Dummy",
|
"name": "Dummy",
|
||||||
|
|||||||
@@ -4,6 +4,9 @@
|
|||||||
"type": "book",
|
"type": "book",
|
||||||
"uid": "db47f7f4-7699-5a37-afcc-24beaa998d36",
|
"uid": "db47f7f4-7699-5a37-afcc-24beaa998d36",
|
||||||
"name": "Minimal Book",
|
"name": "Minimal Book",
|
||||||
|
"categories": [
|
||||||
|
"ebook"
|
||||||
|
],
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"type": "person",
|
"type": "person",
|
||||||
@@ -14,7 +17,9 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"datePublished": "2007-08-01",
|
"datePublished": "2007-08-01",
|
||||||
"isbn": "3936608776",
|
"ISBNs": [
|
||||||
|
"3936608776"
|
||||||
|
],
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
"name": "Dummy",
|
"name": "Dummy",
|
||||||
|
|||||||
40
test/resources/Book.3.json
Normal file
40
test/resources/Book.3.json
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
"errorNames": [],
|
||||||
|
"instance": {
|
||||||
|
"type": "book",
|
||||||
|
"uid": "188cb2bd-724d-543d-97ac-9aa1dda68cb7",
|
||||||
|
"name": "Frauen im Ingenieurberuf : FIB ; 1. Gesamtdeutsches Symposium VDI-FIB 17. - 18. November 1990, Bad Homburg ; 1. überregionales Treffen VDI-FIB 11. - 12. November 1989, Düsseldorf",
|
||||||
|
"description": "47 S. : Ill., Kt.",
|
||||||
|
"categories": [
|
||||||
|
"book"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"uid": "a276588c-ecee-5d2e-8b9c-73cb902bc165",
|
||||||
|
"name": "Saatweber, Jutta (Hrsg.)",
|
||||||
|
"type": "person"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"firstPublished": "[ca. 1991]",
|
||||||
|
"publications": [
|
||||||
|
{
|
||||||
|
"uid": "603a6574-8910-588a-9e83-cd26e6988c74",
|
||||||
|
"type": "publication event",
|
||||||
|
"locations": [
|
||||||
|
"Frankfurt/M"
|
||||||
|
],
|
||||||
|
"publisher": "VDI",
|
||||||
|
"name": "VDI"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sameAs": "https://hds2test.hebis.de/ubffm/Record/HEB022992618",
|
||||||
|
"origin": {
|
||||||
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
|
"name": "HeBIS HDS",
|
||||||
|
"originalId": "HEB022992618",
|
||||||
|
"type": "remote",
|
||||||
|
"url": "https://hds2test.hebis.de/ubffm/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema": "SCBook"
|
||||||
|
}
|
||||||
43
test/resources/Book.4.json
Normal file
43
test/resources/Book.4.json
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"errorNames": [],
|
||||||
|
"instance": {
|
||||||
|
"type": "book",
|
||||||
|
"uid": "f6ee5744-a441-595d-9dae-a9f579c0660f",
|
||||||
|
"name": "Kant",
|
||||||
|
"description": "176 S.",
|
||||||
|
"categories": [
|
||||||
|
"book"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"uid": "7e198ecf-966a-5f99-8a45-266243583023",
|
||||||
|
"name": "Thouard, Denis",
|
||||||
|
"type": "person"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"firstPublished": "2001",
|
||||||
|
"publications": [
|
||||||
|
{
|
||||||
|
"uid": "603a6574-8910-588a-9e83-cd26e6988c74",
|
||||||
|
"type": "publication event",
|
||||||
|
"locations": [
|
||||||
|
"Paris"
|
||||||
|
],
|
||||||
|
"publisher": "Belles Lettres",
|
||||||
|
"name": "Belles Lettres"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sameAs": "https://hds2test.hebis.de/ubffm/Record/HEB102248788",
|
||||||
|
"ISBNs": [
|
||||||
|
"2251760385"
|
||||||
|
],
|
||||||
|
"origin": {
|
||||||
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
|
"name": "HeBIS HDS",
|
||||||
|
"originalId": "HEB102248788",
|
||||||
|
"type": "remote",
|
||||||
|
"url": "https://hds2test.hebis.de/ubffm/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema": "SCBook"
|
||||||
|
}
|
||||||
@@ -21,6 +21,9 @@
|
|||||||
"audiences": [
|
"audiences": [
|
||||||
"students"
|
"students"
|
||||||
],
|
],
|
||||||
|
"categories": [
|
||||||
|
"news"
|
||||||
|
],
|
||||||
"sequenceIndex": 1010,
|
"sequenceIndex": 1010,
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
|
|||||||
@@ -21,6 +21,9 @@
|
|||||||
"audiences": [
|
"audiences": [
|
||||||
"students"
|
"students"
|
||||||
],
|
],
|
||||||
|
"categories": [
|
||||||
|
"news"
|
||||||
|
],
|
||||||
"sequenceIndex": 1020,
|
"sequenceIndex": 1020,
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
"audiences": [
|
"audiences": [
|
||||||
"students"
|
"students"
|
||||||
],
|
],
|
||||||
|
"categories": [
|
||||||
|
"news"
|
||||||
|
],
|
||||||
"sequenceIndex": 1001,
|
"sequenceIndex": 1001,
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
"audiences": [
|
"audiences": [
|
||||||
"students"
|
"students"
|
||||||
],
|
],
|
||||||
|
"categories": [
|
||||||
|
"news"
|
||||||
|
],
|
||||||
"sequenceIndex": 1004,
|
"sequenceIndex": 1004,
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
|
|||||||
35
test/resources/Periodical.1.json
Normal file
35
test/resources/Periodical.1.json
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"errorNames": [],
|
||||||
|
"instance": {
|
||||||
|
"type": "periodical",
|
||||||
|
"uid": "d921479e-4d35-5cd1-b64a-939cbe40a5b0",
|
||||||
|
"name": "London magazine : a review of literature and the arts",
|
||||||
|
"categories": [
|
||||||
|
"journal"
|
||||||
|
],
|
||||||
|
"firstPublished": "1954",
|
||||||
|
"publications": [
|
||||||
|
{
|
||||||
|
"uid": "603a6574-8910-588a-9e83-cd26e6988c74",
|
||||||
|
"type": "publication event",
|
||||||
|
"locations": [
|
||||||
|
"London"
|
||||||
|
],
|
||||||
|
"publisher": "London Magazine",
|
||||||
|
"name": "London Magazine"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"ISSNs": [
|
||||||
|
"0024-6085"
|
||||||
|
],
|
||||||
|
"sameAs": "https://hds2test.hebis.de/ubffm/Record/HEB046847146",
|
||||||
|
"origin": {
|
||||||
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
|
"name": "HeBIS HDS",
|
||||||
|
"originalId": "HEB046847146",
|
||||||
|
"type": "remote",
|
||||||
|
"url": "https://hds2test.hebis.de/ubffm/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema": "SCPeriodical"
|
||||||
|
}
|
||||||
32
test/resources/Periodical.2.json
Normal file
32
test/resources/Periodical.2.json
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
"errorNames": [],
|
||||||
|
"instance": {
|
||||||
|
"type": "periodical",
|
||||||
|
"uid": "c8d7a4f7-88ac-5da3-86c7-32b93d16f00a",
|
||||||
|
"name": "[Frankfurter Allgemeine \/ R F A Z FAZ Republik Heroes], Frankfurter Allgemeine : Zeitung für Deutschland, R. Rhein-Main-Zeitung : Zeitung für Frankfurt",
|
||||||
|
"categories": [
|
||||||
|
"journal"
|
||||||
|
],
|
||||||
|
"firstPublished": "1988",
|
||||||
|
"publications": [
|
||||||
|
{
|
||||||
|
"uid": "64829217-9eea-532f-8730-7e609efffbca",
|
||||||
|
"type": "publication event",
|
||||||
|
"locations": [
|
||||||
|
"Frankfurt, M."
|
||||||
|
],
|
||||||
|
"publisher": "Frankfurter Allg. Zeitung",
|
||||||
|
"name": "Frankfurter Allg. Zeitung"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sameAs": "https://hds2test.hebis.de/ubffm/Record/HEB048624853",
|
||||||
|
"origin": {
|
||||||
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
|
"name": "HeBIS HDS",
|
||||||
|
"originalId": "HEB048624853",
|
||||||
|
"type": "remote",
|
||||||
|
"url": "https://hds2test.hebis.de/ubffm/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"schema": "SCPeriodical"
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
"instance": {
|
"instance": {
|
||||||
"type": "video",
|
"type": "video",
|
||||||
"uid": "e274cc82-f51c-566b-b8da-85763ff375e8",
|
"uid": "e274cc82-f51c-566b-b8da-85763ff375e8",
|
||||||
"url": "https://vimeo.com/1084537",
|
"sameAs": "https://vimeo.com/1084537",
|
||||||
"name": "Big Buck Bunny",
|
"name": "Big Buck Bunny",
|
||||||
"origin": {
|
"origin": {
|
||||||
"indexed": "2018-09-11T12:30:00Z",
|
"indexed": "2018-09-11T12:30:00Z",
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"instance": {
|
"instance": {
|
||||||
"type": "video",
|
"type": "video",
|
||||||
"uid": "2def52c8-f901-5b30-96fc-ba570a038508",
|
"uid": "2def52c8-f901-5b30-96fc-ba570a038508",
|
||||||
"url": "https://vimeo.com/1084537",
|
"sameAs": "https://vimeo.com/1084537",
|
||||||
"name": "Big Buck Bunny",
|
"name": "Big Buck Bunny",
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ import {SCTicket, SCTicketWithoutReferences} from '../src/things/ticket';
|
|||||||
import {SCToDo, SCToDoWithoutReferences} from '../src/things/todo';
|
import {SCToDo, SCToDoWithoutReferences} from '../src/things/todo';
|
||||||
import {SCTour, SCTourWithoutReferences} from '../src/things/tour';
|
import {SCTour, SCTourWithoutReferences} from '../src/things/tour';
|
||||||
import {SCVideo, SCVideoWithoutReferences} from '../src/things/video';
|
import {SCVideo, SCVideoWithoutReferences} from '../src/things/video';
|
||||||
|
import {SCPeriodical, SCPeriodicalWithoutReferences} from '../src/things/periodical';
|
||||||
|
import {SCPublicationEvent, SCPublicationEventWithoutReferences} from '../src/things/publication-event';
|
||||||
|
|
||||||
// tslint:disable:no-any
|
// tslint:disable:no-any
|
||||||
// tslint:disable:completed-docs
|
// tslint:disable:completed-docs
|
||||||
@@ -226,6 +228,17 @@ assert<Has<SCOrganizationPropertyTypes, SCThing>>(false);
|
|||||||
assert<Extends<SCOrganizationWithoutReferences, SCThing>>(false);
|
assert<Extends<SCOrganizationWithoutReferences, SCThing>>(false);
|
||||||
assert<Extends<SCOrganization, SCThing>>(true);
|
assert<Extends<SCOrganization, SCThing>>(true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Types of properties of SCPeriodical
|
||||||
|
*/
|
||||||
|
type SCPeriodicalPropertyTypes = PropertyTypesNested<SCPeriodical>;
|
||||||
|
assert<NotHas<SCPeriodicalPropertyTypes, SCThingWithoutReferences>>(false);
|
||||||
|
assert<Has<SCPeriodicalPropertyTypes, SCThingWithoutReferences>>(true);
|
||||||
|
assert<NotHas<SCPeriodicalPropertyTypes, SCThing>>(true);
|
||||||
|
assert<Has<SCPeriodicalPropertyTypes, SCThing>>(false);
|
||||||
|
assert<Extends<SCPeriodicalWithoutReferences, SCThing>>(false);
|
||||||
|
assert<Extends<SCPeriodical, SCThing>>(true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Types of properties of SCPerson
|
* Types of properties of SCPerson
|
||||||
*/
|
*/
|
||||||
@@ -248,6 +261,17 @@ assert<Has<SCPointOfInterestPropertyTypes, SCThing>>(false);
|
|||||||
assert<Extends<SCPointOfInterestWithoutReferences, SCThing>>(false);
|
assert<Extends<SCPointOfInterestWithoutReferences, SCThing>>(false);
|
||||||
assert<Extends<SCPointOfInterest, SCThing>>(true);
|
assert<Extends<SCPointOfInterest, SCThing>>(true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Types of properties of SCPublicationEvent
|
||||||
|
*/
|
||||||
|
type SCPublicationEventPropertyTypes = PropertyTypesNested<SCPublicationEvent>;
|
||||||
|
assert<NotHas<SCPublicationEventPropertyTypes, SCThingWithoutReferences>>(false);
|
||||||
|
assert<Has<SCPublicationEventPropertyTypes, SCThingWithoutReferences>>(true);
|
||||||
|
assert<NotHas<SCPublicationEventPropertyTypes, SCThing>>(true);
|
||||||
|
assert<Has<SCPublicationEventPropertyTypes, SCThing>>(false);
|
||||||
|
assert<Extends<SCPublicationEventWithoutReferences, SCThing>>(false);
|
||||||
|
assert<Extends<SCPublicationEvent, SCThing>>(true);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Types of properties of SCRoom
|
* Types of properties of SCRoom
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user