isoxml-angular
Version:
JavaScript library to parse and generate ISOXML (ISO11783-10) files
82 lines (81 loc) • 2.47 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ISO11783LinkListFile = void 0;
const classRegistry_1 = require("../classRegistry");
const utils_1 = require("../utils");
const ATTRIBUTES = {
VersionMajor: {
name: "VersionMajor",
type: "xs:NMTOKEN",
isPrimaryId: false,
isOptional: false,
isOnlyV4: undefined,
},
VersionMinor: {
name: "VersionMinor",
type: "xs:NMTOKEN",
isPrimaryId: false,
isOptional: false,
isOnlyV4: undefined,
},
ManagementSoftwareManufacturer: {
name: "ManagementSoftwareManufacturer",
type: "xs:string",
isPrimaryId: false,
isOptional: false,
isOnlyV4: undefined,
},
ManagementSoftwareVersion: {
name: "ManagementSoftwareVersion",
type: "xs:string",
isPrimaryId: false,
isOptional: false,
isOnlyV4: undefined,
},
TaskControllerManufacturer: {
name: "TaskControllerManufacturer",
type: "xs:string",
isPrimaryId: false,
isOptional: true,
isOnlyV4: undefined,
},
TaskControllerVersion: {
name: "TaskControllerVersion",
type: "xs:string",
isPrimaryId: false,
isOptional: true,
isOnlyV4: undefined,
},
FileVersion: {
name: "FileVersion",
type: "xs:string",
isPrimaryId: false,
isOptional: true,
isOnlyV4: undefined,
},
DataTransferOrigin: {
name: "DataTransferOrigin",
type: "xs:NMTOKEN",
isPrimaryId: false,
isOptional: false,
isOnlyV4: undefined,
},
};
const CHILD_TAGS = {
LGP: { name: "LinkGroup", isOnlyV4: undefined },
};
class ISO11783LinkListFile {
constructor(attributes, isoxmlManager) {
this.attributes = attributes;
this.isoxmlManager = isoxmlManager;
this.tag = "ISO11783LinkList" /* TAGS.ISO11783LinkListFile */;
}
static fromXML(xml, isoxmlManager, internalId, targetClass = ISO11783LinkListFile) {
return (0, utils_1.fromXML)(xml, isoxmlManager, targetClass, ATTRIBUTES, CHILD_TAGS, internalId);
}
toXML() {
return (0, utils_1.toXML)(this, ATTRIBUTES, CHILD_TAGS);
}
}
exports.ISO11783LinkListFile = ISO11783LinkListFile;
(0, classRegistry_1.registerEntityClass)("main", "ISO11783LinkList" /* TAGS.ISO11783LinkListFile */, ISO11783LinkListFile);