@dasch-swiss/dsp-js
Version:
JavaScript library that handles API requests to Knora
234 lines • 9.47 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
if (typeof b !== "function" && b !== null)
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
import { JsonObject, JsonProperty } from "json2typescript";
import { Constants } from "../../../Constants";
import { StringOrArrayToArrayConverter } from "../../../custom-converters/string-or-array-converter";
import { UriConverter } from "../../../custom-converters/uri-converter";
import { License } from "../create/license";
import { ReadValue } from "./read-value";
/**
* @category Model V2
*/
var ReadFileValue = /** @class */ (function (_super) {
__extends(ReadFileValue, _super);
function ReadFileValue() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.filename = "";
_this.fileUrl = "";
_this.copyrightHolder = null;
_this.authorship = [];
_this.license = null;
return _this;
}
__decorate([
JsonProperty(Constants.FileValueHasFilename, String),
__metadata("design:type", String)
], ReadFileValue.prototype, "filename", void 0);
__decorate([
JsonProperty(Constants.FileValueAsUrl, UriConverter),
__metadata("design:type", String)
], ReadFileValue.prototype, "fileUrl", void 0);
__decorate([
JsonProperty(Constants.hasCopyrightHolder, String, true),
__metadata("design:type", Object)
], ReadFileValue.prototype, "copyrightHolder", void 0);
__decorate([
JsonProperty(Constants.hasAuthorship, StringOrArrayToArrayConverter, true),
__metadata("design:type", Array)
], ReadFileValue.prototype, "authorship", void 0);
__decorate([
JsonProperty(Constants.hasLicense, License, true),
__metadata("design:type", Object)
], ReadFileValue.prototype, "license", void 0);
ReadFileValue = __decorate([
JsonObject("ReadFileValue")
], ReadFileValue);
return ReadFileValue;
}(ReadValue));
export { ReadFileValue };
/**
* @category Model V2
*/
var ReadAudioFileValue = /** @class */ (function (_super) {
__extends(ReadAudioFileValue, _super);
function ReadAudioFileValue() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.duration = 0;
return _this;
}
__decorate([
JsonProperty(Constants.AudioFileValueHasDuration, Number, true),
__metadata("design:type", Number)
], ReadAudioFileValue.prototype, "duration", void 0);
ReadAudioFileValue = __decorate([
JsonObject("ReadAudioFileValue")
], ReadAudioFileValue);
return ReadAudioFileValue;
}(ReadFileValue));
export { ReadAudioFileValue };
/**
* @category Model V2
*/
var ReadDocumentFileValue = /** @class */ (function (_super) {
__extends(ReadDocumentFileValue, _super);
function ReadDocumentFileValue() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.dimX = 0;
_this.dimY = 0;
_this.pageCount = 0;
return _this;
}
__decorate([
JsonProperty(Constants.DocumentFileValueHasDimX, Number, true),
__metadata("design:type", Number)
], ReadDocumentFileValue.prototype, "dimX", void 0);
__decorate([
JsonProperty(Constants.DocumentFileValueHasDimY, Number, true),
__metadata("design:type", Number)
], ReadDocumentFileValue.prototype, "dimY", void 0);
__decorate([
JsonProperty(Constants.DocumentFileValueHasPageCount, Number, true),
__metadata("design:type", Number)
], ReadDocumentFileValue.prototype, "pageCount", void 0);
ReadDocumentFileValue = __decorate([
JsonObject("ReadDocumentFileValue")
], ReadDocumentFileValue);
return ReadDocumentFileValue;
}(ReadFileValue));
export { ReadDocumentFileValue };
/**
* @category Model V2
*/
var ReadMovingImageFileValue = /** @class */ (function (_super) {
__extends(ReadMovingImageFileValue, _super);
function ReadMovingImageFileValue() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.dimX = 0;
_this.dimY = 0;
_this.duration = 0;
_this.fps = 0;
return _this;
}
__decorate([
JsonProperty(Constants.MovingImageFileValueHasDimX, Number, true),
__metadata("design:type", Number)
], ReadMovingImageFileValue.prototype, "dimX", void 0);
__decorate([
JsonProperty(Constants.MovingImageFileValueHasDimY, Number, true),
__metadata("design:type", Number)
], ReadMovingImageFileValue.prototype, "dimY", void 0);
__decorate([
JsonProperty(Constants.MovingImageFileValueHasDuration, Number, true),
__metadata("design:type", Number)
], ReadMovingImageFileValue.prototype, "duration", void 0);
__decorate([
JsonProperty(Constants.MovingImageFileValueHasFps, Number, true),
__metadata("design:type", Number)
], ReadMovingImageFileValue.prototype, "fps", void 0);
ReadMovingImageFileValue = __decorate([
JsonObject("ReadMovingImageFileValue")
], ReadMovingImageFileValue);
return ReadMovingImageFileValue;
}(ReadFileValue));
export { ReadMovingImageFileValue };
/**
* @category Model V2
*/
var ReadStillImageFileValue = /** @class */ (function (_super) {
__extends(ReadStillImageFileValue, _super);
function ReadStillImageFileValue() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.dimX = 0;
_this.dimY = 0;
_this.iiifBaseUrl = "";
return _this;
}
__decorate([
JsonProperty(Constants.StillImageFileValueHasDimX, Number),
__metadata("design:type", Number)
], ReadStillImageFileValue.prototype, "dimX", void 0);
__decorate([
JsonProperty(Constants.StillImageFileValueHasDimY, Number),
__metadata("design:type", Number)
], ReadStillImageFileValue.prototype, "dimY", void 0);
__decorate([
JsonProperty(Constants.StillImageFileValueHasIIIFBaseUrl, UriConverter),
__metadata("design:type", String)
], ReadStillImageFileValue.prototype, "iiifBaseUrl", void 0);
ReadStillImageFileValue = __decorate([
JsonObject("ReadStillImageFileValue")
], ReadStillImageFileValue);
return ReadStillImageFileValue;
}(ReadFileValue));
export { ReadStillImageFileValue };
/**
* @category Model V2
*/
var ReadStillImageExternalFileValue = /** @class */ (function (_super) {
__extends(ReadStillImageExternalFileValue, _super);
function ReadStillImageExternalFileValue() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.externalUrl = "";
return _this;
}
__decorate([
JsonProperty(Constants.StillImageFileValueHasExternalUrl, UriConverter, true),
__metadata("design:type", String)
], ReadStillImageExternalFileValue.prototype, "externalUrl", void 0);
ReadStillImageExternalFileValue = __decorate([
JsonObject("ReadStillImageExternalFileValue")
], ReadStillImageExternalFileValue);
return ReadStillImageExternalFileValue;
}(ReadFileValue));
export { ReadStillImageExternalFileValue };
/**
* @category Model V2
*/
var ReadArchiveFileValue = /** @class */ (function (_super) {
__extends(ReadArchiveFileValue, _super);
function ReadArchiveFileValue() {
return _super !== null && _super.apply(this, arguments) || this;
}
ReadArchiveFileValue = __decorate([
JsonObject("ReadArchiveFileValue")
], ReadArchiveFileValue);
return ReadArchiveFileValue;
}(ReadFileValue));
export { ReadArchiveFileValue };
/**
* @category Model V2
*/
var ReadTextFileValue = /** @class */ (function (_super) {
__extends(ReadTextFileValue, _super);
function ReadTextFileValue() {
return _super !== null && _super.apply(this, arguments) || this;
}
ReadTextFileValue = __decorate([
JsonObject("ReadTextFileValue")
], ReadTextFileValue);
return ReadTextFileValue;
}(ReadFileValue));
export { ReadTextFileValue };
//# sourceMappingURL=read-file-value.js.map