@dasch-swiss/dsp-js
Version:
JavaScript library that handles API requests to Knora
137 lines • 6.46 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 { DateTimeStampConverter } from "../../../custom-converters/date-time-stamp-converter";
import { IdConverter } from "../../../custom-converters/id-converter";
import { UriConverter } from "../../../custom-converters/uri-converter";
import { BaseValue } from "../base-value";
/**
* @category Model V2
*/
var ReadValue = /** @class */ (function (_super) {
__extends(ReadValue, _super);
/**
* @category Internal
* @param id the id of the value.
* @param type the type of the value.
* @param attachedToUser the user the value is attached to.
* @param arkUrl the value's persistent URL.
* @param versionArkUrl the value's persistent URL for this version.
* @param valueCreationDate the value's date of creation.
* @param hasPermissions the permission set for the value.
* @param userHasPermission the current user's permissions on the value.
* @param uuid the value's UUID.
* @param propertyLabel the label of the value's property.
* @param propertyComment the comment of the value's property.
* @param property the property pointing to the value.
* @param strval the value's string representation, if any.
* @param valueHasComment the comment on the value, if any.
*/
function ReadValue(id, type, attachedToUser, arkUrl, versionArkUrl, valueCreationDate, hasPermissions, userHasPermission, uuid, propertyLabel, propertyComment, property, strval, valueHasComment) {
var _this = _super.call(this) || this;
_this.id = "";
_this.attachedToUser = "";
_this.arkUrl = "";
_this.versionArkUrl = "";
_this.valueCreationDate = "";
_this.hasPermissions = "";
_this.userHasPermission = "";
_this.uuid = "";
_this.valueHasComment = undefined;
if (id !== undefined)
_this.id = id;
if (type !== undefined)
_this.type = type;
if (attachedToUser !== undefined)
_this.attachedToUser = attachedToUser;
if (arkUrl !== undefined)
_this.arkUrl = arkUrl;
if (versionArkUrl !== undefined)
_this.versionArkUrl = versionArkUrl;
if (valueCreationDate !== undefined)
_this.valueCreationDate = valueCreationDate;
if (hasPermissions !== undefined)
_this.hasPermissions = hasPermissions;
if (userHasPermission !== undefined)
_this.userHasPermission = userHasPermission;
if (uuid !== undefined)
_this.uuid = uuid;
if (propertyLabel !== undefined)
_this.propertyLabel = propertyLabel;
if (propertyComment !== undefined)
_this.propertyComment = propertyLabel;
if (property !== undefined)
_this.property = property;
if (strval !== undefined)
_this.strval = strval;
if (valueHasComment !== undefined)
_this.valueHasComment = valueHasComment;
return _this;
}
__decorate([
JsonProperty("@id", String),
__metadata("design:type", String)
], ReadValue.prototype, "id", void 0);
__decorate([
JsonProperty(Constants.AttachedToUser, IdConverter),
__metadata("design:type", String)
], ReadValue.prototype, "attachedToUser", void 0);
__decorate([
JsonProperty(Constants.ArkUrl, UriConverter),
__metadata("design:type", String)
], ReadValue.prototype, "arkUrl", void 0);
__decorate([
JsonProperty(Constants.VersionArkUrl, UriConverter),
__metadata("design:type", String)
], ReadValue.prototype, "versionArkUrl", void 0);
__decorate([
JsonProperty(Constants.ValueCreationDate, DateTimeStampConverter),
__metadata("design:type", String)
], ReadValue.prototype, "valueCreationDate", void 0);
__decorate([
JsonProperty(Constants.HasPermissions, String),
__metadata("design:type", String)
], ReadValue.prototype, "hasPermissions", void 0);
__decorate([
JsonProperty(Constants.UserHasPermission, String),
__metadata("design:type", String)
], ReadValue.prototype, "userHasPermission", void 0);
__decorate([
JsonProperty(Constants.ValueHasUUID, String),
__metadata("design:type", String)
], ReadValue.prototype, "uuid", void 0);
__decorate([
JsonProperty(Constants.ValueHasComment, String, true),
__metadata("design:type", String)
], ReadValue.prototype, "valueHasComment", void 0);
ReadValue = __decorate([
JsonObject("ReadValue"),
__metadata("design:paramtypes", [String, String, String, String, String, String, String, String, String, String, String, String, String, String])
], ReadValue);
return ReadValue;
}(BaseValue));
export { ReadValue };
//# sourceMappingURL=read-value.js.map