UNPKG

isoxml-angular

Version:

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

61 lines (60 loc) 1.68 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LinkGroup = void 0; const classRegistry_1 = require("../classRegistry"); const utils_1 = require("../utils"); const ATTRIBUTES = { A: { name: "LinkGroupId", type: "xs:ID", isPrimaryId: true, isOptional: false, isOnlyV4: undefined, }, B: { name: "LinkGroupType", type: "xs:NMTOKEN", isPrimaryId: false, isOptional: false, isOnlyV4: undefined, }, C: { name: "ManufacturerGLN", type: "xs:anyURI", isPrimaryId: false, isOptional: true, isOnlyV4: undefined, }, D: { name: "LinkGroupNamespace", type: "xs:token", isPrimaryId: false, isOptional: true, isOnlyV4: undefined, }, E: { name: "LinkGroupDesignator", type: "xs:string", isPrimaryId: false, isOptional: true, isOnlyV4: undefined, }, }; const CHILD_TAGS = { LNK: { name: "Link", isOnlyV4: undefined }, }; class LinkGroup { constructor(attributes, isoxmlManager) { this.attributes = attributes; this.isoxmlManager = isoxmlManager; this.tag = "LGP" /* TAGS.LinkGroup */; } static fromXML(xml, isoxmlManager, internalId, targetClass = LinkGroup) { return (0, utils_1.fromXML)(xml, isoxmlManager, targetClass, ATTRIBUTES, CHILD_TAGS, internalId); } toXML() { return (0, utils_1.toXML)(this, ATTRIBUTES, CHILD_TAGS); } } exports.LinkGroup = LinkGroup; (0, classRegistry_1.registerEntityClass)("main", "LGP" /* TAGS.LinkGroup */, LinkGroup);