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.DOMException; 24 import org.w3c.dom.DOMImplementation; 25 import org.w3c.dom.Document; 26 import org.w3c.dom.DocumentFragment; 27 import org.w3c.dom.DocumentType; 28 import org.w3c.dom.Element; 29 import org.w3c.dom.EntityReference; 30 import org.w3c.dom.Node; 31 import org.w3c.dom.NodeList; 32 import org.w3c.dom.ProcessingInstruction; 33 import org.w3c.dom.Text; 34 35 public abstract class DocumentImpl extends NodeImpl implements Document { 36 37 /* 38 * Internal methods 39 */ 40 DocumentImpl()41 public DocumentImpl() { 42 super(null); 43 } 44 45 /* 46 * Document Interface Methods 47 */ 48 createAttribute(String name)49 public Attr createAttribute(String name) throws DOMException { 50 return new AttrImpl(this, name); 51 } 52 createAttributeNS(String namespaceURI, String qualifiedName)53 public Attr createAttributeNS(String namespaceURI, String qualifiedName) 54 throws DOMException { 55 // TODO Auto-generated method stub 56 return null; 57 } 58 createCDATASection(String data)59 public CDATASection createCDATASection(String data) throws DOMException { 60 // TODO Auto-generated method stub 61 return null; 62 } 63 createComment(String data)64 public Comment createComment(String data) { 65 // TODO Auto-generated method stub 66 return null; 67 } 68 createDocumentFragment()69 public DocumentFragment createDocumentFragment() { 70 // TODO Auto-generated method stub 71 return null; 72 } 73 createElement(String tagName)74 public abstract Element createElement(String tagName) throws DOMException; 75 createElementNS(String namespaceURI, String qualifiedName)76 public Element createElementNS(String namespaceURI, String qualifiedName) 77 throws DOMException { 78 // TODO Auto-generated method stub 79 return null; 80 } 81 createEntityReference(String name)82 public EntityReference createEntityReference(String name) throws DOMException { 83 // TODO Auto-generated method stub 84 return null; 85 } 86 createProcessingInstruction(String target, String data)87 public ProcessingInstruction createProcessingInstruction(String target, String data) 88 throws DOMException { 89 // TODO Auto-generated method stub 90 return null; 91 } 92 createTextNode(String data)93 public Text createTextNode(String data) { 94 // TODO Auto-generated method stub 95 return null; 96 } 97 getDoctype()98 public DocumentType getDoctype() { 99 // TODO Auto-generated method stub 100 return null; 101 } 102 getDocumentElement()103 public abstract Element getDocumentElement(); 104 getElementById(String elementId)105 public Element getElementById(String elementId) { 106 // TODO Auto-generated method stub 107 return null; 108 } 109 getElementsByTagName(String tagname)110 public NodeList getElementsByTagName(String tagname) { 111 // TODO Auto-generated method stub 112 return null; 113 } 114 getElementsByTagNameNS(String namespaceURI, String localName)115 public NodeList getElementsByTagNameNS(String namespaceURI, String localName) { 116 // TODO Auto-generated method stub 117 return null; 118 } 119 getImplementation()120 public DOMImplementation getImplementation() { 121 // TODO Auto-generated method stub 122 return null; 123 } 124 importNode(Node importedNode, boolean deep)125 public Node importNode(Node importedNode, boolean deep) throws DOMException { 126 // TODO Auto-generated method stub 127 return null; 128 } 129 130 /* 131 * Node Interface methods 132 */ 133 134 @Override getNodeType()135 public short getNodeType() { 136 return Node.DOCUMENT_NODE; 137 } 138 139 @Override getNodeName()140 public String getNodeName() { 141 // The value of nodeName is "#document" when Node is a Document 142 return "#document"; 143 } 144 } 145