KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gnu > kawa > xml > KDocument


1 // Copyright (c) 2004 Per M.A. Bothner.
2
// This is free software; for terms and warranty disclaimer see ./COPYING.
3

4 package gnu.kawa.xml;
5 import gnu.xml.*;
6 /* #ifdef use:org.w3c.dom.Node */
7 // import org.w3c.dom.*;
8
/* #endif */
9
10 public class KDocument extends KNode
11   /* #ifdef use:org.w3c.dom.Node */
12   // implements org.w3c.dom.Document
13
/* #endif */
14 {
15   public KDocument (NodeTree seq, int ipos)
16   {
17     super(seq, ipos);
18   }
19   
20   public String JavaDoc getNodeName()
21   {
22     return "#document";
23   }
24
25   /* #ifdef use:org.w3c.dom.Node */
26   // public DOMImplementation getImplementation ()
27
// {
28
// throw new UnsupportedOperationException("getImplementation not implemented");
29
// }
30

31   // public DocumentType getDoctype ()
32
// {
33
// return null;
34
// }
35

36   // public Node getParentNode()
37
// {
38
// return null;
39
// }
40

41   // public Element getDocumentElement ()
42
// {
43
// return (Element) getFirstChild();
44
// }
45
/* #endif */
46
47   /* #ifdef use:org.w3c.dom.Node */
48   // public short getNodeType () { return Node.DOCUMENT_NODE; }
49
/* #endif */
50
51   public String JavaDoc getNodeValue()
52   {
53     return null;
54   }
55
56   public String JavaDoc getTextContent ()
57   {
58     return null;
59   }
60
61   protected void getTextContent (StringBuffer JavaDoc sbuf)
62   {
63     // Do nothing.
64
}
65
66   /* #ifdef use:org.w3c.dom.Node */
67   // /** Not implemented. */
68
// public Element createElement (String tagName)
69
// {
70
// throw new UnsupportedOperationException("createElement not implemented");
71
// }
72

73   // /** Not implemented. */
74
// public DocumentFragment createDocumentFragment ()
75
// {
76
// throw new UnsupportedOperationException("createDocumentFragment not implemented");
77
// }
78

79   // /** Not implemented. */
80
// public Text createTextNode (String data)
81
// {
82
// throw new UnsupportedOperationException("createTextNode not implemented");
83
// }
84

85   // /** Not implemented. */
86
// public Comment createComment (String data)
87
// {
88
// throw new UnsupportedOperationException("createComment not implemented");
89
// }
90

91   // /** Not implemented. */
92
// public CDATASection createCDATASection (String data)
93
// {
94
// throw new UnsupportedOperationException("createCDATASection not implemented");
95
// }
96

97   // /** Not implemented. */
98
// public ProcessingInstruction createProcessingInstruction (String target,
99
// String data)
100
// {
101
// throw new UnsupportedOperationException("createProcessingInstruction not implemented");
102
// }
103

104   // /** Not implemented. */
105
// public Attr createAttribute (String name)
106
// {
107
// throw new UnsupportedOperationException("createAttribute not implemented");
108
// }
109

110   // /** Not implemented. */
111
// public EntityReference createEntityReference (String name)
112
// {
113
// throw new UnsupportedOperationException("createEntityReference implemented");
114
// }
115

116   // /** Not implemented. */
117
// public Node importNode (Node importedNode, boolean deep)
118
// {
119
// throw new UnsupportedOperationException("importNode not implemented");
120
// }
121

122   // /** Not implemented. */
123
// public Element createElementNS (String namespaceURI, String qualifiedName)
124
// {
125
// throw new UnsupportedOperationException("createElementNS not implemented");
126

127   // }
128

129   // /** Not implemented. */
130
// public Attr createAttributeNS (String namespaceURI, String qualifiedName)
131
// {
132
// throw new UnsupportedOperationException("createAttributeNS not implemented");
133
// }
134

135   // /** Not implemented yet. */
136
// public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
137
// {
138
// throw new UnsupportedOperationException("getElementsByTagNameNS not implemented yet");
139
// }
140

141   // public Element getElementById (String elementId)
142
// {
143
// return null;
144
// }
145
/* #endif */
146
147   public boolean hasAttributes ()
148   {
149     return false;
150   }
151
152   public String JavaDoc getInputEncoding ()
153   {
154     return null;
155   }
156
157   public String JavaDoc getXmlEncoding ()
158   {
159     return null;
160   }
161
162   public boolean getXmlStandalone ()
163   {
164     return false;
165   }
166
167   public void setXmlStandalone (boolean xmlStandalone)
168   {
169   }
170
171   public String JavaDoc getXmlVersion ()
172   {
173     return "1.1";
174   }
175
176   public void setXmlVersion (String JavaDoc xmlVersion)
177   {
178   }
179
180   public boolean getStrictErrorChecking ()
181   {
182     return false;
183   }
184
185   public void setStrictErrorChecking(boolean strictErrorChecking)
186   {
187   }
188
189   public String JavaDoc getDocumentURI ()
190   {
191     return null;
192   }
193
194   public void setDocumentURI (String JavaDoc documentURI)
195   {
196   }
197
198   /* #ifdef use:org.w3c.dom.Node */
199   // public Node renameNode (Node n, String namespaceURI, String qualifiedname)
200
// throws DOMException
201
// {
202
// throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
203
// "renameNode not implemented");
204
// }
205

206   // public Node adoptNode (Node source)
207
// throws DOMException
208
// {
209
// throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
210
// "adoptNode not implemented");
211
// }
212
/* #endif */
213
214   public void normalizeDocument ()
215   {
216   }
217
218   /* #ifdef JAXP-1.3 */
219   // public DOMConfiguration getDomConfig ()
220
// {
221
// throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
222
// "getDomConfig not implemented");
223
// }
224
/* #endif JAXP-1.3 */
225 }
226
227
Popular Tags