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.DOMConfiguration;
  59. import org.w3c.dom.Attr;
  60. import org.w3c.dom.Node;
  61. import org.w3c.dom.Text;
  62. import org.w3c.dom.Element;
  63. import org.w3c.dom.Comment;
  64. import org.w3c.dom.Document;
  65. import org.w3c.dom.NodeList;
  66. import org.w3c.dom.DocumentType;
  67. import org.w3c.dom.CDATASection;
  68. import org.w3c.dom.EntityReference;
  69. import org.w3c.dom.DocumentFragment;
  70. import org.w3c.dom.DOMImplementation;
  71. import org.w3c.dom.ProcessingInstruction;
  72. import org.w3c.dom.DOMException;
  73. /**
  74. * @author Rahul Srivastava, Sun Microsystems Inc.
  75. *
  76. * @version $Id: DefaultDocument.java,v 1.5 2003/11/13 22:47:16 elena Exp $
  77. */
  78. public class DefaultDocument extends NodeImpl
  79. implements Document {
  80. // default constructor
  81. public DefaultDocument() {
  82. }
  83. //
  84. // org.w3c.dom.Document methods
  85. //
  86. public DocumentType getDoctype() {
  87. return null;
  88. }
  89. public DOMImplementation getImplementation() {
  90. return null;
  91. }
  92. public Element getDocumentElement() {
  93. return null;
  94. }
  95. public NodeList getElementsByTagName(String tagname) {
  96. return null;
  97. }
  98. public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
  99. return null;
  100. }
  101. public Element getElementById(String elementId) {
  102. return null;
  103. }
  104. public Node importNode(Node importedNode, boolean deep) throws DOMException {
  105. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  106. }
  107. public Element createElement(String tagName) throws DOMException {
  108. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  109. }
  110. public DocumentFragment createDocumentFragment() {
  111. return null;
  112. }
  113. public Text createTextNode(String data) {
  114. return null;
  115. }
  116. public Comment createComment(String data) {
  117. return null;
  118. }
  119. public CDATASection createCDATASection(String data) throws DOMException {
  120. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  121. }
  122. public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException {
  123. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  124. }
  125. public Attr createAttribute(String name) throws DOMException {
  126. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  127. }
  128. public EntityReference createEntityReference(String name) throws DOMException {
  129. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  130. }
  131. public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException {
  132. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  133. }
  134. public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException {
  135. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  136. }
  137. // DOM Level 3 methods.
  138. public String getInputEncoding(){
  139. return null;
  140. }
  141. /**
  142. public void setInputEncoding(String actualEncoding){
  143. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  144. }
  145. */
  146. public String getXmlEncoding(){
  147. return null;
  148. }
  149. /**
  150. * An attribute specifying, as part of the XML declaration, the encoding
  151. * of this document. This is <code>null</code> when unspecified.
  152. * @since DOM Level 3
  153. public void setXmlEncoding(String encoding){
  154. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  155. }
  156. */
  157. /**
  158. * An attribute specifying, as part of the XML declaration, whether this
  159. * document is standalone.
  160. * <br> This attribute represents the property [standalone] defined in .
  161. * @since DOM Level 3
  162. */
  163. public boolean getXmlStandalone(){
  164. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  165. }
  166. /**
  167. * An attribute specifying, as part of the XML declaration, whether this
  168. * document is standalone.
  169. * <br> This attribute represents the property [standalone] defined in .
  170. * @since DOM Level 3
  171. */
  172. public void setXmlStandalone(boolean standalone){
  173. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  174. }
  175. /**
  176. * An attribute specifying, as part of the XML declaration, the version
  177. * number of this document. This is <code>null</code> when unspecified.
  178. * <br> This attribute represents the property [version] defined in .
  179. * @exception DOMException
  180. * NOT_SUPPORTED_ERR: Raised if the version is set to a value that is
  181. * not supported by this <code>Document</code>.
  182. * @since DOM Level 3
  183. */
  184. public String getXmlVersion(){
  185. return null;
  186. }
  187. /**
  188. * An attribute specifying, as part of the XML declaration, the version
  189. * number of this document. This is <code>null</code> when unspecified.
  190. * <br> This attribute represents the property [version] defined in .
  191. * @exception DOMException
  192. * NOT_SUPPORTED_ERR: Raised if the version is set to a value that is
  193. * not supported by this <code>Document</code>.
  194. * @since DOM Level 3
  195. */
  196. public void setXmlVersion(String version) throws DOMException{
  197. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  198. }
  199. /**
  200. * An attribute specifying whether errors checking is enforced or not.
  201. * When set to <code>false</code>, the implementation is free to not
  202. * test every possible error case normally defined on DOM operations,
  203. * and not raise any <code>DOMException</code>. In case of error, the
  204. * behavior is undefined. This attribute is <code>true</code> by
  205. * defaults.
  206. * @since DOM Level 3
  207. */
  208. public boolean getStrictErrorChecking(){
  209. return false;
  210. }
  211. /**
  212. * An attribute specifying whether errors checking is enforced or not.
  213. * When set to <code>false</code>, the implementation is free to not
  214. * test every possible error case normally defined on DOM operations,
  215. * and not raise any <code>DOMException</code>. In case of error, the
  216. * behavior is undefined. This attribute is <code>true</code> by
  217. * defaults.
  218. * @since DOM Level 3
  219. */
  220. public void setStrictErrorChecking(boolean strictErrorChecking){
  221. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  222. }
  223. /**
  224. * The location of the document or <code>null</code> if undefined.
  225. * <br>Beware that when the <code>Document</code> supports the feature
  226. * "HTML" , the href attribute of the HTML BASE element takes precedence
  227. * over this attribute.
  228. * @since DOM Level 3
  229. */
  230. public String getDocumentURI(){
  231. return null;
  232. }
  233. /**
  234. * The location of the document or <code>null</code> if undefined.
  235. * <br>Beware that when the <code>Document</code> supports the feature
  236. * "HTML" , the href attribute of the HTML BASE element takes precedence
  237. * over this attribute.
  238. * @since DOM Level 3
  239. */
  240. public void setDocumentURI(String documentURI){
  241. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  242. }
  243. /** DOM Level 3*/
  244. public Node adoptNode(Node source) throws DOMException{
  245. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  246. }
  247. /** DOM Level 3*/
  248. public void normalizeDocument(){
  249. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  250. }
  251. /**
  252. * The configuration used when <code>Document.normalizeDocument</code> is
  253. * invoked.
  254. * @since DOM Level 3
  255. */
  256. public DOMConfiguration getDomConfig(){
  257. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  258. }
  259. /** DOM Level 3*/
  260. public Node renameNode(Node n,String namespaceURI, String name) throws DOMException{
  261. throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported");
  262. }
  263. }