KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > tax > dom > DocumentTypeImpl


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.tax.dom;
21
22 import java.util.Iterator JavaDoc;
23 import org.w3c.dom.*;
24 import org.netbeans.tax.*;
25 import org.netbeans.tax.TreeObjectList;
26
27 /**
28  *
29  * @author Rich Unger
30  */

31 class DocumentTypeImpl extends NodeImpl implements DocumentType {
32
33     private final TreeDocumentType peer;
34
35     /** Creates a new instance of DocumentTypeImpl */
36     public DocumentTypeImpl(TreeDocumentType peer) {
37         this.peer = peer;
38     }
39
40     public String JavaDoc getName() {
41         return peer.getElementName();
42     }
43
44     public NamedNodeMap getEntities() {
45         return null;
46     }
47
48     public NamedNodeMap getNotations() {
49         return null;
50     }
51
52     public String JavaDoc getPublicId() {
53         return peer.getPublicId();
54     }
55
56     public String JavaDoc getSystemId() {
57         return peer.getSystemId();
58     }
59
60     public String JavaDoc getInternalSubset() {
61         return null;
62     }
63
64     /** The name of this node, depending on its type; see the table above.
65      *
66      */

67     public String JavaDoc getNodeName() {
68         return peer.getElementName();
69     }
70     
71     /** A code representing the type of the underlying object, as defined above.
72      *
73      */

74     public short getNodeType() {
75         return Node.DOCUMENT_TYPE_NODE;
76     }
77     
78     /** The value of this node, depending on its type; see the table above.
79      * When it is defined to be <code>null</code>, setting it has no effect.
80      * @exception DOMException
81      * NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
82      * @exception DOMException
83      * DOMSTRING_SIZE_ERR: Raised when it would return more characters than
84      * fit in a <code>DOMString</code> variable on the implementation
85      * platform.
86      *
87      */

88     public String JavaDoc getNodeValue() throws DOMException {
89         return null;
90     }
91     
92     /** The parent of this node. All nodes, except <code>Attr</code>,
93      * <code>Document</code>, <code>DocumentFragment</code>,
94      * <code>Entity</code>, and <code>Notation</code> may have a parent.
95      * However, if a node has just been created and not yet added to the
96      * tree, or if it has been removed from the tree, this is
97      * <code>null</code>.
98      *
99      */

100     public Node getParentNode() {
101         return Wrapper.wrap(peer.getParentNode());
102     }
103     
104     /** The first child of this node. If there is no such node, this returns
105      * <code>null</code>.
106      *
107      */

108     public Node getFirstChild() {
109         return null;
110     }
111
112     /** The last child of this node. If there is no such node, this returns
113      * <code>null</code>.
114      *
115      */

116     public Node getLastChild() {
117         return null;
118     }
119
120     /** Returns whether this node has any children.
121      * @return <code>true</code> if this node has any children,
122      * <code>false</code> otherwise.
123      *
124      */

125     public boolean hasChildNodes() {
126         return false;
127     }
128     
129     /** A <code>NodeList</code> that contains all children of this node. If
130      * there are no children, this is a <code>NodeList</code> containing no
131      * nodes.
132      *
133      */

134     public NodeList getChildNodes() {
135         return Wrapper.wrap(peer.getChildNodes());
136     }
137     
138 }
139
Popular Tags