UNPKG

@softvision/webpdf-wsclient-typescript

Version:

A simplified and optimized API client library for the webPDF server

111 lines 4.7 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Description = void 0; const index_1 = require("./../index"); class Description { constructor(data) { let applicationDefault = ""; this.application = typeof (data === null || data === void 0 ? void 0 : data.application) !== "undefined" ? data === null || data === void 0 ? void 0 : data.application : applicationDefault; this.author = (data.author || []).map(index_1.Author.fromJson); let creationDateDefault = ""; this.creationDate = typeof (data === null || data === void 0 ? void 0 : data.creationDate) !== "undefined" ? data === null || data === void 0 ? void 0 : data.creationDate : creationDateDefault; let creatorDefault = ""; this.creator = typeof (data === null || data === void 0 ? void 0 : data.creator) !== "undefined" ? data === null || data === void 0 ? void 0 : data.creator : creatorDefault; this.custom = (data.custom || []).map(index_1.CustomDescription.fromJson); this.keywords = (data.keywords || []).map(index_1.Keyword.fromJson); let modificationDateDefault = ""; this.modificationDate = typeof (data === null || data === void 0 ? void 0 : data.modificationDate) !== "undefined" ? data === null || data === void 0 ? void 0 : data.modificationDate : modificationDateDefault; let producerDefault = ""; this.producer = typeof (data === null || data === void 0 ? void 0 : data.producer) !== "undefined" ? data === null || data === void 0 ? void 0 : data.producer : producerDefault; let subjectDefault = ""; this.subject = typeof (data === null || data === void 0 ? void 0 : data.subject) !== "undefined" ? data === null || data === void 0 ? void 0 : data.subject : subjectDefault; let titleDefault = ""; this.title = typeof (data === null || data === void 0 ? void 0 : data.title) !== "undefined" ? data === null || data === void 0 ? void 0 : data.title : titleDefault; } static getApplicationDefault() { return ""; } static getApplicationDescription() { return "The application used to create the document."; } static getAuthorDefault() { return []; } static getAuthorDescription() { return ""; } static getCreationDateDefault() { return ""; } static getCreationDateDescription() { return "The date of the document's creation."; } static getCreatorDefault() { return ""; } static getCreatorDescription() { return "If the document has been converted to a PDF from another format, this is the name of the application, that created the original document."; } static getCustomDefault() { return []; } static getCustomDescription() { return ""; } static getKeywordsDefault() { return []; } static getKeywordsDescription() { return ""; } static getModificationDateDefault() { return ""; } static getModificationDateDescription() { return "The date of the most recent modification of the document."; } static getProducerDefault() { return ""; } static getProducerDescription() { return "If the document has been converted to a PDF from another format, this is the name of the application, that converted it."; } static getSubjectDefault() { return ""; } static getSubjectDescription() { return "The document's subject."; } static getTitleDefault() { return ""; } static getTitleDescription() { return "The document's title."; } static fromJson(data) { if (data === undefined || data === null) { return data; } return new Description(data); } toJson() { var _a, _b, _c; return { 'application': this.application, 'author': (_a = this.author) === null || _a === void 0 ? void 0 : _a.map((data) => data.toJson()), 'creationDate': this.creationDate, 'creator': this.creator, 'custom': (_b = this.custom) === null || _b === void 0 ? void 0 : _b.map((data) => data.toJson()), 'keywords': (_c = this.keywords) === null || _c === void 0 ? void 0 : _c.map((data) => data.toJson()), 'modificationDate': this.modificationDate, 'producer': this.producer, 'subject': this.subject, 'title': this.title, }; } clone() { return Description.fromJson(this.toJson()); } } exports.Description = Description; //# sourceMappingURL=Description.js.map