mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-08 06:22:53 +00:00
refactor: remodel entities for library search and results
This commit is contained in:
committed by
Jovan Krunić
parent
4ab8770fbc
commit
2dfb64bafd
16
src/meta.ts
16
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
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -27,8 +27,14 @@ import {SCFavorite, SCFavoriteMeta, SCFavoriteWithoutReferences} from './things/
|
||||
import {SCFloor, SCFloorMeta, SCFloorWithoutReferences} from './things/floor';
|
||||
import {SCMessage, SCMessageMeta, SCMessageWithoutReferences} from './things/message';
|
||||
import {SCOrganization, SCOrganizationMeta, SCOrganizationWithoutReferences} from './things/organization';
|
||||
import {SCPeriodical, SCPeriodicalMeta, SCPeriodicalWithoutReferences} from './things/periodical';
|
||||
import {SCPerson, SCPersonMeta, SCPersonWithoutReferences} from './things/person';
|
||||
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 {SCSemester, SCSemesterMeta, SCSemesterWithoutReferences} from './things/semester';
|
||||
import {SCSetting, SCSettingMeta, SCSettingWithoutReferences} from './things/setting';
|
||||
@@ -59,8 +65,10 @@ export const SCClasses: { [K in SCThingType]: object } = {
|
||||
'floor': SCFloorMeta,
|
||||
'message': SCMessageMeta,
|
||||
'organization': SCOrganizationMeta,
|
||||
'periodical': SCPeriodicalMeta,
|
||||
'person': SCPersonMeta,
|
||||
'point of interest': SCPointOfInterestMeta,
|
||||
'publication event': SCPublicationEventMeta,
|
||||
'room': SCRoomMeta,
|
||||
'semester': SCSemesterMeta,
|
||||
'setting': SCSettingMeta,
|
||||
@@ -85,8 +93,10 @@ export type SCIndexableThings =
|
||||
| SCFloor
|
||||
| SCMessage
|
||||
| SCOrganization
|
||||
| SCPeriodical
|
||||
| SCPerson
|
||||
| SCPointOfInterest
|
||||
| SCPublicationEvent
|
||||
| SCRoom
|
||||
| SCSemester
|
||||
| SCSportCourse
|
||||
@@ -126,8 +136,10 @@ export type SCAssociatedThingWithoutReferences<THING extends SCThings> =
|
||||
THING extends SCFloor ? SCFloorWithoutReferences :
|
||||
THING extends SCMessage ? SCMessageWithoutReferences :
|
||||
THING extends SCOrganization ? SCOrganizationWithoutReferences :
|
||||
THING extends SCPeriodical ? SCPeriodicalWithoutReferences :
|
||||
THING extends SCPerson ? SCPersonWithoutReferences :
|
||||
THING extends SCPointOfInterest ? SCPointOfInterestWithoutReferences :
|
||||
THING extends SCPublicationEvent ? SCPublicationEventWithoutReferences :
|
||||
THING extends SCRoom ? SCRoomWithoutReferences :
|
||||
THING extends SCSemester ? SCSemesterWithoutReferences :
|
||||
THING extends SCSetting ? SCSettingWithoutReferences :
|
||||
@@ -157,8 +169,10 @@ export type SCAssociatedThing<THING extends SCThings> =
|
||||
THING extends SCFloorWithoutReferences ? SCFloor :
|
||||
THING extends SCMessageWithoutReferences ? SCMessage :
|
||||
THING extends SCOrganizationWithoutReferences ? SCOrganization :
|
||||
THING extends SCPeriodicalWithoutReferences ? SCPeriodical :
|
||||
THING extends SCPersonWithoutReferences ? SCPerson :
|
||||
THING extends SCPointOfInterestWithoutReferences ? SCPointOfInterest :
|
||||
THING extends SCPublicationEventWithoutReferences ? SCPublicationEvent :
|
||||
THING extends SCRoomWithoutReferences ? SCRoom :
|
||||
THING extends SCSemesterWithoutReferences ? SCSemester :
|
||||
THING extends SCSettingWithoutReferences ? SCSetting :
|
||||
|
||||
@@ -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
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -16,11 +16,11 @@ import {SCLanguageCode, SCMetaTranslations, SCTranslations} from '../../general/
|
||||
import {SCISO8601Date} from '../../general/time';
|
||||
import {SCOrganizationWithoutReferences} from '../organization';
|
||||
import {SCPersonWithoutReferences} from '../person';
|
||||
import {SCPublicationEventWithoutReferences} from '../publication-event';
|
||||
import {SCThingMeta, SCThingTranslatableProperties, SCThingWithoutReferences} from './thing';
|
||||
import {
|
||||
SCAcademicPriceGroup,
|
||||
SCThingThatCanBeOffered,
|
||||
SCThingThatCanBeOfferedMeta,
|
||||
SCThingThatCanBeOffered, SCThingThatCanBeOfferedMeta,
|
||||
SCThingThatCanBeOfferedTranslatableProperties,
|
||||
SCThingThatCanBeOfferedWithoutReferences,
|
||||
} from './thing-that-can-be-offered';
|
||||
@@ -38,11 +38,23 @@ export interface SCCreativeWorkWithoutReferences
|
||||
|
||||
/**
|
||||
* Date the creative work was published
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
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
|
||||
*
|
||||
@@ -75,11 +87,26 @@ export interface SCCreativeWork
|
||||
*/
|
||||
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
|
||||
*/
|
||||
publishers?: Array<SCPersonWithoutReferences | SCOrganizationWithoutReferences>;
|
||||
|
||||
/**
|
||||
* A text representing on organization on whose behalf the creator was working
|
||||
*/
|
||||
sourceOrganization?: string;
|
||||
|
||||
/**
|
||||
* Translated fields of the creative work
|
||||
*/
|
||||
@@ -111,22 +138,36 @@ export class SCCreativeWorkMeta
|
||||
de: {
|
||||
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.de,
|
||||
...SCThingThatCanBeOfferedMeta.getInstance().fieldTranslations.de,
|
||||
authors: 'Autoren',
|
||||
name: 'Titel',
|
||||
authors: 'beteiligte Personen',
|
||||
availableLanguages: 'verfügbare Übersetzungen',
|
||||
datePublished: 'Veröffentlichungsdatum',
|
||||
edition: 'Ausgabe',
|
||||
firstPublished: 'erste Veröffentlichung',
|
||||
inLanguage: 'Inhaltssprache',
|
||||
isPartOf: 'erschienen in',
|
||||
keywords: 'Schlagwörter',
|
||||
lastPublished: 'aktuellste Veröffentlichung',
|
||||
publishers: 'Verleger',
|
||||
publications: 'Veröffentlichungen',
|
||||
sourceOrganization: 'Körperschaft',
|
||||
},
|
||||
en: {
|
||||
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.en,
|
||||
...SCThingThatCanBeOfferedMeta.getInstance().fieldTranslations.en,
|
||||
authors: 'authors',
|
||||
name: 'title',
|
||||
authors: 'involved persons',
|
||||
availableLanguages: 'available languages',
|
||||
datePublished: 'release date',
|
||||
edition: 'edition',
|
||||
firstPublished: 'first published',
|
||||
inLanguage: 'content language',
|
||||
isPartOf: 'published in',
|
||||
keywords: 'keywords',
|
||||
lastPublished: 'last published',
|
||||
publishers: 'publishers',
|
||||
publications: 'publications',
|
||||
sourceOrganization: 'corporation',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -136,7 +177,7 @@ export class SCCreativeWorkMeta
|
||||
fieldValueTranslations = {
|
||||
de: {
|
||||
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.de,
|
||||
...SCThingThatCanBeOfferedMeta.getInstance().fieldValueTranslations.en,
|
||||
...SCThingThatCanBeOfferedMeta.getInstance().fieldValueTranslations.de,
|
||||
},
|
||||
en: {
|
||||
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.en,
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {SCMetaTranslations, SCTranslations} from '../../general/i18n';
|
||||
import {SCMap} from '../../general/map';
|
||||
import {SCISO8601Date} from '../../general/time';
|
||||
import {SCUuid} from '../../general/uuid';
|
||||
import {SCOrganizationWithoutReferences} from '../organization';
|
||||
@@ -25,6 +26,7 @@ export enum SCThingType {
|
||||
AcademicEvent = 'academic event',
|
||||
Article = 'article',
|
||||
Book = 'book',
|
||||
Periodical = 'periodical',
|
||||
Building = 'building',
|
||||
Catalog = 'catalog',
|
||||
ContactPoint = 'contact point',
|
||||
@@ -38,6 +40,7 @@ export enum SCThingType {
|
||||
Organization = 'organization',
|
||||
Person = 'person',
|
||||
PointOfInterest = 'point of interest',
|
||||
PublicationEvent = 'publication event',
|
||||
Room = 'room',
|
||||
Semester = 'semester',
|
||||
Setting = 'setting',
|
||||
@@ -60,6 +63,7 @@ export interface SCThingWithoutReferences {
|
||||
* @keyword
|
||||
*/
|
||||
alternateNames?: string[];
|
||||
|
||||
/**
|
||||
* Description of the thing
|
||||
*
|
||||
@@ -67,12 +71,21 @@ export interface SCThingWithoutReferences {
|
||||
* @text
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @keyword
|
||||
*/
|
||||
image?: string;
|
||||
|
||||
/**
|
||||
* Name of the thing
|
||||
*
|
||||
@@ -82,12 +95,21 @@ export interface SCThingWithoutReferences {
|
||||
* @text
|
||||
*/
|
||||
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
|
||||
*
|
||||
* Take precedence over "main" value for selected languages.
|
||||
*/
|
||||
translations?: SCTranslations<SCThingTranslatableProperties>;
|
||||
|
||||
/**
|
||||
* Type of the thing
|
||||
*
|
||||
@@ -96,16 +118,11 @@ export interface SCThingWithoutReferences {
|
||||
* @aggregatable global
|
||||
*/
|
||||
type: SCThingType;
|
||||
|
||||
/**
|
||||
* Universally unique identifier of the thing
|
||||
*/
|
||||
uid: SCUuid;
|
||||
/**
|
||||
* URL of the thing
|
||||
*
|
||||
* @filterable
|
||||
*/
|
||||
url?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -252,7 +269,7 @@ export interface SCThingTranslatablePropertyOrigin {
|
||||
*/
|
||||
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>();
|
||||
|
||||
@@ -263,24 +280,26 @@ export class SCThingMeta implements SCMetaTranslations<SCThing> {
|
||||
de: {
|
||||
alternateNames: 'alternative Namen',
|
||||
description: 'Beschreibung',
|
||||
identifiers: 'Alternative Identifikation',
|
||||
image: 'Bild',
|
||||
name: 'Name',
|
||||
origin: 'Ursprung',
|
||||
sameAs: 'ursprünglicher Link',
|
||||
translations: 'Übersetzungen',
|
||||
type: 'Typ',
|
||||
uid: 'Identifikation',
|
||||
url: 'URL',
|
||||
},
|
||||
en: {
|
||||
alternateNames: 'alternate names',
|
||||
description: 'description',
|
||||
identifiers: 'alternative identification',
|
||||
image: 'image',
|
||||
name: 'name',
|
||||
origin: 'origin',
|
||||
sameAs: 'original link',
|
||||
translations: 'translations',
|
||||
type: 'type',
|
||||
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
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -21,12 +21,19 @@ import {
|
||||
} from './abstract/creative-work';
|
||||
import {SCThingMeta, SCThingType} from './abstract/thing';
|
||||
import {
|
||||
SCThingWithCategories,
|
||||
SCThingWithCategoriesSpecificValues,
|
||||
SCThingWithCategoriesTranslatableProperties,
|
||||
SCThingWithCategoriesWithoutReferences,
|
||||
SCThingWithCategoriesWithoutReferencesMeta,
|
||||
} from './abstract/thing-with-categories';
|
||||
import {SCPeriodicalWithoutReferences} from './periodical';
|
||||
|
||||
/**
|
||||
* Categories of an article
|
||||
*/
|
||||
export type SCArticleCategories = 'unipedia'
|
||||
| 'article'
|
||||
| 'eArticle';
|
||||
|
||||
/**
|
||||
* An article without references
|
||||
@@ -39,7 +46,12 @@ export interface SCArticleWithoutReferences
|
||||
*
|
||||
* @text
|
||||
*/
|
||||
articleBody: string;
|
||||
articleBody?: string;
|
||||
|
||||
/**
|
||||
* Categories of an article
|
||||
*/
|
||||
categories: SCArticleCategories[];
|
||||
|
||||
/**
|
||||
* Translated fields of an article
|
||||
@@ -59,8 +71,16 @@ export interface SCArticleWithoutReferences
|
||||
* @indexable
|
||||
*/
|
||||
export interface SCArticle
|
||||
extends SCCreativeWork, SCArticleWithoutReferences,
|
||||
SCThingWithCategories<SCArticleCategories, SCThingWithCategoriesSpecificValues> {
|
||||
extends SCCreativeWork, SCArticleWithoutReferences {
|
||||
/**
|
||||
* 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
|
||||
*/
|
||||
@@ -73,12 +93,7 @@ export interface SCArticle
|
||||
}
|
||||
|
||||
/**
|
||||
* Categories of articles
|
||||
*/
|
||||
export type SCArticleCategories = 'unipedia';
|
||||
|
||||
/**
|
||||
* Translatable properties of creative works
|
||||
* Translatable properties of an article
|
||||
*/
|
||||
export interface SCArticleTranslatableProperties
|
||||
extends SCThingWithCategoriesTranslatableProperties, SCCreativeWorkTranslatableProperties {
|
||||
@@ -104,6 +119,8 @@ export class SCArticleMeta
|
||||
.de,
|
||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||
categories: 'Format',
|
||||
reference: 'Referenz',
|
||||
articleBody: 'Artikelinhalt',
|
||||
},
|
||||
en: {
|
||||
@@ -111,6 +128,8 @@ export class SCArticleMeta
|
||||
.en,
|
||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||
categories: 'format',
|
||||
reference: 'reference',
|
||||
articleBody: 'article body',
|
||||
},
|
||||
};
|
||||
@@ -122,19 +141,22 @@ export class SCArticleMeta
|
||||
de: {
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||
.fieldValueTranslations.de,
|
||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||
categories: {
|
||||
'unipedia': 'Unipedia',
|
||||
article: 'Artikel',
|
||||
eArticle: 'E-Aufsatz',
|
||||
unipedia: 'Unipedia',
|
||||
},
|
||||
type: 'Artikel',
|
||||
},
|
||||
en: {
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||
.fieldValueTranslations.en,
|
||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||
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
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -20,29 +20,52 @@ import {
|
||||
SCCreativeWorkWithoutReferences,
|
||||
} from './abstract/creative-work';
|
||||
import {SCThingMeta, SCThingType} from './abstract/thing';
|
||||
import {SCThingWithCategoriesTranslatableProperties} from './abstract/thing-with-categories';
|
||||
import {SCPersonWithoutReferences} from './person';
|
||||
import {
|
||||
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
|
||||
*/
|
||||
export interface SCBookWithoutReferences
|
||||
extends SCCreativeWorkWithoutReferences {
|
||||
extends SCCreativeWorkWithoutReferences,
|
||||
SCThingWithCategoriesWithoutReferences<SCBookCategories, SCThingWithCategoriesSpecificValues> {
|
||||
/**
|
||||
* Edition of a book
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
* Categories of a book
|
||||
*/
|
||||
bookEdition?: string;
|
||||
categories: SCBookCategories[];
|
||||
|
||||
/**
|
||||
* ISBN of a book
|
||||
* ISBNs of a book
|
||||
*
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
isbn?: string;
|
||||
ISBNs?: string[];
|
||||
|
||||
/**
|
||||
* Number of pages of a book
|
||||
@@ -70,11 +93,6 @@ export interface SCBookWithoutReferences
|
||||
*/
|
||||
export interface SCBook
|
||||
extends SCCreativeWork, SCBookWithoutReferences {
|
||||
/**
|
||||
* Authors of the creative work
|
||||
*/
|
||||
authors: SCPersonWithoutReferences[];
|
||||
|
||||
/**
|
||||
* Translated properties of a book
|
||||
*/
|
||||
@@ -91,12 +109,6 @@ export interface SCBook
|
||||
*/
|
||||
export interface SCBookTranslatableFields
|
||||
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 = {
|
||||
de: {
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
||||
.de,
|
||||
bookEdition: 'Buchausgabe',
|
||||
isbn: 'ISBN',
|
||||
numberOfPages: 'Seitenzahl',
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.de,
|
||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||
categories: 'Format',
|
||||
ISBNs: 'ISBN',
|
||||
numberOfPages: 'Seitenanzahl',
|
||||
},
|
||||
en: {
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
||||
.en,
|
||||
bookEdition: 'book edition',
|
||||
isbn: 'ISBN',
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.en,
|
||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||
categories: 'format',
|
||||
ISBNs: 'ISBN',
|
||||
numberOfPages: 'number of pages',
|
||||
},
|
||||
};
|
||||
@@ -130,12 +144,56 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
|
||||
de: {
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||
.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',
|
||||
},
|
||||
en: {
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||
.fieldValueTranslations.en,
|
||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||
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';
|
||||
import {SCThingMeta, SCThingType} from './abstract/thing';
|
||||
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 {SCOrganizationWithoutReferences} from './organization';
|
||||
|
||||
/**
|
||||
* Categories of a message
|
||||
*/
|
||||
export type SCMessageCategories = 'news';
|
||||
|
||||
/**
|
||||
* A message without references
|
||||
*/
|
||||
export interface SCMessageWithoutReferences
|
||||
extends SCCreativeWorkWithoutReferences {
|
||||
extends SCCreativeWorkWithoutReferences,
|
||||
SCThingWithCategoriesWithoutReferences<SCMessageCategories, SCThingWithCategoriesSpecificValues> {
|
||||
/**
|
||||
* Organizational unit for which the message is intended
|
||||
*/
|
||||
@@ -42,6 +52,11 @@ export interface SCMessageWithoutReferences
|
||||
*/
|
||||
audiences: SCUserGroup[];
|
||||
|
||||
/**
|
||||
* Categories of a message
|
||||
*/
|
||||
categories: SCMessageCategories[];
|
||||
|
||||
/**
|
||||
* When the message was created
|
||||
*
|
||||
@@ -117,6 +132,8 @@ export class SCMessageMeta
|
||||
de: {
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
||||
.de,
|
||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCMessageCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||
audienceOrganizations: 'Zielgruppenorganisationen',
|
||||
audiences: 'Zielgruppen',
|
||||
dateCreated: 'Erstellungsdatum',
|
||||
@@ -126,6 +143,8 @@ export class SCMessageMeta
|
||||
en: {
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
||||
.en,
|
||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCMessageCategories,
|
||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||
audienceOrganizations: 'audience organizations',
|
||||
audiences: 'audiences',
|
||||
dateCreated: 'date created',
|
||||
@@ -142,9 +161,12 @@ export class SCMessageMeta
|
||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||
.fieldValueTranslations.de,
|
||||
audiences: {
|
||||
'employees': 'Angestellte',
|
||||
'guests': 'Gäste',
|
||||
'students': 'Studenten',
|
||||
employees: 'Angestellte',
|
||||
guests: 'Gäste',
|
||||
students: 'Studenten',
|
||||
},
|
||||
categories: {
|
||||
news: 'Neuigkeiten',
|
||||
},
|
||||
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
|
||||
* @keyword
|
||||
*/
|
||||
familyName: string;
|
||||
familyName?: string;
|
||||
|
||||
/**
|
||||
* The private fax number of the person.
|
||||
@@ -80,7 +80,7 @@ export interface SCPersonWithoutReferences
|
||||
* @filterable
|
||||
* @keyword
|
||||
*/
|
||||
givenName: string;
|
||||
givenName?: string;
|
||||
|
||||
/**
|
||||
* 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": [
|
||||
"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",
|
||||
"keywords": [
|
||||
"Abkürzungen",
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"categories": [
|
||||
"unipedia"
|
||||
],
|
||||
"url": "https://www.mydesk.tu-berlin.de/wiki/ag_ziethen",
|
||||
"sameAs": "https://www.mydesk.tu-berlin.de/wiki/ag_ziethen",
|
||||
"name": "AG Ziethen",
|
||||
"keywords": [
|
||||
"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",
|
||||
"bookEdition": "2., überarb. u. erw. Aufl.",
|
||||
"isbn": "3936608776",
|
||||
"edition": "2., überarb. u. erw. Aufl.",
|
||||
"ISBNs": [
|
||||
"3936608776"
|
||||
],
|
||||
"numberOfPages": 537,
|
||||
"categories": [
|
||||
"book"
|
||||
],
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
"name": "Dummy",
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
"type": "book",
|
||||
"uid": "db47f7f4-7699-5a37-afcc-24beaa998d36",
|
||||
"name": "Minimal Book",
|
||||
"categories": [
|
||||
"ebook"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"type": "person",
|
||||
@@ -14,7 +17,9 @@
|
||||
}
|
||||
],
|
||||
"datePublished": "2007-08-01",
|
||||
"isbn": "3936608776",
|
||||
"ISBNs": [
|
||||
"3936608776"
|
||||
],
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
"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": [
|
||||
"students"
|
||||
],
|
||||
"categories": [
|
||||
"news"
|
||||
],
|
||||
"sequenceIndex": 1010,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
"audiences": [
|
||||
"students"
|
||||
],
|
||||
"categories": [
|
||||
"news"
|
||||
],
|
||||
"sequenceIndex": 1020,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
"audiences": [
|
||||
"students"
|
||||
],
|
||||
"categories": [
|
||||
"news"
|
||||
],
|
||||
"sequenceIndex": 1001,
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
|
||||
@@ -11,6 +11,9 @@
|
||||
"audiences": [
|
||||
"students"
|
||||
],
|
||||
"categories": [
|
||||
"news"
|
||||
],
|
||||
"sequenceIndex": 1004,
|
||||
"origin": {
|
||||
"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": {
|
||||
"type": "video",
|
||||
"uid": "e274cc82-f51c-566b-b8da-85763ff375e8",
|
||||
"url": "https://vimeo.com/1084537",
|
||||
"sameAs": "https://vimeo.com/1084537",
|
||||
"name": "Big Buck Bunny",
|
||||
"origin": {
|
||||
"indexed": "2018-09-11T12:30:00Z",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"instance": {
|
||||
"type": "video",
|
||||
"uid": "2def52c8-f901-5b30-96fc-ba570a038508",
|
||||
"url": "https://vimeo.com/1084537",
|
||||
"sameAs": "https://vimeo.com/1084537",
|
||||
"name": "Big Buck Bunny",
|
||||
"sources": [
|
||||
{
|
||||
|
||||
@@ -39,6 +39,8 @@ import {SCTicket, SCTicketWithoutReferences} from '../src/things/ticket';
|
||||
import {SCToDo, SCToDoWithoutReferences} from '../src/things/todo';
|
||||
import {SCTour, SCTourWithoutReferences} from '../src/things/tour';
|
||||
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:completed-docs
|
||||
@@ -226,6 +228,17 @@ assert<Has<SCOrganizationPropertyTypes, SCThing>>(false);
|
||||
assert<Extends<SCOrganizationWithoutReferences, SCThing>>(false);
|
||||
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
|
||||
*/
|
||||
@@ -248,6 +261,17 @@ assert<Has<SCPointOfInterestPropertyTypes, SCThing>>(false);
|
||||
assert<Extends<SCPointOfInterestWithoutReferences, SCThing>>(false);
|
||||
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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user