View Javadoc

1   /*
2    * Copyright 2002 - 2007 JEuclid, http://jeuclid.sf.net
3    * 
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  /* $Id: AbstractPartialDocumentImpl.java 310 2007-05-18 20:26:36Z maxberger $ */
18  
19  package net.sourceforge.jeuclid.dom;
20  
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.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.ProcessingInstruction;
33  import org.w3c.dom.Text;
34  
35  /**
36   * Partial implementation of org.w3c.dom.Document.
37   * <p>
38   * This implements only the functions necesessay for MathElements. Feel free
39   * to implement whatever functions you need.
40   * 
41   * @author Max Berger
42   * @version $Revision: 310 $
43   */
44  public abstract class AbstractPartialDocumentImpl extends
45          AbstractPartialNodeImpl implements Document {
46  
47      /** {@inheritDoc} */
48      public final Node adoptNode(final Node source) {
49          throw new UnsupportedOperationException();
50      }
51  
52      /** {@inheritDoc} */
53      public final Attr createAttribute(final String name) {
54          throw new UnsupportedOperationException();
55      }
56  
57      /** {@inheritDoc} */
58      public final Attr createAttributeNS(final String namespaceURI,
59              final String qualifiedName) {
60          throw new UnsupportedOperationException();
61      }
62  
63      /** {@inheritDoc} */
64      public final CDATASection createCDATASection(final String data) {
65          throw new UnsupportedOperationException();
66      }
67  
68      /** {@inheritDoc} */
69      public final Comment createComment(final String data) {
70          throw new UnsupportedOperationException();
71      }
72  
73      /** {@inheritDoc} */
74      public final DocumentFragment createDocumentFragment() {
75          throw new UnsupportedOperationException();
76      }
77  
78      /** {@inheritDoc} */
79      public final Element createElement(final String tagName) {
80          throw new UnsupportedOperationException();
81      }
82  
83      /** {@inheritDoc} */
84      public final Element createElementNS(final String namespaceURI,
85              final String qualifiedName) {
86          throw new UnsupportedOperationException();
87      }
88  
89      /** {@inheritDoc} */
90      public final EntityReference createEntityReference(final String name) {
91          throw new UnsupportedOperationException();
92      }
93  
94      /** {@inheritDoc} */
95      public final ProcessingInstruction createProcessingInstruction(
96              final String target, final String data) {
97          throw new UnsupportedOperationException();
98      }
99  
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 }