KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > xml > text > syntax > dom > DocumentImpl


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.xml.text.syntax.dom;
21
22 import org.w3c.dom.*;
23 import org.netbeans.modules.xml.text.syntax.*;
24 import org.netbeans.modules.xml.spi.dom.*;
25 import javax.swing.text.BadLocationException JavaDoc;
26
27 public class DocumentImpl extends AbstractNode implements org.w3c.dom.Document JavaDoc {
28
29     SyntaxElement syntax;
30
31     DocumentImpl(SyntaxElement element) {
32         syntax = element;
33     }
34
35     public org.w3c.dom.Attr JavaDoc createAttribute(String JavaDoc str) throws org.w3c.dom.DOMException JavaDoc {
36         return null;
37     }
38
39     public org.w3c.dom.Element JavaDoc getElementById(String JavaDoc str) {
40         return null;
41     }
42     
43     public String JavaDoc getVersion() {
44         throw new UOException();
45     }
46     
47     public org.w3c.dom.Element JavaDoc createElement(String JavaDoc str) throws org.w3c.dom.DOMException JavaDoc {
48         return null;
49     }
50     
51     public boolean getStrictErrorChecking() {
52         throw new UOException();
53     }
54     
55     public org.w3c.dom.DOMImplementation JavaDoc getImplementation() {
56         return new DOMImplementationImpl();
57     }
58     
59     public org.w3c.dom.Element JavaDoc createElementNS(String JavaDoc str, String JavaDoc str1) throws org.w3c.dom.DOMException JavaDoc {
60         throw new UOException();
61     }
62     
63     public org.w3c.dom.DocumentFragment JavaDoc createDocumentFragment() {
64         return null;
65     }
66     
67     public org.w3c.dom.NodeList JavaDoc getElementsByTagNameNS(String JavaDoc str, String JavaDoc str1) {
68         return NodeListImpl.EMPTY; //???
69
}
70     
71     public void setVersion(String JavaDoc str) {
72         throw new UOException();
73     }
74     
75     public org.w3c.dom.Attr JavaDoc createAttributeNS(String JavaDoc str, String JavaDoc str1) throws org.w3c.dom.DOMException JavaDoc {
76         return null;
77     }
78     
79     public void setStrictErrorChecking(boolean param) {
80         throw new UOException();
81     }
82     
83     public void setEncoding(String JavaDoc str) {
84         throw new UOException();
85     }
86     
87     public org.w3c.dom.ProcessingInstruction JavaDoc createProcessingInstruction(String JavaDoc str, String JavaDoc str1) throws org.w3c.dom.DOMException JavaDoc {
88         return null;
89     }
90     
91     public org.w3c.dom.NodeList JavaDoc getElementsByTagName(String JavaDoc str) {
92         return NodeListImpl.EMPTY; //???
93
}
94     
95     public org.w3c.dom.Element JavaDoc getDocumentElement() {
96         return null; //!!! parse for it
97
}
98     
99     public org.w3c.dom.DocumentType JavaDoc getDoctype() {
100 // try {
101
//SyntaxElement e = syntax.support.getElementChain(0);
102
//!!! locate declaration and return wrapper
103
// return new DocumentTypeImpl(null, null, 0);
104
// } catch (BadLocationException ex) {
105
return null;
106 // }
107
}
108     
109     public org.w3c.dom.CDATASection JavaDoc createCDATASection(String JavaDoc str) throws org.w3c.dom.DOMException JavaDoc {
110         return null;
111     }
112     
113     public org.w3c.dom.EntityReference JavaDoc createEntityReference(String JavaDoc str) throws org.w3c.dom.DOMException JavaDoc {
114         return null;
115     }
116     
117     public boolean getStandalone() {
118         throw new UOException();
119     }
120     
121     public short getNodeType() {
122         return Node.DOCUMENT_NODE;
123     }
124     
125     public org.w3c.dom.Node JavaDoc adoptNode(org.w3c.dom.Node JavaDoc node) throws org.w3c.dom.DOMException JavaDoc {
126         throw new ROException();
127     }
128     
129     public org.w3c.dom.Text JavaDoc createTextNode(String JavaDoc str) {
130         return null;
131     }
132     
133     public String JavaDoc getEncoding() {
134         throw new UOException();
135     }
136     
137     public org.w3c.dom.Comment JavaDoc createComment(String JavaDoc str) {
138         return null;
139     }
140     
141     public void setStandalone(boolean param) {
142         throw new UOException();
143     }
144     
145     public org.w3c.dom.Node JavaDoc importNode(org.w3c.dom.Node JavaDoc node, boolean param) throws org.w3c.dom.DOMException JavaDoc {
146         throw new ROException();
147     }
148     
149 }
150
151
Popular Tags