1 18 package org.apache.batik.dom; 19 20 import org.w3c.dom.DOMException ; 21 import org.w3c.dom.Node ; 22 23 29 public class GenericElement extends AbstractElement { 30 33 protected String nodeName; 34 35 38 protected boolean readonly; 39 40 43 protected GenericElement() { 44 } 45 46 53 public GenericElement(String name, AbstractDocument owner) 54 throws DOMException { 55 super(name, owner); 56 nodeName = name; 57 } 58 59 62 public void setNodeName(String v) { 63 nodeName = v; 64 } 65 66 70 public String getNodeName() { 71 return nodeName; 72 } 73 74 76 79 public boolean isReadonly() { 80 return readonly; 81 } 82 83 86 public void setReadonly(boolean v) { 87 readonly = v; 88 } 89 90 93 protected Node export(Node n, AbstractDocument d) { 94 super.export(n, d); 95 GenericElement ge = (GenericElement)n; 96 ge.nodeName = nodeName; 97 return n; 98 } 99 100 103 protected Node deepExport(Node n, AbstractDocument d) { 104 super.deepExport(n, d); 105 GenericElement ge = (GenericElement)n; 106 ge.nodeName = nodeName; 107 return n; 108 } 109 110 114 protected Node copyInto(Node n) { 115 GenericElement ge = (GenericElement)super.copyInto(n); 116 ge.nodeName = nodeName; 117 return n; 118 } 119 120 124 protected Node deepCopyInto(Node n) { 125 GenericElement ge = (GenericElement)super.deepCopyInto(n); 126 ge.nodeName = nodeName; 127 return n; 128 } 129 130 133 protected Node newNode() { 134 return new GenericElement(); 135 } 136 } 137 | Popular Tags |