home *** CD-ROM | disk | FTP | other *** search
- package webeq3.dom;
-
- import java.util.Vector;
- import org.w3c.dom.DOMException;
- import org.w3c.dom.NamedNodeMap;
- import org.w3c.dom.Node;
-
- public class MathMLDOMNamedNodeMap implements NamedNodeMap {
- Vector map = new Vector();
-
- public Node getNamedItem(String var1) {
- for(int var2 = 0; var2 < this.map.size(); ++var2) {
- if (((Node)this.map.elementAt(var2)).getNodeName().equals(var1)) {
- return (Node)this.map.elementAt(var2);
- }
- }
-
- return null;
- }
-
- public Node setNamedItem(Node var1) throws DOMException {
- String var2 = var1.getNodeName();
- boolean var3 = false;
-
- for(int var4 = 0; var4 < this.map.size() && !var3; ++var4) {
- Node var5 = (Node)this.map.elementAt(var4);
- if (var5 != null && var5.getNodeName().equals(var2)) {
- this.map.setElementAt(var1, var4);
- var3 = true;
- }
- }
-
- if (!var3) {
- this.map.addElement(var1);
- }
-
- return var1;
- }
-
- public Node removeNamedItem(String var1) throws DOMException {
- Node var2 = null;
- boolean var3 = false;
-
- for(int var4 = 0; var4 < this.map.size() && !var3; ++var4) {
- if (((Node)this.map.elementAt(var4)).getNodeName().equals(var1)) {
- var2 = (Node)this.map.elementAt(var4);
- this.map.removeElementAt(var4);
- var3 = true;
- }
- }
-
- return var2;
- }
-
- public Node item(int var1) {
- return (Node)this.map.elementAt(var1);
- }
-
- public int getLength() {
- return this.map.size();
- }
-
- public Node getNamedItemNS(String var1, String var2) {
- return null;
- }
-
- public Node setNamedItemNS(Node var1) throws DOMException {
- return null;
- }
-
- public Node removeNamedItemNS(String var1, String var2) throws DOMException {
- return null;
- }
-
- public void addNode(Node var1) {
- this.map.addElement(var1);
- }
- }
-