1 19 20 package org.netbeans.tax.dom; 21 22 import org.w3c.dom.*; 23 import org.netbeans.tax.*; 24 25 29 class ElementImpl extends NodeImpl implements Element { 30 31 private final TreeElement peer; 32 33 34 public ElementImpl(TreeElement peer) { 35 this.peer = peer; 36 } 37 38 39 45 public String getAttribute(String name) { 46 return peer.getAttribute(name).getValue(); 47 } 48 49 61 public String getAttributeNS(String namespaceURI, String localName) { 62 throw new UOException(); 63 } 64 65 75 public Attr getAttributeNode(String name) { 76 return Wrapper.wrap(peer.getAttribute(name)); 77 } 78 79 92 public Attr getAttributeNodeNS(String namespaceURI, String localName) { 93 throw new UOException(); 94 } 95 96 100 public NamedNodeMap getAttributes() { 101 return Wrapper.wrap(peer.getAttributes()); 102 } 103 104 109 public NodeList getChildNodes() { 110 return Wrapper.wrap(peer.getChildNodes()); 111 } 112 113 121 public NodeList getElementsByTagName(String name) { 122 throw new UOException(); 123 } 124 125 142 public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { 143 throw new UOException(); 144 } 145 146 150 public Node getFirstChild() { 151 return Wrapper.wrap(peer.getFirstChild()); 152 } 153 154 158 public Node getLastChild() { 159 return Wrapper.wrap(peer.getLastChild()); 160 } 161 162 163 167 public Node getNextSibling() { 168 return Children.getNextSibling(peer); 169 } 170 171 174 public String getNodeName() { 175 return getTagName(); 176 } 177 178 181 public short getNodeType() { 182 return Node.ELEMENT_NODE; 183 } 184 185 195 public String getNodeValue() throws DOMException { 196 return null; 197 } 198 199 200 208 public Node getParentNode() { 209 return Wrapper.wrap(peer.getParentNode()); 210 } 211 212 216 public Node getPreviousSibling() { 217 return Children.getPreviousSibling(peer); 218 } 219 220 231 public String getTagName() { 232 return peer.getQName(); 233 } 234 235 245 public boolean hasAttribute(String name) { 246 throw new UOException(); 247 } 248 249 264 public boolean hasAttributeNS(String namespaceURI, String localName) { 265 throw new UOException(); 266 } 267 268 274 public boolean hasAttributes() { 275 return peer.hasAttributes(); 276 } 277 278 283 public boolean hasChildNodes() { 284 return peer.hasChildNodes(); 285 } 286 287 298 public void removeAttribute(String name) throws DOMException { 299 throw new ROException(); 300 } 301 302 317 public void removeAttributeNS(String namespaceURI, String localName) throws DOMException { 318 throw new ROException(); 319 } 320 321 334 public Attr removeAttributeNode(Attr oldAttr) throws DOMException { 335 throw new ROException(); 336 } 337 338 339 360 public void setAttribute(String name, String value) throws DOMException { 361 throw new ROException(); 362 } 363 364 403 public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException { 404 throw new ROException(); 405 } 406 407 426 public Attr setAttributeNode(Attr newAttr) throws DOMException { 427 throw new ROException(); 428 } 429 430 452 public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { 453 throw new ROException(); 454 } 455 456 } 457 | Popular Tags |