UNPKG

geneea-nlp-client

Version:

The TypeScript Client for Geneea Interpretor G3 API.

33 lines (32 loc) 1.22 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GkbProperty = void 0; /** Class encapsulating a vector */ class GkbProperty { /** * * @param name Key identifying the property. * @param label Label describing the property. * @param valueGkbId Identifier of GKB item representing property value if there is any. * @param boolValue Property value if it is boolean. * @param floatValue Property value if it is float. * @param intValue Property value if it is integer. * @param strValue Property value if it is string or date. */ constructor(name, label = null, valueGkbId = null, boolValue = null, floatValue = null, intValue = null, strValue = null) { this.name = name; this.label = label; this.valueGkbId = valueGkbId; this.boolValue = boolValue; this.floatValue = floatValue; this.intValue = intValue; this.strValue = strValue; if (boolValue === null && floatValue === null && intValue === null && strValue === null) { throw Error("No GKB property value was set."); } } } exports.GkbProperty = GkbProperty;