@dasch-swiss/dsp-js
Version:
TypeScript client library for DSP-API
115 lines • 5.11 kB
JavaScript
import { __decorate, __metadata } from "tslib";
import { JsonObject, JsonProperty } from 'json2typescript';
import { Constants } from '../Constants';
import { DateTimeStampConverter } from '../custom-converters/date-time-stamp-converter';
import { GuiAttributeConverter } from '../custom-converters/gui-attribute-converter';
import { IdConverter } from '../custom-converters/id-converter';
import { StringLiteralToStringConverter } from '../custom-converters/string-literal-to-string-converter';
import { StringLiteralToStringLiteralArrayConverter } from '../custom-converters/string-literal-to-string-literal-array-converter';
import { SubPropertyOfConverter } from '../custom-converters/subproperty-of-converter';
import { PropertyDefinition } from './property-definition';
/**
* @category Model V2
*/
let ResourcePropertyDefinition = class ResourcePropertyDefinition extends PropertyDefinition {
constructor() {
super(...arguments);
this.id = '';
this.subPropertyOf = [];
this.comment = undefined;
this.label = undefined;
this.guiElement = undefined;
this.subjectType = undefined;
this.objectType = undefined;
this.isLinkProperty = false;
this.isLinkValueProperty = false;
this.isEditable = false;
this.guiAttributes = [];
}
};
__decorate([
JsonProperty('@id', String),
__metadata("design:type", Object)
], ResourcePropertyDefinition.prototype, "id", void 0);
__decorate([
JsonProperty(Constants.SubPropertyOf, SubPropertyOfConverter, true),
__metadata("design:type", Array)
], ResourcePropertyDefinition.prototype, "subPropertyOf", void 0);
__decorate([
JsonProperty(Constants.Comment, String, true),
__metadata("design:type", String)
], ResourcePropertyDefinition.prototype, "comment", void 0);
__decorate([
JsonProperty(Constants.Label, String, true),
__metadata("design:type", String)
], ResourcePropertyDefinition.prototype, "label", void 0);
__decorate([
JsonProperty(Constants.GuiElement, IdConverter, true),
__metadata("design:type", String)
], ResourcePropertyDefinition.prototype, "guiElement", void 0);
__decorate([
JsonProperty(Constants.SubjectType, IdConverter, true),
__metadata("design:type", String)
], ResourcePropertyDefinition.prototype, "subjectType", void 0);
__decorate([
JsonProperty(Constants.ObjectType, IdConverter, true),
__metadata("design:type", String)
], ResourcePropertyDefinition.prototype, "objectType", void 0);
__decorate([
JsonProperty(Constants.IsLinkProperty, Boolean, true),
__metadata("design:type", Object)
], ResourcePropertyDefinition.prototype, "isLinkProperty", void 0);
__decorate([
JsonProperty(Constants.IsLinkValueProperty, Boolean, true),
__metadata("design:type", Object)
], ResourcePropertyDefinition.prototype, "isLinkValueProperty", void 0);
__decorate([
JsonProperty(Constants.IsEditable, Boolean, true),
__metadata("design:type", Object)
], ResourcePropertyDefinition.prototype, "isEditable", void 0);
__decorate([
JsonProperty(Constants.GuiAttribute, GuiAttributeConverter, true),
__metadata("design:type", Array)
], ResourcePropertyDefinition.prototype, "guiAttributes", void 0);
ResourcePropertyDefinition = __decorate([
JsonObject('ResourcePropertyDefinition')
], ResourcePropertyDefinition);
export { ResourcePropertyDefinition };
/**
* @category Model V2
*/
let ResourcePropertyDefinitionWithAllLanguages = class ResourcePropertyDefinitionWithAllLanguages extends ResourcePropertyDefinition {
constructor() {
super(...arguments);
this.comment = undefined;
this.comments = [];
this.label = undefined;
this.labels = [];
this.lastModificationDate = undefined;
}
};
__decorate([
JsonProperty(Constants.Comment, StringLiteralToStringConverter, true),
__metadata("design:type", String)
], ResourcePropertyDefinitionWithAllLanguages.prototype, "comment", void 0);
__decorate([
JsonProperty(Constants.Comment, StringLiteralToStringLiteralArrayConverter, true),
__metadata("design:type", Array)
], ResourcePropertyDefinitionWithAllLanguages.prototype, "comments", void 0);
__decorate([
JsonProperty(Constants.Label, StringLiteralToStringConverter, true),
__metadata("design:type", String)
], ResourcePropertyDefinitionWithAllLanguages.prototype, "label", void 0);
__decorate([
JsonProperty(Constants.Label, StringLiteralToStringLiteralArrayConverter, true),
__metadata("design:type", Array)
], ResourcePropertyDefinitionWithAllLanguages.prototype, "labels", void 0);
__decorate([
JsonProperty(Constants.LastModificationDate, DateTimeStampConverter, true),
__metadata("design:type", String)
], ResourcePropertyDefinitionWithAllLanguages.prototype, "lastModificationDate", void 0);
ResourcePropertyDefinitionWithAllLanguages = __decorate([
JsonObject('ResourcePropertyDefinitionWithAllLanguages')
], ResourcePropertyDefinitionWithAllLanguages);
export { ResourcePropertyDefinitionWithAllLanguages };
//# sourceMappingURL=resource-property-definition.js.map