Source code: com/port80/html/tidy/DOMDocumentTypeImpl.java
1 /*
2 * @(#)DOMDocumentTypeImpl.java 1.11 2000/08/16
3 *
4 */
5
6 package com.port80.html.tidy;
7
8
9
10 /**
11 *
12 * DOMDocumentTypeImpl
13 *
14 * (c) 1998-2000 (W3C) MIT, INRIA, Keio University
15 * See Tidy.java for the copyright notice.
16 * Derived from <a href="http://www.w3.org/People/Raggett/tidy">
17 * HTML Tidy Release 4 Aug 2000</a>
18 *
19 * @author Dave Raggett <dsr@w3.org>
20 * @author Andy Quick <ac.quick@sympatico.ca> (translation to Java)
21 * @version 1.7, 1999/12/06 Tidy Release 30 Nov 1999
22 * @version 1.8, 2000/01/22 Tidy Release 13 Jan 2000
23 * @version 1.9, 2000/06/03 Tidy Release 30 Apr 2000
24 * @version 1.10, 2000/07/22 Tidy Release 8 Jul 2000
25 * @version 1.11, 2000/08/16 Tidy Release 4 Aug 2000
26 */
27
28 public class DOMDocumentTypeImpl extends DOMNodeImpl
29 implements org.w3c.dom.DocumentType {
30
31 protected DOMDocumentTypeImpl(Node adaptee)
32 {
33 super(adaptee);
34 }
35
36
37 /* --------------------- DOM ---------------------------- */
38
39 /**
40 * @see org.w3c.dom.Node#getNodeType
41 */
42 public short getNodeType()
43 {
44 return org.w3c.dom.Node.DOCUMENT_TYPE_NODE;
45 }
46
47 /**
48 * @see org.w3c.dom.Node#getNodeName
49 */
50 public String getNodeName()
51 {
52 return getName();
53 }
54
55 /**
56 * @see org.w3c.dom.DocumentType#getName
57 */
58 public String getName()
59 {
60 String value = null;
61 if (adaptee.type == Node.DocTypeTag)
62 {
63
64 if (adaptee.textarray != null && adaptee.start < adaptee.end)
65 {
66 value = Lexer.getString(adaptee.textarray,
67 adaptee.start,
68 adaptee.end - adaptee.start);
69 }
70 }
71 return value;
72 }
73
74 public org.w3c.dom.NamedNodeMap getEntities()
75 {
76 // NOT SUPPORTED
77 return null;
78 }
79
80 public org.w3c.dom.NamedNodeMap getNotations()
81 {
82 // NOT SUPPORTED
83 return null;
84 }
85
86 /**
87 * DOM2 - not implemented.
88 */
89 public String getPublicId() {
90 return null;
91 }
92
93 /**
94 * DOM2 - not implemented.
95 */
96 public String getSystemId() {
97 return null;
98 }
99
100 /**
101 * DOM2 - not implemented.
102 */
103 public String getInternalSubset() {
104 return null;
105 }
106
107 }