1 29 30 package com.caucho.quercus.lib.dom; 31 32 import org.w3c.dom.Node ; 33 34 public class DOMNode<T extends Node > 35 extends DOMWrapper<T> 36 { 37 protected DOMNode(DOMImplementation impl, T delegate) 38 { 39 super(impl, delegate); 40 } 41 42 Node getDelegate() 43 { 44 return _delegate; 45 } 46 47 public DOMNode appendChild(DOMNode newChild) 48 throws DOMException 49 { 50 try { 51 return wrap(_delegate.appendChild(newChild.getDelegate())); 52 } 53 catch (org.w3c.dom.DOMException ex) { 54 throw wrap(ex); 55 } 56 } 57 58 public DOMNode cloneNode(boolean deep) 59 { 60 return wrap(_delegate.cloneNode(deep)); 61 } 62 63 public short compareDocumentPosition(DOMNode other) 64 throws DOMException 65 { 66 try { 67 return _delegate.compareDocumentPosition(other.getDelegate()); 68 } 69 catch (org.w3c.dom.DOMException ex) { 70 throw wrap(ex); 71 } 72 } 73 74 public DOMNamedNodeMap getAttributes() 75 { 76 return wrap(_delegate.getAttributes()); 77 } 78 79 public String getBaseURI() 80 { 81 return _delegate.getBaseURI(); 82 } 83 84 public DOMNodeList getChildNodes() 85 { 86 return wrap(_delegate.getChildNodes()); 87 } 88 89 public Object getFeature(String feature, String version) 90 { 91 return _delegate.getFeature(feature, version); 92 } 93 94 public DOMNode getFirstChild() 95 { 96 return wrap(_delegate.getFirstChild()); 97 } 98 99 public DOMNode getLastChild() 100 { 101 return wrap(_delegate.getLastChild()); 102 } 103 104 public String getLocalName() 105 { 106 return _delegate.getLocalName(); 107 } 108 109 public String getNamespaceURI() 110 { 111 return _delegate.getNamespaceURI(); 112 } 113 114 public DOMNode getNextSibling() 115 { 116 return wrap(_delegate.getNextSibling()); 117 } 118 119 public String getNodeName() 120 { 121 return _delegate.getNodeName(); 122 } 123 124 public short getNodeType() 125 { 126 return _delegate.getNodeType(); 127 } 128 129 public String getNodeValue() 130 throws DOMException 131 { 132 try { 133 return _delegate.getNodeValue(); 134 } 135 catch (org.w3c.dom.DOMException ex) { 136 throw wrap(ex); 137 } 138 } 139 140 public DOMDocument getOwnerDocument() 141 { 142 return wrap(_delegate.getOwnerDocument()); 143 } 144 145 public DOMNode getParentNode() 146 { 147 return wrap(_delegate.getParentNode()); 148 } 149 150 public String getPrefix() 151 { 152 return _delegate.getPrefix(); 153 } 154 155 public DOMNode getPreviousSibling() 156 { 157 return wrap(_delegate.getPreviousSibling()); 158 } 159 160 public String getTextContent() 161 throws DOMException 162 { 163 try { 164 return _delegate.getTextContent(); 165 } 166 catch (org.w3c.dom.DOMException ex) { 167 throw wrap(ex); 168 } 169 } 170 171 public Object getUserData(String key) 172 { 173 return _delegate.getUserData(key); 174 } 175 176 public boolean hasAttributes() 177 { 178 return _delegate.hasAttributes(); 179 } 180 181 public boolean hasChildNodes() 182 { 183 return _delegate.hasChildNodes(); 184 } 185 186 public DOMNode insertBefore(DOMNode newChild, DOMNode refChild) 187 throws DOMException 188 { 189 try { 190 return wrap(_delegate.insertBefore(newChild.getDelegate(), refChild.getDelegate())); 191 } 192 catch (org.w3c.dom.DOMException ex) { 193 throw wrap(ex); 194 } 195 } 196 197 public boolean isDefaultNamespace(String namespaceURI) 198 { 199 return _delegate.isDefaultNamespace(namespaceURI); 200 } 201 202 public boolean isEqualNode(DOMNode arg) 203 { 204 return _delegate.isEqualNode(arg.getDelegate()); 205 } 206 207 public boolean isSameNode(DOMNode other) 208 { 209 return _delegate.isSameNode(other.getDelegate()); 210 } 211 212 public boolean isSupported(String feature, String version) 213 { 214 return _delegate.isSupported(feature, version); 215 } 216 217 public String lookupNamespaceURI(String prefix) 218 { 219 return _delegate.lookupNamespaceURI(prefix); 220 } 221 222 public String lookupPrefix(String namespaceURI) 223 { 224 return _delegate.lookupPrefix(namespaceURI); 225 } 226 227 public void normalize() 228 { 229 _delegate.normalize(); 230 } 231 232 public DOMNode removeChild(DOMNode oldChild) 233 throws DOMException 234 { 235 try { 236 return wrap(_delegate.removeChild(oldChild.getDelegate())); 237 } 238 catch (org.w3c.dom.DOMException ex) { 239 throw wrap(ex); 240 } 241 } 242 243 public DOMNode replaceChild(DOMNode newChild, DOMNode oldChild) 244 throws DOMException 245 { 246 try { 247 return wrap(_delegate.replaceChild(newChild.getDelegate(), oldChild.getDelegate())); 248 } 249 catch (org.w3c.dom.DOMException ex) { 250 throw wrap(ex); 251 } 252 } 253 254 public void setNodeValue(String nodeValue) 255 throws DOMException 256 { 257 try { 258 _delegate.setNodeValue(nodeValue); 259 } 260 catch (org.w3c.dom.DOMException ex) { 261 throw wrap(ex); 262 } 263 } 264 265 public void setPrefix(String prefix) 266 throws DOMException 267 { 268 try { 269 _delegate.setPrefix(prefix); 270 } 271 catch (org.w3c.dom.DOMException ex) { 272 throw wrap(ex); 273 } 274 } 275 276 public void setTextContent(String textContent) 277 throws DOMException 278 { 279 try { 280 _delegate.setTextContent(textContent); 281 } 282 catch (org.w3c.dom.DOMException ex) { 283 throw wrap(ex); 284 } 285 } 286 287 public Object setUserData(String key, Object data) 288 { 289 return _delegate.setUserData(key, data, null); 290 } 291 292 public String toString() 293 { 294 return getClass().getSimpleName(); 295 } 296 } 297 | Popular Tags |