001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.xerces.impl.xs.opti;
019:
020: import org.w3c.dom.UserDataHandler;
021: import org.w3c.dom.Node;
022: import org.w3c.dom.Document;
023: import org.w3c.dom.NodeList;
024: import org.w3c.dom.NamedNodeMap;
025:
026: import org.w3c.dom.DOMException;
027:
028: /**
029: * @xerces.internal
030: *
031: * @author Rahul Srivastava, Sun Microsystems Inc.
032: *
033: * @version $Id: DefaultNode.java 446728 2006-09-15 20:43:46Z mrglavas $
034: */
035: public class DefaultNode implements Node {
036:
037: // default constructor
038: public DefaultNode() {
039: }
040:
041: //
042: // org.w3c.dom.Node methods
043: //
044:
045: // getter methods
046: public String getNodeName() {
047: return null;
048: }
049:
050: public String getNodeValue() throws DOMException {
051: return null;
052: }
053:
054: public short getNodeType() {
055: return -1;
056: }
057:
058: public Node getParentNode() {
059: return null;
060: }
061:
062: public NodeList getChildNodes() {
063: return null;
064: }
065:
066: public Node getFirstChild() {
067: return null;
068: }
069:
070: public Node getLastChild() {
071: return null;
072: }
073:
074: public Node getPreviousSibling() {
075: return null;
076: }
077:
078: public Node getNextSibling() {
079: return null;
080: }
081:
082: public NamedNodeMap getAttributes() {
083: return null;
084: }
085:
086: public Document getOwnerDocument() {
087: return null;
088: }
089:
090: public boolean hasChildNodes() {
091: return false;
092: }
093:
094: public Node cloneNode(boolean deep) {
095: return null;
096: }
097:
098: public void normalize() {
099: }
100:
101: public boolean isSupported(String feature, String version) {
102: return false;
103: }
104:
105: public String getNamespaceURI() {
106: return null;
107: }
108:
109: public String getPrefix() {
110: return null;
111: }
112:
113: public String getLocalName() {
114: return null;
115: }
116:
117: /** DOM Level 3*/
118: public String getBaseURI() {
119: return null;
120: }
121:
122: public boolean hasAttributes() {
123: return false;
124: }
125:
126: // setter methods
127: public void setNodeValue(String nodeValue) throws DOMException {
128: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
129: "Method not supported");
130: }
131:
132: public Node insertBefore(Node newChild, Node refChild)
133: throws DOMException {
134: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
135: "Method not supported");
136: }
137:
138: public Node replaceChild(Node newChild, Node oldChild)
139: throws DOMException {
140: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
141: "Method not supported");
142: }
143:
144: public Node removeChild(Node oldChild) throws DOMException {
145: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
146: "Method not supported");
147: }
148:
149: public Node appendChild(Node newChild) throws DOMException {
150: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
151: "Method not supported");
152: }
153:
154: public void setPrefix(String prefix) throws DOMException {
155: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
156: "Method not supported");
157: }
158:
159: public short compareDocumentPosition(Node other) {
160: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
161: "Method not supported");
162: }
163:
164: public String getTextContent() throws DOMException {
165: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
166: "Method not supported");
167: }
168:
169: public void setTextContent(String textContent) throws DOMException {
170: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
171: "Method not supported");
172: }
173:
174: public boolean isSameNode(Node other) {
175: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
176: "Method not supported");
177:
178: }
179:
180: public String lookupPrefix(String namespaceURI) {
181: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
182: "Method not supported");
183: }
184:
185: public boolean isDefaultNamespace(String namespaceURI) {
186: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
187: "Method not supported");
188: }
189:
190: public String lookupNamespaceURI(String prefix) {
191: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
192: "Method not supported");
193: }
194:
195: public boolean isEqualNode(Node arg) {
196: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
197: "Method not supported");
198:
199: }
200:
201: public Object getFeature(String feature, String version) {
202: return null;
203: }
204:
205: public Object setUserData(String key, Object data,
206: UserDataHandler handler) {
207: throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
208: "Method not supported");
209: }
210:
211: public Object getUserData(String key) {
212: return null;
213: }
214:
215: }
|