UNPKG

isoxml-angular

Version:

JavaScript library to parse and generate ISOXML (ISO11783-10) files

40 lines (39 loc) 1.25 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ProductRelation = void 0; const classRegistry_1 = require("../classRegistry"); const utils_1 = require("../utils"); const ATTRIBUTES = { A: { name: 'ProductIdRef', type: 'xs:IDREF', isPrimaryId: false, isOptional: false, isOnlyV4: undefined, }, B: { name: 'QuantityValue', type: 'xs:long', isPrimaryId: false, isOptional: false, isOnlyV4: undefined, minValue: 0, maxValue: 2147483647, }, }; const CHILD_TAGS = {}; class ProductRelation { constructor(attributes, isoxmlManager) { this.attributes = attributes; this.isoxmlManager = isoxmlManager; this.tag = "PRN" /* TAGS.ProductRelation */; } static fromXML(xml, isoxmlManager, internalId, targetClass = ProductRelation) { return (0, utils_1.fromXML)(xml, isoxmlManager, targetClass, ATTRIBUTES, CHILD_TAGS, internalId); } toXML() { return (0, utils_1.toXML)(this, ATTRIBUTES, CHILD_TAGS); } } exports.ProductRelation = ProductRelation; (0, classRegistry_1.registerEntityClass)('main', "PRN" /* TAGS.ProductRelation */, ProductRelation);