UNPKG

isoxml-angular

Version:

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

41 lines (40 loc) 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GuidanceGroup = void 0; const classRegistry_1 = require("../classRegistry"); const utils_1 = require("../utils"); const ATTRIBUTES = { A: { name: 'GuidanceGroupId', type: 'xs:ID', isPrimaryId: true, isOptional: false, isOnlyV4: undefined, }, B: { name: 'GuidanceGroupDesignator', type: 'xs:string', isPrimaryId: false, isOptional: true, isOnlyV4: undefined, }, }; const CHILD_TAGS = { GPN: { name: 'GuidancePattern', isOnlyV4: undefined }, PLN: { name: 'BoundaryPolygon', isOnlyV4: undefined }, }; class GuidanceGroup { constructor(attributes, isoxmlManager) { this.attributes = attributes; this.isoxmlManager = isoxmlManager; this.tag = "GGP" /* TAGS.GuidanceGroup */; } static fromXML(xml, isoxmlManager, internalId, targetClass = GuidanceGroup) { return (0, utils_1.fromXML)(xml, isoxmlManager, targetClass, ATTRIBUTES, CHILD_TAGS, internalId); } toXML() { return (0, utils_1.toXML)(this, ATTRIBUTES, CHILD_TAGS); } } exports.GuidanceGroup = GuidanceGroup; (0, classRegistry_1.registerEntityClass)('main', "GGP" /* TAGS.GuidanceGroup */, GuidanceGroup);