1 5 package com.opensymphony.webwork.views.xslt; 6 7 import org.w3c.dom.*; 8 9 10 15 public class DocumentAdapter extends DefaultAdapterNode implements Document { 16 18 private BeanAdapter rootElement; 19 20 22 public DocumentAdapter(DOMAdapter rootAdapter, AdapterNode parent, String propertyName, Object value) { 23 super(rootAdapter, parent, propertyName, value); 24 rootElement = new BeanAdapter(getRootAdapter(), this, getPropertyName(), getValue()); 25 } 26 27 29 public NodeList getChildNodes() { 30 return new NodeList() { 31 public Node item(int i) { 32 return rootElement; 33 } 34 35 public int getLength() { 36 return 1; 37 } 38 }; 39 } 40 41 public DocumentType getDoctype() { 42 return null; 43 } 44 45 public Element getDocumentElement() { 46 return rootElement; 47 } 48 49 public Element getElementById(String string) { 50 return null; 51 } 52 53 public NodeList getElementsByTagName(String string) { 54 return null; 55 } 56 57 public NodeList getElementsByTagNameNS(String string, String string1) { 58 return null; 59 } 60 61 public Node getFirstChild() { 62 return rootElement; 63 } 64 65 public DOMImplementation getImplementation() { 66 return null; 67 } 68 69 public Node getLastChild() { 70 return rootElement; 71 } 72 73 public Node getNextSibling(AdapterNode value) { 74 return null; 75 } 76 77 public String getNodeName() { 78 return "#document"; 79 } 80 81 public short getNodeType() { 82 return Node.DOCUMENT_NODE; 83 } 84 85 public Attr createAttribute(String string) throws DOMException { 86 return null; 87 } 88 89 public Attr createAttributeNS(String string, String string1) throws DOMException { 90 return null; 91 } 92 93 public CDATASection createCDATASection(String string) throws DOMException { 94 return null; 95 } 96 97 public Comment createComment(String string) { 98 return null; 99 } 100 101 public DocumentFragment createDocumentFragment() { 102 return null; 103 } 104 105 public Element createElement(String string) throws DOMException { 106 return null; 107 } 108 109 public Element createElementNS(String string, String string1) throws DOMException { 110 return null; 111 } 112 113 public EntityReference createEntityReference(String string) throws DOMException { 114 return null; 115 } 116 117 public ProcessingInstruction createProcessingInstruction(String string, String string1) throws DOMException { 118 return null; 119 } 120 121 public Text createTextNode(String string) { 122 return null; 123 } 124 125 public boolean hasChildNodes() { 126 return true; 127 } 128 129 public Node importNode(Node node, boolean b) throws DOMException { 130 return null; 131 } 132 133 public boolean isWhitespaceInElementContent() { 134 return true; 135 } 136 } 137 | Popular Tags |