1/* 2 * reserved comment block 3 * DO NOT REMOVE OR ALTER! 4 */ 5/* 6 * Licensed to the Apache Software Foundation (ASF) under one or more 7 * contributor license agreements. See the NOTICE file distributed with 8 * this work for additional information regarding copyright ownership. 9 * The ASF licenses this file to You under the Apache License, Version 2.0 10 * (the "License"); you may not use this file except in compliance with 11 * the License. You may obtain a copy of the License at 12 * 13 * http://www.apache.org/licenses/LICENSE-2.0 14 * 15 * Unless required by applicable law or agreed to in writing, software 16 * distributed under the License is distributed on an "AS IS" BASIS, 17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 18 * See the License for the specific language governing permissions and 19 * limitations under the License. 20 */ 21 22package com.sun.org.apache.xerces.internal.impl.xs.opti; 23 24import org.w3c.dom.DOMConfiguration; 25import org.w3c.dom.Attr; 26import org.w3c.dom.Node; 27import org.w3c.dom.Text; 28import org.w3c.dom.Element; 29import org.w3c.dom.Comment; 30import org.w3c.dom.Document; 31import org.w3c.dom.NodeList; 32import org.w3c.dom.DocumentType; 33import org.w3c.dom.CDATASection; 34import org.w3c.dom.EntityReference; 35import org.w3c.dom.DocumentFragment; 36import org.w3c.dom.DOMImplementation; 37import org.w3c.dom.ProcessingInstruction; 38 39import org.w3c.dom.DOMException; 40 41 42/** 43 * @xerces.internal 44 * 45 * @author Rahul Srivastava, Sun Microsystems Inc. 46 * 47 */ 48public class DefaultDocument extends NodeImpl 49 implements Document { 50 51 private String fDocumentURI = null; 52 53 // default constructor 54 public DefaultDocument() { 55 } 56 57 // 58 // org.w3c.dom.Document methods 59 // 60 61 public DocumentType getDoctype() { 62 return null; 63 } 64 65 66 public DOMImplementation getImplementation() { 67 return null; 68 } 69 70 71 public Element getDocumentElement() { 72 return null; 73 } 74 75 76 public NodeList getElementsByTagName(String tagname) { 77 return null; 78 } 79 80 81 public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { 82 return null; 83 } 84 85 86 public Element getElementById(String elementId) { 87 return null; 88 } 89 90 91 public Node importNode(Node importedNode, boolean deep) throws DOMException { 92 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 93 } 94 95 96 public Element createElement(String tagName) throws DOMException { 97 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 98 } 99 100 101 public DocumentFragment createDocumentFragment() { 102 return null; 103 } 104 105 106 public Text createTextNode(String data) { 107 return null; 108 } 109 110 public Comment createComment(String data) { 111 return null; 112 } 113 114 115 public CDATASection createCDATASection(String data) throws DOMException { 116 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 117 } 118 119 120 public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException { 121 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 122 } 123 124 125 public Attr createAttribute(String name) throws DOMException { 126 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 127 } 128 129 130 public EntityReference createEntityReference(String name) throws DOMException { 131 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 132 } 133 134 135 public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException { 136 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 137 } 138 139 140 public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException { 141 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 142 } 143 144 // DOM Level 3 methods. 145 146 public String getInputEncoding(){ 147 return null; 148 } 149 150 /** 151 public void setInputEncoding(String actualEncoding){ 152 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 153 } 154 */ 155 156 public String getXmlEncoding(){ 157 return null; 158 } 159 160 161 /** 162 * An attribute specifying, as part of the XML declaration, the encoding 163 * of this document. This is <code>null</code> when unspecified. 164 * @since DOM Level 3 165 public void setXmlEncoding(String encoding){ 166 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 167 } 168 */ 169 170 /** 171 * An attribute specifying, as part of the XML declaration, whether this 172 * document is standalone. 173 * <br> This attribute represents the property [standalone] defined in . 174 * @since DOM Level 3 175 */ 176 public boolean getXmlStandalone(){ 177 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 178 } 179 /** 180 * An attribute specifying, as part of the XML declaration, whether this 181 * document is standalone. 182 * <br> This attribute represents the property [standalone] defined in . 183 * @since DOM Level 3 184 */ 185 public void setXmlStandalone(boolean standalone){ 186 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 187 } 188 189 /** 190 * An attribute specifying, as part of the XML declaration, the version 191 * number of this document. This is <code>null</code> when unspecified. 192 * <br> This attribute represents the property [version] defined in . 193 * @exception DOMException 194 * NOT_SUPPORTED_ERR: Raised if the version is set to a value that is 195 * not supported by this <code>Document</code>. 196 * @since DOM Level 3 197 */ 198 public String getXmlVersion(){ 199 return null; 200 } 201 /** 202 * An attribute specifying, as part of the XML declaration, the version 203 * number of this document. This is <code>null</code> when unspecified. 204 * <br> This attribute represents the property [version] defined in . 205 * @exception DOMException 206 * NOT_SUPPORTED_ERR: Raised if the version is set to a value that is 207 * not supported by this <code>Document</code>. 208 * @since DOM Level 3 209 */ 210 public void setXmlVersion(String version) throws DOMException{ 211 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 212 } 213 214 /** 215 * An attribute specifying whether errors checking is enforced or not. 216 * When set to <code>false</code>, the implementation is free to not 217 * test every possible error case normally defined on DOM operations, 218 * and not raise any <code>DOMException</code>. In case of error, the 219 * behavior is undefined. This attribute is <code>true</code> by 220 * defaults. 221 * @since DOM Level 3 222 */ 223 public boolean getStrictErrorChecking(){ 224 return false; 225 } 226 /** 227 * An attribute specifying whether errors checking is enforced or not. 228 * When set to <code>false</code>, the implementation is free to not 229 * test every possible error case normally defined on DOM operations, 230 * and not raise any <code>DOMException</code>. In case of error, the 231 * behavior is undefined. This attribute is <code>true</code> by 232 * defaults. 233 * @since DOM Level 3 234 */ 235 public void setStrictErrorChecking(boolean strictErrorChecking){ 236 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 237 } 238 239 /** 240 * The location of the document or <code>null</code> if undefined. 241 * <br>Beware that when the <code>Document</code> supports the feature 242 * "HTML" , the href attribute of the HTML BASE element takes precedence 243 * over this attribute. 244 * @since DOM Level 3 245 */ 246 public String getDocumentURI() { 247 return fDocumentURI; 248 } 249 250 /** 251 * The location of the document or <code>null</code> if undefined. 252 * <br>Beware that when the <code>Document</code> supports the feature 253 * "HTML" , the href attribute of the HTML BASE element takes precedence 254 * over this attribute. 255 * @since DOM Level 3 256 */ 257 public void setDocumentURI(String documentURI) { 258 fDocumentURI = documentURI; 259 } 260 261 /** DOM Level 3*/ 262 public Node adoptNode(Node source) throws DOMException{ 263 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 264 } 265 266 /** DOM Level 3*/ 267 public void normalizeDocument(){ 268 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 269 } 270 271 /** 272 * The configuration used when <code>Document.normalizeDocument</code> is 273 * invoked. 274 * @since DOM Level 3 275 */ 276 public DOMConfiguration getDomConfig(){ 277 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 278 } 279 280 /** DOM Level 3*/ 281 public Node renameNode(Node n,String namespaceURI, String name) throws DOMException{ 282 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, "Method not supported"); 283 } 284 285 286 287 288 289 290 291 292} 293