1. /*
  2. * The Apache Software License, Version 1.1
  3. *
  4. *
  5. * Copyright (c) 2001, 2002 The Apache Software Foundation. All rights
  6. * reserved.
  7. *
  8. * Redistribution and use in source and binary forms, with or without
  9. * modification, are permitted provided that the following conditions
  10. * are met:
  11. *
  12. * 1. Redistributions of source code must retain the above copyright
  13. * notice, this list of conditions and the following disclaimer.
  14. *
  15. * 2. Redistributions in binary form must reproduce the above copyright
  16. * notice, this list of conditions and the following disclaimer in
  17. * the documentation and/or other materials provided with the
  18. * distribution.
  19. *
  20. * 3. The end-user documentation included with the redistribution,
  21. * if any, must include the following acknowledgment:
  22. * "This product includes software developed by the
  23. * Apache Software Foundation (http://www.apache.org/)."
  24. * Alternately, this acknowledgment may appear in the software itself,
  25. * if and wherever such third-party acknowledgments normally appear.
  26. *
  27. * 4. The names "Xerces" and "Apache Software Foundation" must
  28. * not be used to endorse or promote products derived from this
  29. * software without prior written permission. For written
  30. * permission, please contact apache@apache.org.
  31. *
  32. * 5. Products derived from this software may not be called "Apache",
  33. * nor may "Apache" appear in their name, without prior written
  34. * permission of the Apache Software Foundation.
  35. *
  36. * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  37. * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  38. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  39. * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
  40. * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  41. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  42. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  43. * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  44. * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  45. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  46. * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  47. * SUCH DAMAGE.
  48. * ====================================================================
  49. *
  50. * This software consists of voluntary contributions made by many
  51. * individuals on behalf of the Apache Software Foundation and was
  52. * originally based on software copyright (c) 2001, International
  53. * Business Machines, Inc., http://www.apache.org. For more
  54. * information on the Apache Software Foundation, please see
  55. * <http://www.apache.org/>.
  56. */
  57. package com.sun.org.apache.xerces.internal.impl.xs.opti;
  58. import org.w3c.dom.UserDataHandler;
  59. import org.w3c.dom.Node;
  60. import org.w3c.dom.Document;
  61. import org.w3c.dom.NodeList;
  62. import org.w3c.dom.NamedNodeMap;
  63. import org.w3c.dom.DOMException;
  64. /**
  65. * @author Rahul Srivastava, Sun Microsystems Inc.
  66. *
  67. * @version $Id: DefaultNode.java,v 1.6 2003/06/10 18:09:39 elena Exp $
  68. */
  69. public class DefaultNode implements Node {
  70. // default constructor
  71. public DefaultNode() {
  72. }
  73. //
  74. // org.w3c.dom.Node methods
  75. //
  76. // getter methods
  77. public String getNodeName() {
  78. return null;
  79. }
  80. public String getNodeValue() throws DOMException {
  81. return null;
  82. }
  83. public short getNodeType() {
  84. return -1;
  85. }
  86. public Node getParentNode() {
  87. return null;
  88. }
  89. public NodeList getChildNodes() {
  90. return null;
  91. }
  92. public Node getFirstChild() {
  93. return null;
  94. }
  95. public Node getLastChild() {
  96. return null;
  97. }
  98. public Node getPreviousSibling() {
  99. return null;
  100. }
  101. public Node getNextSibling() {
  102. return null;
  103. }
  104. public NamedNodeMap getAttributes() {
  105. return null;
  106. }
  107. public Document getOwnerDocument() {
  108. return null;
  109. }
  110. public boolean hasChildNodes() {
  111. return false;
  112. }
  113. public Node cloneNode(boolean deep) {
  114. return null;
  115. }
  116. public void normalize() {
  117. }
  118. public boolean isSupported(String feature, String version) {
  119. return false;
  120. }
  121. public String getNamespaceURI() {
  122. return null;
  123. }
  124. public String getPrefix() {
  125. return null;
  126. }
  127. public String getLocalName() {
  128. return null;
  129. }
  130. /** DOM Level 3*/
  131. public String getBaseURI(){
  132. return null;
  133. }
  134. public boolean hasAttributes() {
  135. return false;
  136. }
  137. // setter methods
  138. public void setNodeValue(String nodeValue) throws DOMException {
  139. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  140. }
  141. public Node insertBefore(Node newChild, Node refChild) throws DOMException {
  142. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  143. }
  144. public Node replaceChild(Node newChild, Node oldChild) throws DOMException {
  145. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  146. }
  147. public Node removeChild(Node oldChild) throws DOMException {
  148. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  149. }
  150. public Node appendChild(Node newChild) throws DOMException {
  151. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  152. }
  153. public void setPrefix(String prefix) throws DOMException {
  154. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  155. }
  156. public short compareDocumentPosition(Node other){
  157. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  158. }
  159. public String getTextContent() throws DOMException{
  160. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  161. }
  162. public void setTextContent(String textContent)throws DOMException{
  163. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  164. }
  165. public boolean isSameNode(Node other){
  166. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  167. }
  168. public String lookupPrefix(String namespaceURI){
  169. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  170. }
  171. public boolean isDefaultNamespace(String namespaceURI){
  172. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  173. }
  174. public String lookupNamespaceURI(String prefix){
  175. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  176. }
  177. public boolean isEqualNode(Node arg){
  178. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  179. }
  180. public Object getFeature(String feature, String version){
  181. return null;
  182. }
  183. public Object setUserData(String key, Object data, UserDataHandler handler){
  184. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  185. }
  186. public Object getUserData(String key){
  187. return null;
  188. }
  189. }