Commit ca72c20b authored by krlwlfrt's avatar krlwlfrt
Browse files

fix: adjust model to remove references from things without references

Fixes #69
parent da0507ee
Loading
Loading
Loading
Loading
+23 −15
Original line number Diff line number Diff line
@@ -12,14 +12,14 @@
 * 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 {SCThing} from '../Thing';
import {SCThingMeta} from '../Thing';
import {SCThing, SCThingMeta, SCThingWithoutReferences} from '../Thing';
import {SCMetaTranslations} from '../types/i18n';

/**
 * An academic degree without references
 */
export interface SCAcademicDegreeWithoutReferences extends SCThing {
export interface SCAcademicDegreeWithoutReferences
  extends SCThingWithoutReferences {
  /**
   * The achievable academic degree
   */
@@ -38,13 +38,20 @@ export interface SCAcademicDegreeWithoutReferences extends SCThing {
  academicDegreewithFieldShort: string;
}

export interface SCAcademicDegree extends SCAcademicDegreeWithoutReferences {
/**
 * An academic degree
 */
export interface SCAcademicDegree
  extends SCAcademicDegreeWithoutReferences, SCThing {
  // noop
}

/**
 * Meta information about academic degrees
 */
export class SCAcademicDegreeMeta extends SCThingMeta implements SCMetaTranslations<SCAcademicDegree> {
export class SCAcademicDegreeMeta
  extends SCThingMeta
  implements SCMetaTranslations<SCAcademicDegree> {
  /**
   * Translations of fields
   */
@@ -86,11 +93,12 @@ export class SCAcademicDegreeMeta extends SCThingMeta implements SCMetaTranslati
/**
 * Types of (german) academic degrees
 */
export type SCGermanAcademicDegree = 'bachelor' |
                                     'diploma' |
                                     'doctor' |
                                     'licentiate' |
                                     'magister' |
                                     'master' |
                                     'master pupil' |
                                     'state examination' ;
export type SCGermanAcademicDegree =
  'bachelor'
  | 'diploma'
  | 'doctor'
  | 'licentiate'
  | 'magister'
  | 'master'
  | 'master pupil'
  | 'state examination' ;
+18 −8
Original line number Diff line number Diff line
@@ -12,14 +12,15 @@
 * 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 {SCThing, SCThingMeta} from '../Thing';
import {SCThing, SCThingMeta, SCThingWithoutReferences} from '../Thing';
import {SCMetaTranslations} from '../types/i18n';
import {SCISO8601Date} from '../types/Time';

/**
 * An academic term without references
 */
export interface SCAcademicTermWithoutReferences extends SCThing {
export interface SCAcademicTermWithoutReferences
  extends SCThingWithoutReferences {
  /**
   * Short name of the academic term, using the given pattern
   */
@@ -46,10 +47,19 @@ export interface SCAcademicTermWithoutReferences extends SCThing {
  startDate: SCISO8601Date;
}

/**
 * An academic term
 */
export interface SCAcademicTerm
  extends SCAcademicTermWithoutReferences, SCThing {
  // noop
}

/**
 * Meta information about academic terms
 */
export class SCAcademicTermWithoutReferencesMeta extends SCThingMeta implements SCMetaTranslations<SCThing> {
export class SCAcademicTermWithoutReferencesMeta
  extends SCThingMeta implements SCMetaTranslations<SCThing> {
  /**
   * Translations of fields
   */
+13 −9
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
 * 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 {SCThing, SCThingMeta, SCThingTranslatableProperties} from '../Thing';
import {SCThingMeta, SCThingTranslatableProperties, SCThingWithoutReferences} from '../Thing';
import {SCOrganizationWithoutReferences} from '../things/Organization';
import {SCPersonWithoutReferences} from '../things/Person';
import {SCLanguage, SCMetaTranslations, SCTranslations} from '../types/i18n';
@@ -21,12 +21,14 @@ import {
  SCAcademicPriceGroup,
  SCThingThatCanBeOffered,
  SCThingThatCanBeOfferedTranslatableProperties,
  SCThingThatCanBeOfferedWithoutReferences,
} from './ThingThatCanBeOffered';

/**
 * A creative work without references
 */
export interface SCCreativeWorkWithoutReferences extends SCThing {
export interface SCCreativeWorkWithoutReferences
  extends SCThingWithoutReferences, SCThingThatCanBeOfferedWithoutReferences {
  /**
   * Date the creative work was published
   */
@@ -51,7 +53,8 @@ export interface SCCreativeWorkWithoutReferences extends SCThing {
/**
 * A creative work
 */
export interface SCCreativeWork extends SCCreativeWorkWithoutReferences, SCThingThatCanBeOffered<SCAcademicPriceGroup> {
export interface SCCreativeWork
  extends SCCreativeWorkWithoutReferences, SCThingThatCanBeOffered<SCAcademicPriceGroup> {
  /**
   * Authors of the creative work
   */
@@ -82,7 +85,8 @@ export interface SCCreativeWorkTranslatableProperties
/**
 * Meta information about creative works
 */
export class SCCreativeWorkMeta extends SCThingMeta implements SCMetaTranslations<SCCreativeWork> {
export class SCCreativeWorkMeta
  extends SCThingMeta implements SCMetaTranslations<SCCreativeWork> {
  /**
   * Translations of fields
   */
+12 −9
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
 * 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 {SCThing, SCThingMeta} from '../Thing';
import {SCThing, SCThingMeta, SCThingWithoutReferences} from '../Thing';
import {SCCatalogWithoutReferences} from '../things/Catalog';
import {SCPersonWithoutReferences} from '../things/Person';
import {SCSemesterWithoutReferences} from '../things/Semester';
@@ -22,7 +22,8 @@ import {SCCreativeWorkWithoutReferences} from './CreativeWork';
/**
 * An event without references
 */
export interface SCEventWithoutReferences extends SCThing {
export interface SCEventWithoutReferences
  extends SCThingWithoutReferences {
  /**
   * Maximum number of participants of the event
   *
@@ -41,7 +42,8 @@ export interface SCEventWithoutReferences extends SCThing {
/**
 * An event
 */
export interface SCEvent extends SCEventWithoutReferences {
export interface SCEvent
  extends SCEventWithoutReferences, SCThing {
  /**
   * Academic terms that an event belongs to, e.g. semester(s).
   */
@@ -73,7 +75,8 @@ export interface SCEvent extends SCEventWithoutReferences {
/**
 * Meta information about events
 */
export class SCEventMeta extends SCThingMeta implements SCMetaTranslations<SCEvent> {
export class SCEventMeta
  extends SCThingMeta implements SCMetaTranslations<SCEvent> {
  /**
   * Translations of fields
   */
+25 −9
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
 * 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 {SCThing, SCThingMeta, SCThingTranslatableProperties} from '../Thing';
import {SCThing, SCThingMeta, SCThingTranslatableProperties, SCThingWithoutReferences} from '../Thing';
import {SCGeoInformation} from '../types/GeoInformation';
import {SCMetaTranslations, SCTranslations} from '../types/i18n';
import {SCPostalAddress} from '../types/PostalAddress';
@@ -20,7 +20,8 @@ import {SCPostalAddress} from '../types/PostalAddress';
/**
 * A place without references
 */
export interface SCPlaceWithoutReferences extends SCThing {
export interface SCPlaceWithoutReferences
  extends SCThingWithoutReferences {
  /**
   * Address of the place
   */
@@ -44,17 +45,32 @@ export interface SCPlaceWithoutReferences extends SCThing {
   * Translated fields of a place
   */
  translations?: SCTranslations<SCPlaceWithoutReferencesTranslatableProperties>;
}

/**
 * A place
 */
export interface SCPlace
  extends SCPlaceWithoutReferences, SCThing {
  /**
   * Translated fields of a place
   */
  translations?: SCTranslations<SCPlaceWithoutReferencesTranslatableProperties>;
}

export interface SCPlaceWithoutReferencesTranslatableProperties extends SCThingTranslatableProperties {
/**
 * Translatable properties of a place without references
 */
export interface SCPlaceWithoutReferencesTranslatableProperties
  extends SCThingTranslatableProperties {
  address?: SCPostalAddress;
}

/**
 * Meta information about creative works
 */
export class SCPlaceWithoutReferencesMeta extends SCThingMeta implements SCMetaTranslations<SCPlaceWithoutReferences> {
export class SCPlaceWithoutReferencesMeta
  extends SCThingMeta implements SCMetaTranslations<SCPlaceWithoutReferences> {
  /**
   * Translations of fields
   */
Loading