UNPKG

isoxml-angular

Version:

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

47 lines (46 loc) 1.33 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TimeLog = void 0; const classRegistry_1 = require("../classRegistry"); const utils_1 = require("../utils"); const ATTRIBUTES = { A: { name: "Filename", type: "xs:ID", isPrimaryId: false, isOptional: false, isOnlyV4: false, }, B: { name: "Filelength", type: "xs:unsignedLong", isPrimaryId: false, isOptional: true, isOnlyV4: false, minValue: 0, maxValue: 4294967294, }, C: { name: "TimeLogType", type: "xs:NMTOKEN", isPrimaryId: false, isOptional: false, isOnlyV4: false, }, }; const CHILD_TAGS = {}; class TimeLog { constructor(attributes, isoxmlManager) { this.attributes = attributes; this.isoxmlManager = isoxmlManager; this.tag = "TLG" /* TAGS.TimeLog */; } static fromXML(xml, isoxmlManager, internalId, targetClass = TimeLog) { return (0, utils_1.fromXML)(xml, isoxmlManager, targetClass, ATTRIBUTES, CHILD_TAGS, internalId); } toXML() { return (0, utils_1.toXML)(this, ATTRIBUTES, CHILD_TAGS); } } exports.TimeLog = TimeLog; (0, classRegistry_1.registerEntityClass)("main", "TLG" /* TAGS.TimeLog */, TimeLog);