1 19 20 package org.netbeans.tax.dom; 21 22 import java.util.Iterator ; 23 import org.w3c.dom.*; 24 import org.netbeans.tax.*; 25 import org.netbeans.tax.TreeObjectList; 26 27 31 class DocumentImpl extends NodeImpl implements Document{ 32 33 private final TreeDocumentRoot peer; 34 35 36 public DocumentImpl(TreeDocumentRoot peer) { 37 this.peer = peer; 38 } 39 40 55 public Attr createAttribute(String name) throws DOMException { 56 throw new ROException(); 57 } 58 59 121 public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException { 122 throw new ROException(); 123 } 124 125 133 public CDATASection createCDATASection(String data) throws DOMException { 134 throw new ROException(); 135 } 136 137 142 public Comment createComment(String data) { 143 throw new ROException(); 144 } 145 146 150 public DocumentFragment createDocumentFragment() { 151 throw new ROException(); 152 } 153 154 175 public Element createElement(String tagName) throws DOMException { 176 throw new ROException(); 177 } 178 179 233 public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException { 234 throw new ROException(); 235 } 236 237 254 public EntityReference createEntityReference(String name) throws DOMException { 255 throw new ROException(); 256 } 257 258 269 public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException { 270 throw new ROException(); 271 } 272 273 278 public Text createTextNode(String data) { 279 throw new ROException(); 280 } 281 282 292 public DocumentType getDoctype() { 293 return null; } 295 296 301 public Element getDocumentElement() { 302 Iterator it = peer.getChildNodes().iterator(); 303 while (it.hasNext()) { 304 Object next = it.next(); 305 if (next instanceof TreeElement) { 306 return Wrapper.wrap((TreeElement)next); 307 } 308 } 309 return null; 310 } 311 312 325 public Element getElementById(String elementId) { 326 throw new UOException(); 327 } 328 329 338 public NodeList getElementsByTagName(String tagname) { 339 throw new UOException(); } 341 342 354 public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { 355 throw new UOException(); 356 } 357 358 362 public DOMImplementation getImplementation() { 363 return new DOMImplementationImpl(); 364 } 365 366 369 public String getNodeName() { 370 return "#document"; 371 } 372 373 376 public short getNodeType() { 377 return Node.DOCUMENT_NODE; 378 } 379 380 390 public String getNodeValue() throws DOMException { 391 return null; 392 } 393 394 402 public Node getParentNode() { 403 return null; 404 } 405 406 504 public Node importNode(Node importedNode, boolean deep) throws DOMException { 505 throw new UOException(); 506 } 507 508 512 public Node getFirstChild() { 513 return getDocumentElement(); 514 } 515 516 520 public Node getLastChild() { 521 return getDocumentElement(); 522 } 523 524 529 public boolean hasChildNodes() { 530 return getDocumentElement() != null; 531 } 532 533 538 public NodeList getChildNodes() { 539 return Wrapper.wrap(peer.getChildNodes()); 540 } 541 542 546 public Node adoptNode (Node a) { 547 throw new UOException (); 548 } 549 public String getDocumentURI () { 550 throw new UOException (); 551 } 552 public DOMConfiguration getDomConfig() { 553 throw new UOException (); 554 } 555 public String getInputEncoding() { 556 throw new UOException (); 557 } 558 public boolean getStrictErrorChecking() { 559 throw new UOException (); 560 } 561 public String getXmlEncoding () { 562 throw new UOException (); 563 } 564 public boolean getXmlStandalone() { 565 throw new UOException (); 566 } 567 public String getXmlVersion() { 568 throw new UOException (); 569 } 570 public void normalizeDocument() { 571 throw new UOException (); 572 } 573 public Node renameNode(Node a, String nb, String c) { 574 throw new UOException (); 575 } 576 public void setDocumentURI(String a) { 577 throw new UOException (); 578 } 579 public void setStrictErrorChecking(boolean a) { 580 throw new UOException (); 581 } 582 public void setXmlStandalone(boolean a) { 583 throw new UOException (); 584 } 585 public void setXmlVersion(String a) { 586 throw new UOException (); 587 } 588 } 589 | Popular Tags |