constructor()

in app/vidispine/shape/VidispineShape.ts [160:195]


  constructor(sourceObject: any, check = true) {
    const containerComponent =
      check && sourceObject.hasOwnProperty("containerComponent")
        ? this.validateContainerComponent(sourceObject.containerComponent)
        : sourceObject.containerComponent;
    const audioComponents =
      check && sourceObject.hasOwnProperty("audioComponent")
        ? this.validateAudioComponentList(sourceObject.audioComponent)
        : sourceObject.audioComponent;
    const videoComponents =
      check && sourceObject.hasOwnProperty("videoComponent")
        ? this.validateVideoComponentList(sourceObject.videoComponent)
        : sourceObject.videoComponent;
    const binaryComponents =
      check && sourceObject.hasOwnProperty("binaryComponent")
        ? this.validateBinaryComponentList(sourceObject.binaryComponent)
        : sourceObject.binaryComponent;

    const everythingElse = omit(sourceObject, [
      "containerComponent",
      "audioComponent",
      "videoComponent",
      "binaryComponent",
    ]);
    if (check) VidispineShapeIF.check(everythingElse);
    this.id = everythingElse.id;
    this.created = everythingElse.created;
    this.essenceVersion = everythingElse.essenceVersion;
    this.tag = everythingElse.tag;
    this.mimeType = everythingElse.mimeType;

    this.containerComponent = containerComponent;
    this.audioComponent = audioComponents;
    this.videoComponent = videoComponents;
    this.binaryComponent = binaryComponents;
  }