UNPKG

1.18 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var LdmModule = /** @class */ (function () {
4 function LdmModule(xhr) {
5 this.xhr = xhr;
6 }
7 /**
8 * Get closest connecting attributes in the LDM by calling the "attributeupperbound" endpoint
9 *
10 * @method getCommonAttributes
11 * @param {String} projectId A project identifier
12 * @param {Array} attributeUris Input list of attribute URIs
13 * @return {Promise} Resolves with result list of attribute URIs
14 */
15 LdmModule.prototype.getCommonAttributes = function (projectId, attributeUris) {
16 return this.xhr
17 .post("/gdc/md/" + projectId + "/ldm/attributeupperbound", {
18 body: {
19 attributeUpperBounds: {
20 attributes: attributeUris,
21 },
22 },
23 })
24 .then(function (response) { return response.getData(); })
25 .then(function (data) {
26 if (data.attributeUpperBoundsResponse) {
27 return data.attributeUpperBoundsResponse.upperbounds;
28 }
29 });
30 };
31 return LdmModule;
32}());
33exports.LdmModule = LdmModule;