UNPKG

typesxml

Version:

Open source XML library written in TypeScript

45 lines 1.56 kB
"use strict"; /******************************************************************************* * Copyright (c) 2023 - 2024 Maxprograms. * * This program and the accompanying materials * are made available under the terms of the Eclipse License 1.0 * which accompanies this distribution, and is available at * https://www.eclipse.org/org/documents/epl-v10.html * * Contributors: * Maxprograms - initial API and implementation *******************************************************************************/ Object.defineProperty(exports, "__esModule", { value: true }); exports.AttDecl = void 0; const Constants_1 = require("../Constants"); class AttDecl { name; attType; defaultDecl; defaultValue; constructor(name, attType, defaultDecl, defaultValue) { this.name = name; this.attType = attType; this.defaultDecl = defaultDecl; this.defaultValue = defaultValue; } getNodeType() { return Constants_1.Constants.ATTRIBUTE_DECL_NODE; } equals(node) { if (node instanceof AttDecl) { return this.name === node.name && this.attType === node.attType && this.defaultDecl === node.defaultDecl && this.defaultValue === node.defaultValue; } return false; } toString() { return (this.name + ' ' + this.attType + ' ' + this.defaultDecl + ' ' + this.defaultValue).trim(); } isValid(value) { // TODO: Implement validation return true; } } exports.AttDecl = AttDecl; //# sourceMappingURL=AttDecl.js.map