1 package org.enhydra.xml.xmlc.dom.generic; 2 3 import org.enhydra.xml.dom.DOMOps; 4 import org.enhydra.xml.xmlc.XMLObject; 5 import org.enhydra.xml.xmlc.XMLObjectLink; 6 import org.w3c.dom.Attr ; 7 import org.w3c.dom.CDATASection ; 8 import org.w3c.dom.Comment ; 9 import org.w3c.dom.DOMConfiguration ; 10 import org.w3c.dom.DOMException ; 11 import org.w3c.dom.DOMImplementation ; 12 import org.w3c.dom.Document ; 13 import org.w3c.dom.DocumentFragment ; 14 import org.w3c.dom.DocumentType ; 15 import org.w3c.dom.Element ; 16 import org.w3c.dom.EntityReference ; 17 import org.w3c.dom.NamedNodeMap ; 18 import org.w3c.dom.Node ; 19 import org.w3c.dom.NodeList ; 20 import org.w3c.dom.ProcessingInstruction ; 21 import org.w3c.dom.Text ; 22 import org.w3c.dom.UserDataHandler ; 23 24 28 public class GenericLinkedDocument implements Document , XMLObjectLink { 29 30 protected final Document DELEGATE; 31 32 33 private XMLObject objectLink; 34 35 39 public GenericLinkedDocument(Document inner) { 40 DELEGATE = inner; 41 } 42 43 46 public void setXMLObject(XMLObject xmlObject) { 47 objectLink = xmlObject; 48 } 49 50 53 public XMLObject getXMLObject() { 54 return objectLink; 55 } 56 57 58 public Node cloneNode(boolean deep) { 59 GenericLinkedDocument clone = 62 new GenericLinkedDocument((Document )DELEGATE.cloneNode(deep)); 63 clone.setXMLObject(getXMLObject()); 64 return clone; 65 } 66 67 70 public DocumentType getDoctype() { 72 return DELEGATE.getDoctype(); 73 } 74 public DOMImplementation getImplementation() { 75 return DELEGATE.getImplementation(); 76 } 77 public Element getDocumentElement() { 78 return DELEGATE.getDocumentElement(); 79 } 80 public Element createElement(String tagName) throws DOMException { 81 return DELEGATE.createElement(tagName); 82 } 83 public DocumentFragment createDocumentFragment() { 84 return DELEGATE.createDocumentFragment(); 85 } 86 public Text createTextNode(String data) { 87 return DELEGATE.createTextNode(data); 88 } 89 public Comment createComment(String data) { 90 return DELEGATE.createComment(data); 91 } 92 public CDATASection createCDATASection(String data) throws DOMException { 93 return DELEGATE.createCDATASection(data); 94 } 95 public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException { 96 return DELEGATE.createProcessingInstruction(target, data); 97 } 98 public Attr createAttribute(String name) throws DOMException { 99 return DELEGATE.createAttribute(name); 100 } 101 public EntityReference createEntityReference(String name) throws DOMException { 102 return DELEGATE.createEntityReference(name); 103 } 104 public NodeList getElementsByTagName(String tagname) { 105 return DELEGATE.getElementsByTagName(tagname); 106 } 107 public Node importNode(Node importedNode, boolean deep) throws DOMException { 108 return DELEGATE.importNode(importedNode, deep); 109 } 110 public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException { 111 return DELEGATE.createElementNS(namespaceURI, qualifiedName); 112 } 113 public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException { 114 return DELEGATE.createAttributeNS(namespaceURI, qualifiedName); 115 } 116 public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { 117 return DELEGATE.getElementsByTagNameNS(namespaceURI, localName); 118 } 119 public Element getElementById(String elementId) { 120 return DELEGATE.getElementById(elementId); 121 } 122 123 125 public String getNodeName() { 126 return DELEGATE.getNodeName(); 127 } 128 public String getNodeValue() throws DOMException { 129 return DELEGATE.getNodeValue(); 130 } 131 public void setNodeValue(String nodeValue) throws DOMException { 132 DELEGATE.setNodeValue(nodeValue); 133 } 134 135 public short getNodeType() { 136 return DELEGATE.getNodeType(); 137 } 138 public Node getParentNode() { 139 return DELEGATE.getParentNode(); 140 } 141 public NodeList getChildNodes() { 142 return DELEGATE.getChildNodes(); 143 } 144 public Node getFirstChild() { 145 return DELEGATE.getFirstChild(); 146 } 147 public Node getLastChild() { 148 return DELEGATE.getLastChild(); 149 } 150 public Node getPreviousSibling() { 151 return DELEGATE.getPreviousSibling(); 152 } 153 public Node getNextSibling() { 154 return DELEGATE.getNextSibling(); 155 } 156 public NamedNodeMap getAttributes() { 157 return DELEGATE.getAttributes(); 158 } 159 public Document getOwnerDocument() { 160 return DELEGATE.getOwnerDocument(); 161 } 162 public Node insertBefore(Node newChild, Node refChild) throws DOMException { 163 return DELEGATE.insertBefore(newChild, refChild); 164 } 165 public Node replaceChild(Node newChild, Node oldChild) throws DOMException { 166 return DELEGATE.replaceChild(newChild, oldChild); 167 } 168 public Node removeChild(Node oldChild) throws DOMException { 169 return DELEGATE.removeChild(oldChild); 170 } 171 public Node appendChild(Node newChild) throws DOMException { 172 return DELEGATE.appendChild(newChild); 173 } 174 public boolean hasChildNodes() { 175 return DELEGATE.hasChildNodes(); 176 } 177 public void normalize() { 178 DELEGATE.normalize(); 179 } 180 public boolean isSupported(String feature, String version) { 181 return DELEGATE.isSupported(feature, version); 182 } 183 public String getNamespaceURI() { 184 return DELEGATE.getNamespaceURI(); 185 } 186 public String getPrefix() { 187 return DELEGATE.getPrefix(); 188 } 189 public void setPrefix(String prefix) throws DOMException { 190 DELEGATE.setPrefix(prefix); 191 } 192 public String getLocalName() { 193 return DELEGATE.getLocalName(); 194 } 195 public boolean hasAttributes() { 196 return DELEGATE.hasAttributes(); 197 } 198 199 public String getEncoding() { 202 return DOMOps.getEncoding(DELEGATE); 203 } 204 public void setEncoding(String encoding) { 205 DOMOps.setEncoding(DELEGATE, encoding); 206 } 207 208 public boolean getStandalone() { 209 return DOMOps.getStandalone(DELEGATE); 210 } 211 public void setStandalone(boolean standalone) { 212 DOMOps.setStandalone(DELEGATE, standalone); 213 } 214 215 public boolean getStrictErrorChecking() { 216 return DOMOps.getStrictErrorChecking(DELEGATE); 217 } 218 public void setStrictErrorChecking(boolean strictErrorChecking) { 219 DOMOps.setStrictErrorChecking(DELEGATE, strictErrorChecking); 220 } 221 222 public String getVersion() { 223 return DOMOps.getVersion(DELEGATE); 224 } 225 public void setVersion(String version) { 226 DOMOps.setVersion(DELEGATE, version); 227 } 228 229 public Node adoptNode(Node source) throws DOMException { 230 return DOMOps.adoptNode(DELEGATE, source); 231 } 232 233 234 236 public String getInputEncoding() { 237 return DELEGATE.getInputEncoding(); 238 } 239 240 public String getXmlEncoding() { 241 return DELEGATE.getXmlEncoding(); 242 } 243 244 public boolean getXmlStandalone() { 245 return DELEGATE.getXmlStandalone(); 246 } 247 248 public void setXmlStandalone(boolean xmlStandalone) throws DOMException { 249 DELEGATE.setXmlStandalone(xmlStandalone); 250 } 251 252 public String getXmlVersion() { 253 return DELEGATE.getXmlVersion(); 254 } 255 256 public void setXmlVersion(String xmlVersion) throws DOMException { 257 DELEGATE.setXmlVersion(xmlVersion); 258 } 259 260 public String getDocumentURI() { 261 return DELEGATE.getDocumentURI(); 262 } 263 264 public void setDocumentURI(String documentURI) { 265 DELEGATE.setDocumentURI(documentURI); 266 } 267 268 public DOMConfiguration getDomConfig() { 269 return DELEGATE.getDomConfig(); 270 } 271 272 public void normalizeDocument() { 273 DELEGATE.normalizeDocument(); 274 } 275 276 public Node renameNode(Node n, String namespaceURI, String qualifiedName) throws DOMException { 277 return DELEGATE.renameNode(n, namespaceURI, qualifiedName); 278 } 279 280 public String getBaseURI() { 281 return DELEGATE.getBaseURI(); 282 } 283 284 public short compareDocumentPosition(Node other) throws DOMException { 285 return DELEGATE.compareDocumentPosition(other); 286 } 287 288 public String getTextContent() throws DOMException { 289 return DELEGATE.getTextContent(); 290 } 291 292 public void setTextContent(String textContent) throws DOMException { 293 DELEGATE.setTextContent(textContent); 294 } 295 296 public boolean isSameNode(Node other) { 297 return DELEGATE.isSameNode(other); 298 } 299 300 public String lookupPrefix(String namespaceURI) { 301 return DELEGATE.lookupPrefix(namespaceURI); 302 } 303 304 public boolean isDefaultNamespace(String namespaceURI) { 305 return DELEGATE.isDefaultNamespace(namespaceURI); 306 } 307 308 public String lookupNamespaceURI(String prefix) { 309 return DELEGATE.lookupNamespaceURI(prefix); 310 } 311 312 public boolean isEqualNode(Node arg) { 313 return DELEGATE.isEqualNode(arg); 314 } 315 316 public Object getFeature(String feature, String version) { 317 return DELEGATE.getFeature(feature, version); 318 } 319 320 public Object setUserData(String key, Object data, UserDataHandler handler) { 321 return DELEGATE.setUserData(key, data, handler); 322 } 323 324 public Object getUserData(String key) { 325 return DELEGATE.getUserData(key); 326 } 327 } 328 | Popular Tags |