1 /* 2 * Copyright (C) 2007 Esmertec AG. 3 * Copyright (C) 2007 The Android Open Source Project 4 * 5 * Licensed under the Apache License, Version 2.0 (the "License"); 6 * you may not use this file except in compliance with the License. 7 * You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package com.android.mms.dom; 19 20 import org.w3c.dom.Attr; 21 import org.w3c.dom.CDATASection; 22 import org.w3c.dom.Comment; 23 import org.w3c.dom.DOMConfiguration; 24 import org.w3c.dom.DOMException; 25 import org.w3c.dom.DOMImplementation; 26 import org.w3c.dom.Document; 27 import org.w3c.dom.DocumentFragment; 28 import org.w3c.dom.DocumentType; 29 import org.w3c.dom.Element; 30 import org.w3c.dom.EntityReference; 31 import org.w3c.dom.Node; 32 import org.w3c.dom.NodeList; 33 import org.w3c.dom.ProcessingInstruction; 34 import org.w3c.dom.Text; 35 36 public abstract class DocumentImpl extends NodeImpl implements Document { 37 38 /* 39 * Internal methods 40 */ 41 DocumentImpl()42 public DocumentImpl() { 43 super(null); 44 } 45 46 /* 47 * Document Interface Methods 48 */ 49 createAttribute(String name)50 public Attr createAttribute(String name) throws DOMException { 51 return new AttrImpl(this, name); 52 } 53 createAttributeNS(String namespaceURI, String qualifiedName)54 public Attr createAttributeNS(String namespaceURI, String qualifiedName) 55 throws DOMException { 56 // TODO Auto-generated method stub 57 return null; 58 } 59 createCDATASection(String data)60 public CDATASection createCDATASection(String data) throws DOMException { 61 // TODO Auto-generated method stub 62 return null; 63 } 64 createComment(String data)65 public Comment createComment(String data) { 66 // TODO Auto-generated method stub 67 return null; 68 } 69 createDocumentFragment()70 public DocumentFragment createDocumentFragment() { 71 // TODO Auto-generated method stub 72 return null; 73 } 74 createElement(String tagName)75 public abstract Element createElement(String tagName) throws DOMException; 76 createElementNS(String namespaceURI, String qualifiedName)77 public Element createElementNS(String namespaceURI, String qualifiedName) 78 throws DOMException { 79 // TODO Auto-generated method stub 80 return null; 81 } 82 createEntityReference(String name)83 public EntityReference createEntityReference(String name) throws DOMException { 84 // TODO Auto-generated method stub 85 return null; 86 } 87 createProcessingInstruction(String target, String data)88 public ProcessingInstruction createProcessingInstruction(String target, String data) 89 throws DOMException { 90 // TODO Auto-generated method stub 91 return null; 92 } 93 createTextNode(String data)94 public Text createTextNode(String data) { 95 // TODO Auto-generated method stub 96 return null; 97 } 98 getDoctype()99 public DocumentType getDoctype() { 100 // TODO Auto-generated method stub 101 return null; 102 } 103 getDocumentElement()104 public abstract Element getDocumentElement(); 105 getElementById(String elementId)106 public Element getElementById(String elementId) { 107 // TODO Auto-generated method stub 108 return null; 109 } 110 getElementsByTagName(String tagname)111 public NodeList getElementsByTagName(String tagname) { 112 // TODO Auto-generated method stub 113 return null; 114 } 115 getElementsByTagNameNS(String namespaceURI, String localName)116 public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { 117 // TODO Auto-generated method stub 118 return null; 119 } 120 getImplementation()121 public DOMImplementation getImplementation() { 122 // TODO Auto-generated method stub 123 return null; 124 } 125 importNode(Node importedNode, boolean deep)126 public Node importNode(Node importedNode, boolean deep) throws DOMException { 127 // TODO Auto-generated method stub 128 return null; 129 } 130 131 /* 132 * Node Interface methods 133 */ 134 135 @Override getNodeType()136 public short getNodeType() { 137 return Node.DOCUMENT_NODE; 138 } 139 140 @Override getNodeName()141 public String getNodeName() { 142 // The value of nodeName is "#document" when Node is a Document 143 return "#document"; 144 } 145 getInputEncoding()146 public String getInputEncoding() { 147 return null; 148 } 149 getXmlEncoding()150 public String getXmlEncoding() { 151 return null; 152 } 153 getXmlStandalone()154 public boolean getXmlStandalone() { 155 return false; 156 } 157 setXmlStandalone(boolean xmlStandalone)158 public void setXmlStandalone(boolean xmlStandalone) throws DOMException {} 159 getXmlVersion()160 public String getXmlVersion() { 161 return null; 162 } 163 setXmlVersion(String xmlVersion)164 public void setXmlVersion(String xmlVersion) throws DOMException {} 165 getStrictErrorChecking()166 public boolean getStrictErrorChecking() { 167 return true; 168 } 169 setStrictErrorChecking(boolean strictErrorChecking)170 public void setStrictErrorChecking(boolean strictErrorChecking) {} 171 getDocumentURI()172 public String getDocumentURI() { 173 return null; 174 } 175 setDocumentURI(String documentURI)176 public void setDocumentURI(String documentURI) {} 177 adoptNode(Node source)178 public Node adoptNode(Node source) throws DOMException { 179 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, null); 180 } 181 getDomConfig()182 public DOMConfiguration getDomConfig() { 183 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, null); 184 } 185 normalizeDocument()186 public void normalizeDocument() { 187 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, null); 188 } 189 renameNode(Node n, String namespaceURI, String qualifiedName)190 public Node renameNode(Node n, String namespaceURI, String qualifiedName) 191 throws DOMException { 192 throw new DOMException(DOMException.NOT_SUPPORTED_ERR, null); 193 } 194 } 195