1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55 package org.w3c.tidy;
56
57 /**
58 * DOMDocumentTypeImpl.
59 * @author Dave Raggett <a href="mailto:dsr@w3.org">dsr@w3.org </a>
60 * @author Andy Quick <a href="mailto:ac.quick@sympatico.ca">ac.quick@sympatico.ca </a> (translation to Java)
61 * @author Fabrizio Giustina
62 * @version $Revision: 779 $ ($Author: fgiust $)
63 */
64 public class DOMDocumentTypeImpl extends DOMNodeImpl implements org.w3c.dom.DocumentType
65 {
66
67 /**
68 * Instantiates a new DOM document type.
69 * @param adaptee Tidy Node
70 */
71 protected DOMDocumentTypeImpl(Node adaptee)
72 {
73 super(adaptee);
74 }
75
76 /**
77 * @see org.w3c.dom.Node#getNodeType
78 */
79 public short getNodeType()
80 {
81 return org.w3c.dom.Node.DOCUMENT_TYPE_NODE;
82 }
83
84 /**
85 * @see org.w3c.dom.Node#getNodeName
86 */
87 public String getNodeName()
88 {
89 return getName();
90 }
91
92 /**
93 * @see org.w3c.dom.DocumentType#getName
94 */
95 public String getName()
96 {
97 String value = null;
98 if (adaptee.type == Node.DOCTYPE_TAG)
99 {
100
101 if (adaptee.textarray != null && adaptee.start < adaptee.end)
102 {
103 value = TidyUtils.getString(adaptee.textarray, adaptee.start, adaptee.end - adaptee.start);
104 }
105 }
106 return value;
107 }
108
109 /**
110 * @todo DOM level 2 getEntities() Not implemented. Returns null.
111 * @see org.w3c.dom.DocumentType#getEntities()
112 */
113 public org.w3c.dom.NamedNodeMap getEntities()
114 {
115 return null;
116 }
117
118 /**
119 * @todo DOM level 2 getNotations() Not implemented. Returns null.
120 * @see org.w3c.dom.DocumentType#getNotations()
121 */
122 public org.w3c.dom.NamedNodeMap getNotations()
123 {
124 return null;
125 }
126
127 /**
128 * @todo DOM level 2 getPublicId() Not implemented. Returns null.
129 * @see org.w3c.dom.DocumentType#getPublicId()
130 */
131 public String getPublicId()
132 {
133 return null;
134 }
135
136 /**
137 * @todo DOM level 2 getSystemId() Not implemented. Returns null.
138 * @see org.w3c.dom.DocumentType#getSystemId()
139 */
140 public String getSystemId()
141 {
142 return null;
143 }
144
145 /**
146 * @todo DOM level 2 getInternalSubset() Not implemented. Returns null.
147 * @see org.w3c.dom.DocumentType#getInternalSubset()
148 */
149 public String getInternalSubset()
150 {
151 return null;
152 }
153
154 }