2
* Copyright (C) 2001-2012 Michael Fuchs
4
* This file is part of herold.
6
* herold is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
11
* herold is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with herold. If not, see <http://www.gnu.org/licenses/>.
19
package org.dbdoclet.xiphias.dom;
21
import org.w3c.dom.Attr;
22
import org.w3c.dom.CDATASection;
23
import org.w3c.dom.Comment;
24
import org.w3c.dom.DOMConfiguration;
25
import org.w3c.dom.DOMException;
26
import org.w3c.dom.DOMImplementation;
27
import org.w3c.dom.Document;
28
import org.w3c.dom.DocumentFragment;
29
import org.w3c.dom.DocumentType;
30
import org.w3c.dom.Element;
31
import org.w3c.dom.EntityReference;
32
import org.w3c.dom.Node;
33
import org.w3c.dom.NodeList;
34
import org.w3c.dom.ProcessingInstruction;
35
import org.w3c.dom.Text;
37
public class DocumentImpl extends NodeImpl implements Document {
39
private String xmlEncoding = "UTF-8";
40
private String xmlVersion = "1.0";
41
private ElementImpl documentElement;
42
private DocumentType docType;
44
public DocumentImpl() {
46
super("#document", null);
47
setNodeType(DOCUMENT_NODE);
49
setXmlEncoding("UTF-8");
53
public Node adoptNode(Node source) throws DOMException {
54
throw new IllegalStateException("Not yet implemented");
57
public Attr createAttribute(String name) throws DOMException {
58
throw new IllegalStateException("Not yet implemented");
61
public Attr createAttributeNS(String namespaceURI, String qualifiedName)
63
throw new IllegalStateException("Not yet implemented");
66
public CDATASection createCDATASection(String data) throws DOMException {
67
throw new IllegalStateException("Not yet implemented");
70
public Comment createComment(String data) {
71
throw new IllegalStateException("Not yet implemented");
74
public DocumentFragment createDocumentFragment() {
75
throw new IllegalStateException("Not yet implemented");
78
public ElementImpl createElement(String tagName) throws DOMException {
80
ElementImpl elem = new ElementImpl(tagName);
81
elem.setDocument(this);
82
elem.setFormatType(FORMAT_BLOCK);
86
public Element createElementNS(String namespaceURI, String qualifiedName)
88
throw new IllegalStateException("Not yet implemented");
91
public EntityReference createEntityReference(String name)
93
throw new IllegalStateException("Not yet implemented");
96
public ProcessingInstruction createProcessingInstruction(String target,
97
String data) throws DOMException {
98
throw new IllegalStateException("Not yet implemented");
101
public Text createTextNode(String data) {
103
TextImpl text = new TextImpl(data);
107
public String createXmlDeclaration() {
108
return "<?xml version=\"" + xmlVersion + "\" encoding=\"" + xmlEncoding
112
public DocumentType getDoctype() {
116
public ElementImpl getDocumentElement() {
117
return documentElement;
120
public String getDocumentURI() {
121
throw new IllegalStateException("Not yet implemented");
124
public DOMConfiguration getDomConfig() {
125
throw new IllegalStateException("Not yet implemented");
128
public Element getElementById(String elementId) {
129
throw new IllegalStateException("Not yet implemented");
132
public NodeList getElementsByTagName(String tagname) {
133
throw new IllegalStateException("Not yet implemented");
136
public NodeList getElementsByTagNameNS(String namespaceURI, String localName) {
137
throw new IllegalStateException("Not yet implemented");
140
public DOMImplementation getImplementation() {
141
throw new IllegalStateException("Not yet implemented");
144
public String getInputEncoding() {
145
throw new IllegalStateException("Not yet implemented");
148
public boolean getStrictErrorChecking() {
149
throw new IllegalStateException("Not yet implemented");
152
public String getXmlEncoding() {
156
public boolean getXmlStandalone() {
157
throw new IllegalStateException("Not yet implemented");
160
public String getXmlVersion() {
164
public Node importNode(Node importedNode, boolean deep) throws DOMException {
165
throw new IllegalStateException("Not yet implemented");
168
public void normalizeDocument() {
169
throw new IllegalStateException("Not yet implemented");
173
public Node renameNode(Node n, String namespaceURI, String qualifiedName)
174
throws DOMException {
175
throw new IllegalStateException("Not yet implemented");
178
public void setDocumentElement(ElementImpl documentElement) {
179
this.documentElement = documentElement;
182
public void setDoctype(DocumentType docType) {
183
this.docType = docType;
186
public void setDocumentURI(String documentURI) {
187
throw new IllegalStateException("Not yet implemented");
191
public void setStrictErrorChecking(boolean strictErrorChecking) {
192
throw new IllegalStateException("Not yet implemented");
196
public void setXmlEncoding(String xmlEncoding) {
197
this.xmlEncoding = xmlEncoding;
200
public void setXmlStandalone(boolean xmlStandalone) throws DOMException {
201
throw new IllegalStateException("Not yet implemented");
205
public void setXmlVersion(String xmlVersion) throws DOMException {
206
this.xmlVersion = xmlVersion;