001 /*
002 * Copyright 2002 - 2007 JEuclid, http://jeuclid.sf.net
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017 /* $Id: AbstractPartialDocumentImpl.java 310 2007-05-18 20:26:36Z maxberger $ */
018
019 package net.sourceforge.jeuclid.dom;
020
021 import org.w3c.dom.Attr;
022 import org.w3c.dom.CDATASection;
023 import org.w3c.dom.Comment;
024 import org.w3c.dom.DOMConfiguration;
025 import org.w3c.dom.DOMImplementation;
026 import org.w3c.dom.Document;
027 import org.w3c.dom.DocumentFragment;
028 import org.w3c.dom.DocumentType;
029 import org.w3c.dom.Element;
030 import org.w3c.dom.EntityReference;
031 import org.w3c.dom.Node;
032 import org.w3c.dom.ProcessingInstruction;
033 import org.w3c.dom.Text;
034
035 /**
036 * Partial implementation of org.w3c.dom.Document.
037 * <p>
038 * This implements only the functions necesessay for MathElements. Feel free
039 * to implement whatever functions you need.
040 *
041 * @author Max Berger
042 * @version $Revision: 310 $
043 */
044 public abstract class AbstractPartialDocumentImpl extends
045 AbstractPartialNodeImpl implements Document {
046
047 /** {@inheritDoc} */
048 public final Node adoptNode(final Node source) {
049 throw new UnsupportedOperationException();
050 }
051
052 /** {@inheritDoc} */
053 public final Attr createAttribute(final String name) {
054 throw new UnsupportedOperationException();
055 }
056
057 /** {@inheritDoc} */
058 public final Attr createAttributeNS(final String namespaceURI,
059 final String qualifiedName) {
060 throw new UnsupportedOperationException();
061 }
062
063 /** {@inheritDoc} */
064 public final CDATASection createCDATASection(final String data) {
065 throw new UnsupportedOperationException();
066 }
067
068 /** {@inheritDoc} */
069 public final Comment createComment(final String data) {
070 throw new UnsupportedOperationException();
071 }
072
073 /** {@inheritDoc} */
074 public final DocumentFragment createDocumentFragment() {
075 throw new UnsupportedOperationException();
076 }
077
078 /** {@inheritDoc} */
079 public final Element createElement(final String tagName) {
080 throw new UnsupportedOperationException();
081 }
082
083 /** {@inheritDoc} */
084 public final Element createElementNS(final String namespaceURI,
085 final String qualifiedName) {
086 throw new UnsupportedOperationException();
087 }
088
089 /** {@inheritDoc} */
090 public final EntityReference createEntityReference(final String name) {
091 throw new UnsupportedOperationException();
092 }
093
094 /** {@inheritDoc} */
095 public final ProcessingInstruction createProcessingInstruction(
096 final String target, final String data) {
097 throw new UnsupportedOperationException();
098 }
099
100 /** {@inheritDoc} */
101 public final Text createTextNode(final String data) {
102 throw new UnsupportedOperationException();
103 }
104
105 /** {@inheritDoc} */
106 public final DocumentType getDoctype() {
107 throw new UnsupportedOperationException();
108 }
109
110 /** {@inheritDoc} */
111 public final Element getDocumentElement() {
112 throw new UnsupportedOperationException();
113 }
114
115 /** {@inheritDoc} */
116 public final String getDocumentURI() {
117 throw new UnsupportedOperationException();
118 }
119
120 /** {@inheritDoc} */
121 public final DOMConfiguration getDomConfig() {
122 throw new UnsupportedOperationException();
123 }
124
125 /** {@inheritDoc} */
126 public final Element getElementById(final String elementId) {
127 throw new UnsupportedOperationException();
128 }
129
130 /** {@inheritDoc} */
131 public final DOMImplementation getImplementation() {
132 throw new UnsupportedOperationException();
133 }
134
135 /** {@inheritDoc} */
136 public final String getInputEncoding() {
137 throw new UnsupportedOperationException();
138 }
139
140 /** {@inheritDoc} */
141 public final boolean getStrictErrorChecking() {
142 throw new UnsupportedOperationException();
143 }
144
145 /** {@inheritDoc} */
146 public final String getXmlEncoding() {
147 return null;
148 }
149
150 /** {@inheritDoc} */
151 public final boolean getXmlStandalone() {
152 return false;
153 }
154
155 /** {@inheritDoc} */
156 public final String getXmlVersion() {
157 return "1.0";
158 }
159
160 /** {@inheritDoc} */
161 public final Node importNode(final Node importedNode, final boolean deep) {
162 throw new UnsupportedOperationException();
163 }
164
165 /** {@inheritDoc} */
166 public final void normalizeDocument() {
167 throw new UnsupportedOperationException();
168 }
169
170 /** {@inheritDoc} */
171 public final Node renameNode(final Node n, final String namespaceURI,
172 final String qualifiedName) {
173 throw new UnsupportedOperationException();
174 }
175
176 /** {@inheritDoc} */
177 public final void setDocumentURI(final String documentURI) {
178 throw new UnsupportedOperationException();
179 }
180
181 /** {@inheritDoc} */
182 public final void setStrictErrorChecking(final boolean strictErrorChecking) {
183 throw new UnsupportedOperationException();
184 }
185
186 /** {@inheritDoc} */
187 public final void setXmlStandalone(final boolean xmlStandalone) {
188 throw new UnsupportedOperationException();
189 }
190
191 /** {@inheritDoc} */
192 public final void setXmlVersion(final String xmlVersion) {
193 throw new UnsupportedOperationException();
194 }
195
196 /** {@inheritDoc} */
197 public final org.w3c.dom.NodeList getElementsByTagName(
198 final String tagname) {
199 throw new UnsupportedOperationException();
200 }
201
202 /** {@inheritDoc} */
203 public final org.w3c.dom.NodeList getElementsByTagNameNS(
204 final String namespaceURI, final String localName) {
205 throw new UnsupportedOperationException();
206 }
207
208 /** {@inheritDoc} */
209 public final String getNodeName() {
210 return "#document";
211 }
212
213 /** {@inheritDoc} */
214 public final short getNodeType() {
215 return Node.DOCUMENT_NODE;
216 }
217
218 }