KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > w3c > tidy > DOMAttrImpl


1 /*
2  * @(#)DOMAttrImpl.java 1.11 2000/08/16
3  *
4  */

5
6 package org.w3c.tidy;
7
8 import org.w3c.dom.DOMException JavaDoc;
9
10 /**
11  *
12  * DOMAttrImpl
13  *
14  * (c) 1998-2000 (W3C) MIT, INRIA, Keio University
15  * See Tidy.java for the copyright notice.
16  * Derived from <a HREF="http://www.w3.org/People/Raggett/tidy">
17  * HTML Tidy Release 4 Aug 2000</a>
18  *
19  * @author Dave Raggett <dsr@w3.org>
20  * @author Andy Quick <ac.quick@sympatico.ca> (translation to Java)
21  * @version 1.4, 1999/09/04 DOM Support
22  * @version 1.5, 1999/10/23 Tidy Release 27 Sep 1999
23  * @version 1.6, 1999/11/01 Tidy Release 22 Oct 1999
24  * @version 1.7, 1999/12/06 Tidy Release 30 Nov 1999
25  * @version 1.8, 2000/01/22 Tidy Release 13 Jan 2000
26  * @version 1.9, 2000/06/03 Tidy Release 30 Apr 2000
27  * @version 1.10, 2000/07/22 Tidy Release 8 Jul 2000
28  * @version 1.11, 2000/08/16 Tidy Release 4 Aug 2000
29  */

30
31 public class DOMAttrImpl extends DOMNodeImpl implements org.w3c.dom.Attr JavaDoc {
32
33     protected AttVal avAdaptee;
34
35     protected DOMAttrImpl(AttVal adaptee)
36     {
37         super(null); // must override all methods of DOMNodeImpl
38
this.avAdaptee = adaptee;
39     }
40
41
42     /* --------------------- DOM ---------------------------- */
43
44     public String JavaDoc getNodeValue() throws DOMException JavaDoc
45     {
46         return getValue();
47     }
48
49     public void setNodeValue(String JavaDoc nodeValue) throws DOMException JavaDoc
50     {
51         setValue(nodeValue);
52     }
53
54     public String JavaDoc getNodeName()
55     {
56         return getName();
57     }
58
59     public short getNodeType()
60     {
61         return org.w3c.dom.Node.ATTRIBUTE_NODE;
62     }
63
64     public org.w3c.dom.Node JavaDoc getParentNode()
65     {
66         return null;
67     }
68
69     public org.w3c.dom.NodeList JavaDoc getChildNodes()
70     {
71         // NOT SUPPORTED
72
return null;
73     }
74
75     public org.w3c.dom.Node JavaDoc getFirstChild()
76     {
77         // NOT SUPPORTED
78
return null;
79     }
80
81     public org.w3c.dom.Node JavaDoc getLastChild()
82     {
83         // NOT SUPPORTED
84
return null;
85     }
86
87     public org.w3c.dom.Node JavaDoc getPreviousSibling()
88     {
89         return null;
90     }
91
92     public org.w3c.dom.Node JavaDoc getNextSibling()
93     {
94         return null;
95     }
96
97     public org.w3c.dom.NamedNodeMap JavaDoc getAttributes()
98     {
99         return null;
100     }
101
102     public org.w3c.dom.Document JavaDoc getOwnerDocument()
103     {
104         return null;
105     }
106
107     public org.w3c.dom.Node JavaDoc insertBefore(org.w3c.dom.Node JavaDoc newChild,
108                                          org.w3c.dom.Node JavaDoc refChild)
109                                              throws DOMException JavaDoc
110     {
111         throw new DOMExceptionImpl(DOMException.NO_MODIFICATION_ALLOWED_ERR,
112                                    "Not supported");
113     }
114
115     public org.w3c.dom.Node JavaDoc replaceChild(org.w3c.dom.Node JavaDoc newChild,
116                                          org.w3c.dom.Node JavaDoc oldChild)
117                                              throws DOMException JavaDoc
118     {
119         throw new DOMExceptionImpl(DOMException.NO_MODIFICATION_ALLOWED_ERR,
120                                    "Not supported");
121     }
122
123     public org.w3c.dom.Node JavaDoc removeChild(org.w3c.dom.Node JavaDoc oldChild)
124                                             throws DOMException JavaDoc
125     {
126         throw new DOMExceptionImpl(DOMException.NO_MODIFICATION_ALLOWED_ERR,
127                                    "Not supported");
128     }
129
130     public org.w3c.dom.Node JavaDoc appendChild(org.w3c.dom.Node JavaDoc newChild)
131                                             throws DOMException JavaDoc
132     {
133         throw new DOMExceptionImpl(DOMException.NO_MODIFICATION_ALLOWED_ERR,
134                                    "Not supported");
135     }
136
137     public boolean hasChildNodes()
138     {
139         return false;
140     }
141
142     public org.w3c.dom.Node JavaDoc cloneNode(boolean deep)
143     {
144         return null;
145     }
146
147     /**
148      * @see org.w3c.dom.Attr#getName
149      */

150     public String JavaDoc getName()
151     {
152         return avAdaptee.attribute;
153     }
154
155     /**
156      * @see org.w3c.dom.Attr#getSpecified
157      */

158     public boolean getSpecified()
159     {
160         return true;
161     }
162
163     /**
164      * Returns value of this attribute. If this attribute has a null value,
165      * then the attribute name is returned instead.
166      * Thanks to Brett Knights <brett@knightsofthenet.com> for this fix.
167      * @see org.w3c.dom.Attr#getValue
168      *
169      */

170     public String JavaDoc getValue()
171     {
172         return (avAdaptee.value == null) ? avAdaptee.attribute : avAdaptee.value ;
173     }
174
175     /**
176      * @see org.w3c.dom.Attr#setValue
177      */

178     public void setValue(String JavaDoc value)
179     {
180         avAdaptee.value = value;
181     }
182
183     /**
184      * DOM2 - not implemented.
185      */

186     public org.w3c.dom.Element JavaDoc getOwnerElement() {
187     return null;
188     }
189
190     public boolean isId() {
191       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl isId() Not implemented");
192     }
193
194     public org.w3c.dom.TypeInfo JavaDoc getSchemaTypeInfo() {
195       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl getSchemaTypeInfo() Not implemented");
196     }
197
198     public org.w3c.dom.Node JavaDoc adoptNode (org.w3c.dom.Node JavaDoc oNode) {
199       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl adoptNode() Not implemented");
200     }
201
202     public short compareDocumentPosition (org.w3c.dom.Node JavaDoc oNode) {
203       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl compareDocumentPosition() Not implemented");
204     }
205
206     public boolean isDefaultNamespace(String JavaDoc sStr1) {
207       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl isDefaultNamespace() Not implemented");
208     }
209
210     public boolean isEqualNode(org.w3c.dom.Node JavaDoc oNode) {
211       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl isEqualNode() Not implemented");
212     }
213
214     public boolean isSameNode(org.w3c.dom.Node JavaDoc oNode) {
215       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl isSameNode() Not implemented");
216     }
217
218     public String JavaDoc lookupPrefix(String JavaDoc sStr1) {
219       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl lookupPreffix() Not implemented");
220     }
221
222     public String JavaDoc lookupNamespaceURI(String JavaDoc sStr1) {
223       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl lookupNamespaceURI() Not implemented");
224     }
225
226     public String JavaDoc getDocumentURI() {
227       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl getDocumentURI() Not implemented");
228     }
229
230     public void setDocumentURI(String JavaDoc sStr1) {
231       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl setDocumentURI() Not implemented");
232     }
233
234     public boolean getStrictErrorChecking() {
235       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl getStrictErrorChecking() Not implemented");
236     }
237
238     public void setStrictErrorChecking(boolean bStrictCheck) {
239       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl setStrictErrorChecking() Not implemented");
240     }
241
242     public boolean getXmlStandalone() {
243       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl getXmlStandalone() Not implemented");
244     }
245
246     public void setXmlStandalone(boolean bXmlStandalone) {
247       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl setXmlStandalone() Not implemented");
248     }
249
250     public Object JavaDoc getFeature(String JavaDoc sStr1, String JavaDoc sStr2) {
251       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl getFeature() Not implemented");
252     }
253
254     public String JavaDoc getInputEncoding() {
255       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl getInputEncoding() Not implemented");
256     }
257
258     public String JavaDoc getXmlEncoding() {
259       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl getXmlEncoding() Not implemented");
260     }
261
262     public String JavaDoc getXmlVersion() {
263       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl getXmlVersion() Not implemented");
264     }
265
266     public void setXmlVersion(String JavaDoc sStr1) {
267       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl setXmlVersion() Not implemented");
268     }
269
270     public Object JavaDoc getUserData(String JavaDoc sStr1) {
271       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl getUserData() Not implemented");
272     }
273
274     public Object JavaDoc setUserData(String JavaDoc sStr1, Object JavaDoc oObj2, org.w3c.dom.UserDataHandler JavaDoc oHndlr) {
275       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl setUserData() Not implemented");
276     }
277
278     public org.w3c.dom.DOMConfiguration JavaDoc getDomConfig () {
279       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl getDomConfig() Not implemented");
280     }
281
282     public void normalizeDocument () {
283       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl normalizeDocument() Not implemented");
284     }
285
286     public org.w3c.dom.Node JavaDoc renameNode (org.w3c.dom.Node JavaDoc oNode, String JavaDoc sStr1, String JavaDoc sStr2) {
287       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl renameNode() Not implemented");
288     }
289
290     public String JavaDoc getBaseURI() {
291       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl getBaseURI() Not implemented");
292     }
293
294     public String JavaDoc getTextContent() {
295       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl getTextContent() Not implemented");
296     }
297
298     public void setTextContent(String JavaDoc sStr1) {
299       throw new UnsupportedOperationException JavaDoc("org.w3c.tidy.DOMAttrImpl setTextContent() Not implemented");
300     }
301
302 }
303
Popular Tags