001: package com.rimfaxe.xml.compatibility;
002:
003: import org.w3c.dom.Attr;
004: import org.w3c.dom.Element;
005: import org.w3c.dom.Node;
006: import org.w3c.dom.NamedNodeMap;
007: import org.w3c.dom.NodeList;
008: import org.w3c.dom.Document;
009: import org.w3c.dom.UserDataHandler;
010:
011: /**
012: * Wrapper around sparta attribute.
013:
014: <blockquote><small> Copyright (C) 2002 Hewlett-Packard Company.
015: This file is part of Sparta, an XML Parser, DOM, and XPath library.
016: This library is free software; you can redistribute it and/or
017: modify it under the terms of the <a href="doc-files/LGPL.txt">GNU
018: Lesser General Public License</a> as published by the Free Software
019: Foundation; either version 2.1 of the License, or (at your option)
020: any later version. This library is distributed in the hope that it
021: will be useful, but WITHOUT ANY WARRANTY; without even the implied
022: warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
023: PURPOSE. </small></blockquote>
024: @version $Date: 2002/08/19 05:04:19 $ $Revision: 1.1.1.1 $
025: @author Eamonn O'Brien-Strain */
026:
027: public class AttrImpl implements Attr {
028:
029: AttrImpl(ElementImpl element, String name, String value) {
030: element_ = element;
031: name_ = name;
032: value_ = value;
033: }
034:
035: public String getName() {
036: return name_;
037: }
038:
039: public Element getOwnerElement() {
040: /**@todo: Implement this org.w3c.dom.Attr method*/
041: throw new Error("getOwnerElement");
042: }
043:
044: public boolean getSpecified() {
045: /**@todo: Implement this org.w3c.dom.Attr method*/
046: throw new Error("getSpecified");
047: }
048:
049: public String getValue() {
050: return value_;
051: }
052:
053: public void setValue(String parm1) throws org.w3c.dom.DOMException {
054: /**@todo: Implement this org.w3c.dom.Attr method*/
055: throw new Error("setValue");
056: }
057:
058: public Node appendChild(Node parm1) throws org.w3c.dom.DOMException {
059: /**@todo: Implement this org.w3c.dom.Node method*/
060: throw new Error("appendChild");
061: }
062:
063: public Node cloneNode(boolean parm1) {
064: /**@todo: Implement this org.w3c.dom.Node method*/
065: throw new Error("cloneNode");
066: }
067:
068: public NamedNodeMap getAttributes() {
069: /**@todo: Implement this org.w3c.dom.Node method*/
070: throw new Error("getAttributes");
071: }
072:
073: public NodeList getChildNodes() {
074: /**@todo: Implement this org.w3c.dom.Node method*/
075: throw new Error("getChildNodes");
076: }
077:
078: public Node getFirstChild() {
079: return null;
080: }
081:
082: public Node getLastChild() {
083: return null;
084: }
085:
086: public String getLocalName() {
087: return null;
088: }
089:
090: public String getNamespaceURI() {
091: return null;
092: }
093:
094: public Node getNextSibling() {
095: /**@todo: Implement this org.w3c.dom.Node method*/
096: throw new Error("getNextSibling");
097: }
098:
099: public String getNodeName() {
100: return name_;
101: }
102:
103: public short getNodeType() {
104: return Node.ATTRIBUTE_NODE;
105: }
106:
107: public String getNodeValue() throws org.w3c.dom.DOMException {
108: return value_;
109: }
110:
111: public Document getOwnerDocument() {
112: /**@todo: Implement this org.w3c.dom.Node method*/
113: throw new Error("getOwnerDocument");
114: }
115:
116: public Node getParentNode() {
117: return element_;
118: }
119:
120: public String getPrefix() {
121: /**@todo: Implement this org.w3c.dom.Node method*/
122: throw new Error("getPrefix");
123: }
124:
125: public Node getPreviousSibling() {
126: /**@todo: Implement this org.w3c.dom.Node method*/
127: throw new Error("getPreviousSibling");
128: }
129:
130: public boolean hasAttributes() {
131: /**@todo: Implement this org.w3c.dom.Node method*/
132: throw new Error("hasAttributes");
133: }
134:
135: public boolean hasChildNodes() {
136: /**@todo: Implement this org.w3c.dom.Node method*/
137: throw new Error("hasChildNodes");
138: }
139:
140: public Node insertBefore(Node parm1, Node parm2)
141: throws org.w3c.dom.DOMException {
142: /**@todo: Implement this org.w3c.dom.Node method*/
143: throw new Error("insertBefore");
144: }
145:
146: public boolean isSupported(String feature, String version) {
147: if (feature.equals("NodeTestFilter"))
148: return false;
149: throw new Error("Method isSupported(" + feature + "," + version
150: + ") not known.");
151: }
152:
153: public void normalize() {
154: /**@todo: Implement this org.w3c.dom.Node method*/
155: throw new Error("normalize");
156: }
157:
158: public Node removeChild(Node parm1) throws org.w3c.dom.DOMException {
159: /**@todo: Implement this org.w3c.dom.Node method*/
160: throw new Error("removeChild");
161: }
162:
163: public Node replaceChild(Node parm1, Node parm2)
164: throws org.w3c.dom.DOMException {
165: /**@todo: Implement this org.w3c.dom.Node method*/
166: throw new Error("replaceChild");
167: }
168:
169: public void setNodeValue(String parm1)
170: throws org.w3c.dom.DOMException {
171: /**@todo: Implement this org.w3c.dom.Node method*/
172: throw new Error("setNodeValue");
173: }
174:
175: public void setPrefix(String parm1) throws org.w3c.dom.DOMException {
176: /**@todo: Implement this org.w3c.dom.Node method*/
177: throw new Error("setPrefix");
178: }
179:
180: //////////////////////////////////////////////////////////////
181: // BEGIN DOM 3
182:
183: public String getBaseURI() {
184: throw new Error("not implemented");
185: }
186:
187: public short compareTreePosition(Node other) {
188: throw new Error("not implemented");
189: }
190:
191: public String getTextContent() throws org.w3c.dom.DOMException {
192: throw new Error("not implemented");
193: }
194:
195: public void setTextContent(String textContent)
196: throws org.w3c.dom.DOMException {
197: throw new Error("not implemented");
198: }
199:
200: public boolean isSameNode(Node other) {
201: throw new Error("not implemented");
202: }
203:
204: public String lookupNamespacePrefix(String namespaceURI) {
205: throw new Error("not implemented");
206: }
207:
208: public String lookupNamespaceURI(String prefix) {
209: throw new Error("not implemented");
210: }
211:
212: public boolean isEqualNode(Node arg, boolean deep) {
213: throw new Error("not implemented");
214: }
215:
216: public Node getInterface(String feature) {
217: throw new Error("not implemented");
218: }
219:
220: public Object setUserData(String key, Object data,
221: UserDataHandler handler) {
222: throw new Error("not implemented");
223: }
224:
225: public Object getUserData(String key) {
226: throw new Error("not implemented");
227: }
228:
229: //END DOM 3
230: //////////////////////////////////////////////////////////////////
231:
232: private final ElementImpl element_;
233: private final String name_;
234: private final String value_;
235: }
236:
237: // $Log: AttrImpl.java,v $
238: // Revision 1.1.1.1 2002/08/19 05:04:19 eobrain
239: // import from HP Labs internal CVS
240: //
241: // Revision 1.6 2002/08/19 00:37:38 eob
242: // Tweak javadoc comment.
243: //
244: // Revision 1.5 2002/08/18 05:45:17 eob
245: // Add copyright and other formatting and commenting in preparation for
246: // release to SourceForge.
247: //
248: // Revision 1.4 2002/06/21 00:30:45 eob
249: // Make work with old JDK 1.1.*
250: //
251: // Revision 1.3 2002/02/08 20:32:37 eob
252: // Added extra DOM3 stuff.
253: //
254: // Revision 1.2 2002/01/22 18:28:37 eob
255: // Implement getFirstChild/getLastChild
256: //
257: // Revision 1.1 2002/01/04 19:56:49 eob
258: // initial
|