1
2
3
4
5
6
7
8
9
10 package org.dom4j.tree;
11
12 import java.util.List;
13
14 /*** <p><code>DefaultDocumentType</code> is the DOM4J default implementation
15 * of an XML document type.</p>
16 *
17 * @author <a href="mailto:james.strachan@metastuff.com">James Strachan</a>
18 * @version $Revision: 1.8 $
19 */
20 public class DefaultDocumentType extends AbstractDocumentType {
21
22 /*** The root element name of the document typ */
23 protected String elementName;
24
25 /*** Holds value of property publicID. */
26 private String publicID;
27
28 /*** Holds value of property systemID. */
29 private String systemID;
30
31 /*** The internal DTD declarations */
32 private List internalDeclarations;
33
34 /*** The external DTD declarations */
35 private List externalDeclarations;
36
37 public DefaultDocumentType() {
38 }
39
40 /*** <p>This will create a new <code>DocumentType</code>
41 * with a reference to the external DTD</p>
42 *
43 * @param elementName is the root element name of the document type
44 * @param systemID is the system ID of the external DTD
45 */
46 public DefaultDocumentType(String elementName, String systemID) {
47 this.elementName = elementName;
48 this.systemID = systemID;
49 }
50
51 /*** <p>This will create a new <code>DocumentType</code>
52 * with a reference to the external DTD</p>
53 *
54 * @param elementName is the root element name of the document type
55 * @param publicID is the public ID of the DTD
56 * @param systemID is the system ID of the DTD
57 */
58 public DefaultDocumentType(String elementName, String publicID, String systemID) {
59 this.elementName = elementName;
60 this.publicID = publicID;
61 this.systemID = systemID;
62 }
63
64
65 public String getElementName() {
66 return elementName;
67 }
68
69 public void setElementName(String elementName) {
70 this.elementName = elementName;
71 }
72
73 /*** @return the public ID of the document type
74 */
75 public String getPublicID() {
76 return publicID;
77 }
78
79 /*** Sets the public ID of the document type
80 */
81 public void setPublicID(String publicID) {
82 this.publicID = publicID;
83 }
84
85 /*** @return the system ID of the document type
86 */
87 public String getSystemID() {
88 return systemID;
89 }
90
91 /*** Sets the system ID of the document type
92 */
93 public void setSystemID(String systemID) {
94 this.systemID = systemID;
95 }
96
97 public List getInternalDeclarations() {
98 return internalDeclarations;
99 }
100
101 public void setInternalDeclarations(List internalDeclarations) {
102 this.internalDeclarations = internalDeclarations;
103 }
104
105 public List getExternalDeclarations() {
106 return externalDeclarations;
107 }
108
109 public void setExternalDeclarations(List externalDeclarations) {
110 this.externalDeclarations = externalDeclarations;
111 }
112 }
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162