001: // Copyright (c) 2004 Per M.A. Bothner.
002: // This is free software; for terms and warranty disclaimer see ./COPYING.
003:
004: package gnu.kawa.xml;
005:
006: import gnu.xml.*;
007:
008: /* #ifdef use:org.w3c.dom.Node */
009: // import org.w3c.dom.*;
010: /* #endif */
011:
012: public class KDocument extends KNode
013: /* #ifdef use:org.w3c.dom.Node */
014: // implements org.w3c.dom.Document
015: /* #endif */
016: {
017: public KDocument(NodeTree seq, int ipos) {
018: super (seq, ipos);
019: }
020:
021: public String getNodeName() {
022: return "#document";
023: }
024:
025: /* #ifdef use:org.w3c.dom.Node */
026: // public DOMImplementation getImplementation ()
027: // {
028: // throw new UnsupportedOperationException("getImplementation not implemented");
029: // }
030: // public DocumentType getDoctype ()
031: // {
032: // return null;
033: // }
034: // public Node getParentNode()
035: // {
036: // return null;
037: // }
038: // public Element getDocumentElement ()
039: // {
040: // return (Element) getFirstChild();
041: // }
042: /* #endif */
043:
044: /* #ifdef use:org.w3c.dom.Node */
045: // public short getNodeType () { return Node.DOCUMENT_NODE; }
046: /* #endif */
047:
048: public String getNodeValue() {
049: return null;
050: }
051:
052: public String getTextContent() {
053: return null;
054: }
055:
056: protected void getTextContent(StringBuffer sbuf) {
057: // Do nothing.
058: }
059:
060: /* #ifdef use:org.w3c.dom.Node */
061: // /** Not implemented. */
062: // public Element createElement (String tagName)
063: // {
064: // throw new UnsupportedOperationException("createElement not implemented");
065: // }
066: // /** Not implemented. */
067: // public DocumentFragment createDocumentFragment ()
068: // {
069: // throw new UnsupportedOperationException("createDocumentFragment not implemented");
070: // }
071: // /** Not implemented. */
072: // public Text createTextNode (String data)
073: // {
074: // throw new UnsupportedOperationException("createTextNode not implemented");
075: // }
076: // /** Not implemented. */
077: // public Comment createComment (String data)
078: // {
079: // throw new UnsupportedOperationException("createComment not implemented");
080: // }
081: // /** Not implemented. */
082: // public CDATASection createCDATASection (String data)
083: // {
084: // throw new UnsupportedOperationException("createCDATASection not implemented");
085: // }
086: // /** Not implemented. */
087: // public ProcessingInstruction createProcessingInstruction (String target,
088: // String data)
089: // {
090: // throw new UnsupportedOperationException("createProcessingInstruction not implemented");
091: // }
092: // /** Not implemented. */
093: // public Attr createAttribute (String name)
094: // {
095: // throw new UnsupportedOperationException("createAttribute not implemented");
096: // }
097: // /** Not implemented. */
098: // public EntityReference createEntityReference (String name)
099: // {
100: // throw new UnsupportedOperationException("createEntityReference implemented");
101: // }
102: // /** Not implemented. */
103: // public Node importNode (Node importedNode, boolean deep)
104: // {
105: // throw new UnsupportedOperationException("importNode not implemented");
106: // }
107: // /** Not implemented. */
108: // public Element createElementNS (String namespaceURI, String qualifiedName)
109: // {
110: // throw new UnsupportedOperationException("createElementNS not implemented");
111: // }
112: // /** Not implemented. */
113: // public Attr createAttributeNS (String namespaceURI, String qualifiedName)
114: // {
115: // throw new UnsupportedOperationException("createAttributeNS not implemented");
116: // }
117: // /** Not implemented yet. */
118: // public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
119: // {
120: // throw new UnsupportedOperationException("getElementsByTagNameNS not implemented yet");
121: // }
122: // public Element getElementById (String elementId)
123: // {
124: // return null;
125: // }
126: /* #endif */
127:
128: public boolean hasAttributes() {
129: return false;
130: }
131:
132: public String getInputEncoding() {
133: return null;
134: }
135:
136: public String getXmlEncoding() {
137: return null;
138: }
139:
140: public boolean getXmlStandalone() {
141: return false;
142: }
143:
144: public void setXmlStandalone(boolean xmlStandalone) {
145: }
146:
147: public String getXmlVersion() {
148: return "1.1";
149: }
150:
151: public void setXmlVersion(String xmlVersion) {
152: }
153:
154: public boolean getStrictErrorChecking() {
155: return false;
156: }
157:
158: public void setStrictErrorChecking(boolean strictErrorChecking) {
159: }
160:
161: public String getDocumentURI() {
162: return null;
163: }
164:
165: public void setDocumentURI(String documentURI) {
166: }
167:
168: /* #ifdef use:org.w3c.dom.Node */
169: // public Node renameNode (Node n, String namespaceURI, String qualifiedname)
170: // throws DOMException
171: // {
172: // throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
173: // "renameNode not implemented");
174: // }
175: // public Node adoptNode (Node source)
176: // throws DOMException
177: // {
178: // throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
179: // "adoptNode not implemented");
180: // }
181: /* #endif */
182:
183: public void normalizeDocument() {
184: }
185:
186: /* #ifdef JAXP-1.3 */
187: // public DOMConfiguration getDomConfig ()
188: // {
189: // throw new DOMException(DOMException.NOT_SUPPORTED_ERR,
190: // "getDomConfig not implemented");
191: // }
192: /* #endif JAXP-1.3 */
193: }
|