mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-21 17:12:43 +00:00
refactor: untangle SCCreativeWork inheritance
This commit is contained in:
@@ -17,19 +17,13 @@ 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 {SCPublicationEventWithoutReferences} from '../publication-event';
|
||||||
import {SCThingMeta, SCThingTranslatableProperties, SCThingWithoutReferences} from './thing';
|
import {SCThing, SCThingMeta, SCThingTranslatableProperties, SCThingWithoutReferences} from './thing';
|
||||||
import {
|
|
||||||
SCAcademicPriceGroup,
|
|
||||||
SCThingThatCanBeOffered, SCThingThatCanBeOfferedMeta,
|
|
||||||
SCThingThatCanBeOfferedTranslatableProperties,
|
|
||||||
SCThingThatCanBeOfferedWithoutReferences,
|
|
||||||
} from './thing-that-can-be-offered';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A creative work without references
|
* A creative work without references
|
||||||
*/
|
*/
|
||||||
export interface SCCreativeWorkWithoutReferences
|
export interface SCCreativeWorkWithoutReferences
|
||||||
extends SCThingWithoutReferences, SCThingThatCanBeOfferedWithoutReferences {
|
extends SCThingWithoutReferences {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Languages this creative work is available in
|
* Languages this creative work is available in
|
||||||
@@ -88,7 +82,7 @@ export interface SCCreativeWorkWithoutReferences
|
|||||||
* A creative work
|
* A creative work
|
||||||
*/
|
*/
|
||||||
export interface SCCreativeWork
|
export interface SCCreativeWork
|
||||||
extends SCCreativeWorkWithoutReferences, SCThingThatCanBeOffered<SCAcademicPriceGroup> {
|
extends SCCreativeWorkWithoutReferences, SCThing {
|
||||||
/**
|
/**
|
||||||
* Authors of the creative work
|
* Authors of the creative work
|
||||||
*/
|
*/
|
||||||
@@ -124,7 +118,7 @@ export interface SCCreativeWork
|
|||||||
* Translatable properties of creative works
|
* Translatable properties of creative works
|
||||||
*/
|
*/
|
||||||
export interface SCCreativeWorkTranslatableProperties
|
export interface SCCreativeWorkTranslatableProperties
|
||||||
extends SCThingTranslatableProperties, SCThingThatCanBeOfferedTranslatableProperties {
|
extends SCThingTranslatableProperties {
|
||||||
/**
|
/**
|
||||||
* Translation of the keywords of the creative work
|
* Translation of the keywords of the creative work
|
||||||
*
|
*
|
||||||
@@ -144,7 +138,6 @@ export class SCCreativeWorkMeta
|
|||||||
fieldTranslations = {
|
fieldTranslations = {
|
||||||
de: {
|
de: {
|
||||||
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.de,
|
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.de,
|
||||||
...SCThingThatCanBeOfferedMeta.getInstance().fieldTranslations.de,
|
|
||||||
name: 'Titel',
|
name: 'Titel',
|
||||||
authors: 'beteiligte Personen',
|
authors: 'beteiligte Personen',
|
||||||
availableLanguages: 'verfügbare Übersetzungen',
|
availableLanguages: 'verfügbare Übersetzungen',
|
||||||
@@ -161,7 +154,6 @@ export class SCCreativeWorkMeta
|
|||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.en,
|
...SCThingMeta.getInstance<SCThingMeta>().fieldTranslations.en,
|
||||||
...SCThingThatCanBeOfferedMeta.getInstance().fieldTranslations.en,
|
|
||||||
name: 'title',
|
name: 'title',
|
||||||
authors: 'involved persons',
|
authors: 'involved persons',
|
||||||
availableLanguages: 'available languages',
|
availableLanguages: 'available languages',
|
||||||
@@ -184,11 +176,9 @@ export class SCCreativeWorkMeta
|
|||||||
fieldValueTranslations = {
|
fieldValueTranslations = {
|
||||||
de: {
|
de: {
|
||||||
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.de,
|
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.de,
|
||||||
...SCThingThatCanBeOfferedMeta.getInstance().fieldValueTranslations.de,
|
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.en,
|
...SCThingMeta.getInstance<SCThingMeta>().fieldValueTranslations.en,
|
||||||
...SCThingThatCanBeOfferedMeta.getInstance().fieldValueTranslations.en,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import {
|
|||||||
SCCreativeWorkWithoutReferences,
|
SCCreativeWorkWithoutReferences,
|
||||||
} from './abstract/creative-work';
|
} from './abstract/creative-work';
|
||||||
import {SCThingMeta, SCThingType} from './abstract/thing';
|
import {SCThingMeta, SCThingType} from './abstract/thing';
|
||||||
|
import {SCAcademicPriceGroup, SCThingThatCanBeOffered, SCThingThatCanBeOfferedMeta, SCThingThatCanBeOfferedTranslatableProperties, SCThingThatCanBeOfferedWithoutReferences} from './abstract/thing-that-can-be-offered';
|
||||||
import {
|
import {
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
SCThingWithCategoriesTranslatableProperties,
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
@@ -40,6 +41,7 @@ export type SCArticleCategories = 'unipedia'
|
|||||||
*/
|
*/
|
||||||
export interface SCArticleWithoutReferences
|
export interface SCArticleWithoutReferences
|
||||||
extends SCCreativeWorkWithoutReferences,
|
extends SCCreativeWorkWithoutReferences,
|
||||||
|
SCThingThatCanBeOfferedWithoutReferences,
|
||||||
SCThingWithCategoriesWithoutReferences<SCArticleCategories, SCThingWithCategoriesSpecificValues> {
|
SCThingWithCategoriesWithoutReferences<SCArticleCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Article itself as markdown
|
* Article itself as markdown
|
||||||
@@ -71,7 +73,9 @@ export interface SCArticleWithoutReferences
|
|||||||
* @indexable
|
* @indexable
|
||||||
*/
|
*/
|
||||||
export interface SCArticle
|
export interface SCArticle
|
||||||
extends SCCreativeWork, SCArticleWithoutReferences {
|
extends SCCreativeWork,
|
||||||
|
SCThingThatCanBeOffered<SCAcademicPriceGroup>,
|
||||||
|
SCArticleWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* A periodical to which this article belongs
|
* A periodical to which this article belongs
|
||||||
*/
|
*/
|
||||||
@@ -96,7 +100,9 @@ export interface SCArticle
|
|||||||
* Translatable properties of an article
|
* Translatable properties of an article
|
||||||
*/
|
*/
|
||||||
export interface SCArticleTranslatableProperties
|
export interface SCArticleTranslatableProperties
|
||||||
extends SCThingWithCategoriesTranslatableProperties, SCCreativeWorkTranslatableProperties {
|
extends SCThingWithCategoriesTranslatableProperties,
|
||||||
|
SCThingThatCanBeOfferedTranslatableProperties,
|
||||||
|
SCCreativeWorkTranslatableProperties {
|
||||||
/**
|
/**
|
||||||
* Translation of the article itself as markdown
|
* Translation of the article itself as markdown
|
||||||
*
|
*
|
||||||
@@ -119,6 +125,7 @@ export class SCArticleMeta
|
|||||||
.de,
|
.de,
|
||||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>().fieldTranslations.de,
|
||||||
categories: 'Format',
|
categories: 'Format',
|
||||||
reference: 'Referenz',
|
reference: 'Referenz',
|
||||||
articleBody: 'Artikelinhalt',
|
articleBody: 'Artikelinhalt',
|
||||||
@@ -128,6 +135,7 @@ export class SCArticleMeta
|
|||||||
.en,
|
.en,
|
||||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCArticleCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>().fieldTranslations.en,
|
||||||
categories: 'format',
|
categories: 'format',
|
||||||
reference: 'reference',
|
reference: 'reference',
|
||||||
articleBody: 'article body',
|
articleBody: 'article body',
|
||||||
@@ -141,6 +149,8 @@ export class SCArticleMeta
|
|||||||
de: {
|
de: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
.fieldValueTranslations.de,
|
.fieldValueTranslations.de,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>()
|
||||||
|
.fieldValueTranslations.de,
|
||||||
categories: {
|
categories: {
|
||||||
article: 'Artikel',
|
article: 'Artikel',
|
||||||
eArticle: 'E-Aufsatz',
|
eArticle: 'E-Aufsatz',
|
||||||
@@ -151,6 +161,8 @@ export class SCArticleMeta
|
|||||||
en: {
|
en: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
.fieldValueTranslations.en,
|
.fieldValueTranslations.en,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>()
|
||||||
|
.fieldValueTranslations.en,
|
||||||
type: SCThingType.Article,
|
type: SCThingType.Article,
|
||||||
categories: {
|
categories: {
|
||||||
article: 'article',
|
article: 'article',
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import {
|
|||||||
SCCreativeWorkWithoutReferences,
|
SCCreativeWorkWithoutReferences,
|
||||||
} from './abstract/creative-work';
|
} from './abstract/creative-work';
|
||||||
import {SCThingMeta, SCThingType} from './abstract/thing';
|
import {SCThingMeta, SCThingType} from './abstract/thing';
|
||||||
|
import {SCAcademicPriceGroup, SCThingThatCanBeOffered, SCThingThatCanBeOfferedMeta, SCThingThatCanBeOfferedTranslatableProperties, SCThingThatCanBeOfferedWithoutReferences} from './abstract/thing-that-can-be-offered';
|
||||||
import {
|
import {
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
SCThingWithCategoriesTranslatableProperties,
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
@@ -54,6 +55,7 @@ export type SCBookCategories = 'audio'
|
|||||||
*/
|
*/
|
||||||
export interface SCBookWithoutReferences
|
export interface SCBookWithoutReferences
|
||||||
extends SCCreativeWorkWithoutReferences,
|
extends SCCreativeWorkWithoutReferences,
|
||||||
|
SCThingThatCanBeOfferedWithoutReferences,
|
||||||
SCThingWithCategoriesWithoutReferences<SCBookCategories, SCThingWithCategoriesSpecificValues> {
|
SCThingWithCategoriesWithoutReferences<SCBookCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Categories of a book
|
* Categories of a book
|
||||||
@@ -93,7 +95,9 @@ export interface SCBookWithoutReferences
|
|||||||
* @indexable
|
* @indexable
|
||||||
*/
|
*/
|
||||||
export interface SCBook
|
export interface SCBook
|
||||||
extends SCCreativeWork, SCBookWithoutReferences {
|
extends SCCreativeWork,
|
||||||
|
SCThingThatCanBeOffered<SCAcademicPriceGroup>,
|
||||||
|
SCBookWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Translated properties of a book
|
* Translated properties of a book
|
||||||
*/
|
*/
|
||||||
@@ -109,7 +113,9 @@ export interface SCBook
|
|||||||
* Translatable properties of a book
|
* Translatable properties of a book
|
||||||
*/
|
*/
|
||||||
export interface SCBookTranslatableFields
|
export interface SCBookTranslatableFields
|
||||||
extends SCThingWithCategoriesTranslatableProperties, SCCreativeWorkTranslatableProperties {
|
extends SCThingWithCategoriesTranslatableProperties,
|
||||||
|
SCThingThatCanBeOfferedTranslatableProperties,
|
||||||
|
SCCreativeWorkTranslatableProperties {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -124,6 +130,7 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
|
|||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.de,
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.de,
|
||||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>().fieldTranslations.de,
|
||||||
categories: 'Format',
|
categories: 'Format',
|
||||||
ISBNs: 'ISBN',
|
ISBNs: 'ISBN',
|
||||||
numberOfPages: 'Seitenanzahl',
|
numberOfPages: 'Seitenanzahl',
|
||||||
@@ -132,6 +139,7 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
|
|||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.en,
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.en,
|
||||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>().fieldTranslations.en,
|
||||||
categories: 'format',
|
categories: 'format',
|
||||||
ISBNs: 'ISBN',
|
ISBNs: 'ISBN',
|
||||||
numberOfPages: 'number of pages',
|
numberOfPages: 'number of pages',
|
||||||
@@ -147,6 +155,8 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
|
|||||||
.fieldValueTranslations.de,
|
.fieldValueTranslations.de,
|
||||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.de,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>()
|
||||||
|
.fieldValueTranslations.de,
|
||||||
categories: {
|
categories: {
|
||||||
audio: 'Tonträger',
|
audio: 'Tonträger',
|
||||||
book: 'Buch',
|
book: 'Buch',
|
||||||
@@ -174,6 +184,8 @@ export class SCBookMeta extends SCThingMeta implements SCMetaTranslations<SCBook
|
|||||||
.fieldValueTranslations.en,
|
.fieldValueTranslations.en,
|
||||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCBookCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldValueTranslations.en,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>()
|
||||||
|
.fieldValueTranslations.en,
|
||||||
type: SCThingType.Book,
|
type: SCThingType.Book,
|
||||||
categories: {
|
categories: {
|
||||||
audio: 'audio material',
|
audio: 'audio material',
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import {
|
|||||||
SCCreativeWorkWithoutReferences,
|
SCCreativeWorkWithoutReferences,
|
||||||
} from './abstract/creative-work';
|
} from './abstract/creative-work';
|
||||||
import {SCThingMeta, SCThingType} from './abstract/thing';
|
import {SCThingMeta, SCThingType} from './abstract/thing';
|
||||||
|
import {SCAcademicPriceGroup, SCThingThatCanBeOffered, SCThingThatCanBeOfferedMeta, SCThingThatCanBeOfferedTranslatableProperties, SCThingThatCanBeOfferedWithoutReferences} from './abstract/thing-that-can-be-offered';
|
||||||
import {
|
import {
|
||||||
SCThingWithCategoriesSpecificValues,
|
SCThingWithCategoriesSpecificValues,
|
||||||
SCThingWithCategoriesTranslatableProperties,
|
SCThingWithCategoriesTranslatableProperties,
|
||||||
@@ -37,6 +38,7 @@ export type SCPeriodicalCategories = 'journal' | 'electronic';
|
|||||||
*/
|
*/
|
||||||
export interface SCPeriodicalWithoutReferences
|
export interface SCPeriodicalWithoutReferences
|
||||||
extends SCCreativeWorkWithoutReferences,
|
extends SCCreativeWorkWithoutReferences,
|
||||||
|
SCThingThatCanBeOfferedWithoutReferences,
|
||||||
SCThingWithCategoriesWithoutReferences<SCPeriodicalCategories, SCThingWithCategoriesSpecificValues> {
|
SCThingWithCategoriesWithoutReferences<SCPeriodicalCategories, SCThingWithCategoriesSpecificValues> {
|
||||||
/**
|
/**
|
||||||
* Categories of a periodical
|
* Categories of a periodical
|
||||||
@@ -68,7 +70,9 @@ export interface SCPeriodicalWithoutReferences
|
|||||||
* @indexable
|
* @indexable
|
||||||
*/
|
*/
|
||||||
export interface SCPeriodical
|
export interface SCPeriodical
|
||||||
extends SCCreativeWork, SCPeriodicalWithoutReferences {
|
extends SCCreativeWork,
|
||||||
|
SCThingThatCanBeOffered<SCAcademicPriceGroup>,
|
||||||
|
SCPeriodicalWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Translated properties of a periodical
|
* Translated properties of a periodical
|
||||||
*/
|
*/
|
||||||
@@ -84,7 +88,9 @@ export interface SCPeriodical
|
|||||||
* Translatable properties of a periodical
|
* Translatable properties of a periodical
|
||||||
*/
|
*/
|
||||||
export interface SCPeriodicalTranslatableFields
|
export interface SCPeriodicalTranslatableFields
|
||||||
extends SCThingWithCategoriesTranslatableProperties, SCCreativeWorkTranslatableProperties {
|
extends SCThingWithCategoriesTranslatableProperties,
|
||||||
|
SCThingThatCanBeOfferedTranslatableProperties,
|
||||||
|
SCCreativeWorkTranslatableProperties {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -99,6 +105,7 @@ export class SCPeriodicalMeta extends SCThingMeta implements SCMetaTranslations<
|
|||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.de,
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.de,
|
||||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPeriodicalCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPeriodicalCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.de,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>().fieldTranslations.de,
|
||||||
categories: 'Format',
|
categories: 'Format',
|
||||||
ISSNs: 'ISSN',
|
ISSNs: 'ISSN',
|
||||||
},
|
},
|
||||||
@@ -106,6 +113,7 @@ export class SCPeriodicalMeta extends SCThingMeta implements SCMetaTranslations<
|
|||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.en,
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations.en,
|
||||||
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPeriodicalCategories,
|
...SCThingWithCategoriesWithoutReferencesMeta.getInstance<SCPeriodicalCategories,
|
||||||
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
SCThingWithCategoriesSpecificValues>().fieldTranslations.en,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>().fieldTranslations.en,
|
||||||
categories: 'format',
|
categories: 'format',
|
||||||
ISSNs: 'ISSN',
|
ISSNs: 'ISSN',
|
||||||
},
|
},
|
||||||
@@ -118,6 +126,8 @@ export class SCPeriodicalMeta extends SCThingMeta implements SCMetaTranslations<
|
|||||||
de: {
|
de: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
.fieldValueTranslations.de,
|
.fieldValueTranslations.de,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>()
|
||||||
|
.fieldValueTranslations.de,
|
||||||
type: 'Periodikum',
|
type: 'Periodikum',
|
||||||
categories: {
|
categories: {
|
||||||
electronic: 'E-Journal',
|
electronic: 'E-Journal',
|
||||||
@@ -127,6 +137,8 @@ export class SCPeriodicalMeta extends SCThingMeta implements SCMetaTranslations<
|
|||||||
en: {
|
en: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
.fieldValueTranslations.en,
|
.fieldValueTranslations.en,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>()
|
||||||
|
.fieldValueTranslations.en,
|
||||||
type: 'periodical',
|
type: 'periodical',
|
||||||
categories: {
|
categories: {
|
||||||
electronic: 'E-Journal',
|
electronic: 'E-Journal',
|
||||||
|
|||||||
@@ -12,17 +12,19 @@
|
|||||||
* You should have received a copy of the GNU General Public License along with
|
* You should have received a copy of the GNU General Public License along with
|
||||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
import {SCLanguage, SCMetaTranslations} from '../general/i18n';
|
import {SCLanguage, SCMetaTranslations, SCTranslations} from '../general/i18n';
|
||||||
import {SCISO8601Duration} from '../general/time';
|
import {SCISO8601Duration} from '../general/time';
|
||||||
import {SCCreativeWork, SCCreativeWorkMeta, SCCreativeWorkWithoutReferences} from './abstract/creative-work';
|
import {SCCreativeWork, SCCreativeWorkMeta, SCCreativeWorkTranslatableProperties, SCCreativeWorkWithoutReferences} from './abstract/creative-work';
|
||||||
import {SCThingMeta, SCThingType} from './abstract/thing';
|
import {SCThingMeta, SCThingType} from './abstract/thing';
|
||||||
|
import {SCAcademicPriceGroup, SCThingThatCanBeOffered, SCThingThatCanBeOfferedMeta, SCThingThatCanBeOfferedTranslatableProperties, SCThingThatCanBeOfferedWithoutReferences} from './abstract/thing-that-can-be-offered';
|
||||||
import {SCPersonWithoutReferences} from './person';
|
import {SCPersonWithoutReferences} from './person';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A video without references
|
* A video without references
|
||||||
*/
|
*/
|
||||||
export interface SCVideoWithoutReferences
|
export interface SCVideoWithoutReferences
|
||||||
extends SCCreativeWorkWithoutReferences {
|
extends SCCreativeWorkWithoutReferences,
|
||||||
|
SCThingThatCanBeOfferedWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* The Duration of the Video
|
* The Duration of the Video
|
||||||
*/
|
*/
|
||||||
@@ -52,6 +54,11 @@ export interface SCVideoWithoutReferences
|
|||||||
*/
|
*/
|
||||||
transcript?: string;
|
transcript?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translated fields of a video
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCVideoTranslatableFields>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of an Video
|
* Type of an Video
|
||||||
*/
|
*/
|
||||||
@@ -123,18 +130,34 @@ export interface SCVideoTrack {
|
|||||||
* @indexable
|
* @indexable
|
||||||
*/
|
*/
|
||||||
export interface SCVideo
|
export interface SCVideo
|
||||||
extends SCCreativeWork, SCVideoWithoutReferences {
|
extends SCCreativeWork,
|
||||||
|
SCThingThatCanBeOffered<SCAcademicPriceGroup>,
|
||||||
|
SCVideoWithoutReferences {
|
||||||
/**
|
/**
|
||||||
* Persons acting in the Video
|
* Persons acting in the Video
|
||||||
*/
|
*/
|
||||||
actors?: SCPersonWithoutReferences[];
|
actors?: SCPersonWithoutReferences[];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translated fields of a video
|
||||||
|
*/
|
||||||
|
translations?: SCTranslations<SCVideoTranslatableFields>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Type of a video
|
* Type of a video
|
||||||
*/
|
*/
|
||||||
type: SCThingType.Video;
|
type: SCThingType.Video;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translatable properties of a video
|
||||||
|
*/
|
||||||
|
export interface SCVideoTranslatableFields
|
||||||
|
extends SCCreativeWorkTranslatableProperties,
|
||||||
|
SCThingThatCanBeOfferedTranslatableProperties {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Meta information about a video
|
* Meta information about a video
|
||||||
*/
|
*/
|
||||||
@@ -148,6 +171,7 @@ export class SCVideoMeta
|
|||||||
de: {
|
de: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
||||||
.de,
|
.de,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>().fieldTranslations.de,
|
||||||
actors: 'Darsteller',
|
actors: 'Darsteller',
|
||||||
duration: 'Dauer',
|
duration: 'Dauer',
|
||||||
sources: 'Quellen',
|
sources: 'Quellen',
|
||||||
@@ -158,6 +182,7 @@ export class SCVideoMeta
|
|||||||
en: {
|
en: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>().fieldTranslations
|
||||||
.en,
|
.en,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>().fieldTranslations.en,
|
||||||
actors: 'actors',
|
actors: 'actors',
|
||||||
duration: 'duration',
|
duration: 'duration',
|
||||||
sources: 'sources',
|
sources: 'sources',
|
||||||
@@ -174,11 +199,15 @@ export class SCVideoMeta
|
|||||||
de: {
|
de: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
.fieldValueTranslations.de,
|
.fieldValueTranslations.de,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>()
|
||||||
|
.fieldValueTranslations.de,
|
||||||
type: 'Video',
|
type: 'Video',
|
||||||
},
|
},
|
||||||
en: {
|
en: {
|
||||||
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
...SCCreativeWorkMeta.getInstance<SCCreativeWorkMeta>()
|
||||||
.fieldValueTranslations.en,
|
.fieldValueTranslations.en,
|
||||||
|
...SCThingThatCanBeOfferedMeta.getInstance<SCAcademicPriceGroup>()
|
||||||
|
.fieldValueTranslations.en,
|
||||||
type: SCThingType.Video,
|
type: SCThingType.Video,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user