semantic-analysis
Version:
Extensible semantic Structured Data analysis library for Microdata and JSON-LD
74 lines • 2.15 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TermLoader = void 0;
var TermLoader = /** @class */ (function () {
/* Initialization */
function TermLoader(id, schema) {
this.id = id;
this.schema = schema;
}
Object.defineProperty(TermLoader.prototype, "type", {
/* Term */
get: function () {
return this.data.type;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TermLoader.prototype, "label", {
get: function () {
return this.data.label;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TermLoader.prototype, "comment", {
get: function () {
return this.data.comment;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TermLoader.prototype, "supersededBy", {
get: function () {
return this.data.supersededBy;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TermLoader.prototype, "subClassOf", {
get: function () {
return this.data.subClassOf;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TermLoader.prototype, "rangeIncludes", {
get: function () {
return this.data.rangeIncludes;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TermLoader.prototype, "domainIncludes", {
get: function () {
return this.data.domainIncludes;
},
enumerable: false,
configurable: true
});
Object.defineProperty(TermLoader.prototype, "data", {
/* Helpers */
get: function () {
if (!this._data) {
this._data = this.schema.get(this.id) || { id: this.id };
}
return this._data;
},
enumerable: false,
configurable: true
});
return TermLoader;
}());
exports.TermLoader = TermLoader;
//# sourceMappingURL=TermLoader.js.map