KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > views > xslt > DocumentAdapter


1 /*
2  * Copyright (c) 2002-2003 by OpenSymphony
3  * All rights reserved.
4  */

5 package com.opensymphony.webwork.views.xslt;
6
7 import org.w3c.dom.*;
8
9
10 /**
11  * @author <a HREF="mailto:meier@meisterbohne.de">Philipp Meier</a>
12  * Date: 14.10.2003
13  * Time: 17:24:05
14  */

15 public class DocumentAdapter extends DefaultAdapterNode implements Document {
16     //~ Instance fields ////////////////////////////////////////////////////////
17

18     private BeanAdapter rootElement;
19
20     //~ Constructors ///////////////////////////////////////////////////////////
21

22     public DocumentAdapter(DOMAdapter rootAdapter, AdapterNode parent, String JavaDoc propertyName, Object JavaDoc value) {
23         super(rootAdapter, parent, propertyName, value);
24         rootElement = new BeanAdapter(getRootAdapter(), this, getPropertyName(), getValue());
25     }
26
27     //~ Methods ////////////////////////////////////////////////////////////////
28

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 JavaDoc string) {
50         return null;
51     }
52
53     public NodeList getElementsByTagName(String JavaDoc string) {
54         return null;
55     }
56
57     public NodeList getElementsByTagNameNS(String JavaDoc string, String JavaDoc 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 JavaDoc getNodeName() {
78         return "#document";
79     }
80
81     public short getNodeType() {
82         return Node.DOCUMENT_NODE;
83     }
84
85     public Attr createAttribute(String JavaDoc string) throws DOMException {
86         return null;
87     }
88
89     public Attr createAttributeNS(String JavaDoc string, String JavaDoc string1) throws DOMException {
90         return null;
91     }
92
93     public CDATASection createCDATASection(String JavaDoc string) throws DOMException {
94         return null;
95     }
96
97     public Comment createComment(String JavaDoc string) {
98         return null;
99     }
100
101     public DocumentFragment createDocumentFragment() {
102         return null;
103     }
104
105     public Element createElement(String JavaDoc string) throws DOMException {
106         return null;
107     }
108
109     public Element createElementNS(String JavaDoc string, String JavaDoc string1) throws DOMException {
110         return null;
111     }
112
113     public EntityReference createEntityReference(String JavaDoc string) throws DOMException {
114         return null;
115     }
116
117     public ProcessingInstruction createProcessingInstruction(String JavaDoc string, String JavaDoc string1) throws DOMException {
118         return null;
119     }
120
121     public Text createTextNode(String JavaDoc 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