UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

43 lines 1.52 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ToolboxXmpXmp = void 0; const index_1 = require("./../index"); class ToolboxXmpXmp { constructor(data) { this.data = index_1.XmpFileData.fromJson(data.data); let dataFormatDefault = "json"; this.dataFormat = typeof (data === null || data === void 0 ? void 0 : data.dataFormat) !== "undefined" ? data === null || data === void 0 ? void 0 : data.dataFormat : dataFormatDefault; this.namespace = index_1.XmpNamespace.fromJson(data.namespace); } static getDataDescription() { return ""; } static getDataFormatDefault() { return "json"; } static getDataFormatDescription() { return "Format for the XMP metadata being added. As of this writing, only \"json\" is supported."; } static getNamespaceDescription() { return ""; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new ToolboxXmpXmp(data); } toJson() { var _a, _b; return { 'data': (_a = this.data) === null || _a === void 0 ? void 0 : _a.toJson(), 'dataFormat': this.dataFormat, 'namespace': (_b = this.namespace) === null || _b === void 0 ? void 0 : _b.toJson(), }; } clone() { return ToolboxXmpXmp.fromJson(this.toJson()); } } exports.ToolboxXmpXmp = ToolboxXmpXmp; //# sourceMappingURL=ToolboxXmpXmp.js.map