isoxml-angular
Version:
JavaScript library to parse and generate ISOXML (ISO11783-10) files
67 lines (66 loc) • 1.86 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseStation = void 0;
const classRegistry_1 = require("../classRegistry");
const utils_1 = require("../utils");
const ATTRIBUTES = {
A: {
name: 'BaseStationId',
type: 'xs:ID',
isPrimaryId: true,
isOptional: false,
isOnlyV4: undefined,
},
B: {
name: 'BaseStationDesignator',
type: 'xs:string',
isPrimaryId: false,
isOptional: false,
isOnlyV4: undefined,
},
C: {
name: 'BaseStationNorth',
type: 'xs:decimal',
isPrimaryId: false,
isOptional: false,
isOnlyV4: undefined,
minValue: -90,
maxValue: 90,
fractionDigits: 9,
},
D: {
name: 'BaseStationEast',
type: 'xs:decimal',
isPrimaryId: false,
isOptional: false,
isOnlyV4: undefined,
minValue: -180,
maxValue: 180,
fractionDigits: 9,
},
E: {
name: 'BaseStationUp',
type: 'xs:long',
isPrimaryId: false,
isOptional: false,
isOnlyV4: undefined,
minValue: -2147483647,
maxValue: 2147483647,
},
};
const CHILD_TAGS = {};
class BaseStation {
constructor(attributes, isoxmlManager) {
this.attributes = attributes;
this.isoxmlManager = isoxmlManager;
this.tag = "BSN" /* TAGS.BaseStation */;
}
static fromXML(xml, isoxmlManager, internalId, targetClass = BaseStation) {
return (0, utils_1.fromXML)(xml, isoxmlManager, targetClass, ATTRIBUTES, CHILD_TAGS, internalId);
}
toXML() {
return (0, utils_1.toXML)(this, ATTRIBUTES, CHILD_TAGS);
}
}
exports.BaseStation = BaseStation;
(0, classRegistry_1.registerEntityClass)('main', "BSN" /* TAGS.BaseStation */, BaseStation);