1
2
3
4
5
6
7
8 package org.dom4j.tree;
9
10 import java.util.List;
11
12 /***
13 * <p>
14 * <code>DefaultDocumentType</code> is the DOM4J default implementation of an
15 * XML document type.
16 * </p>
17 *
18 * @author <a href="mailto:james.strachan@metastuff.com">James Strachan </a>
19 * @version $Revision: 1.10 $
20 */
21 public class DefaultDocumentType extends AbstractDocumentType {
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 /***
41 * <p>
42 * This will create a new <code>DocumentType</code> with a reference to
43 * the external DTD
44 * </p>
45 *
46 * @param elementName
47 * is the root element name of the document type
48 * @param systemID
49 * is the system ID of the external DTD
50 */
51 public DefaultDocumentType(String elementName, String systemID) {
52 this.elementName = elementName;
53 this.systemID = systemID;
54 }
55
56 /***
57 * <p>
58 * This will create a new <code>DocumentType</code> with a reference to
59 * the external DTD
60 * </p>
61 *
62 * @param elementName
63 * is the root element name of the document type
64 * @param publicID
65 * is the public ID of the DTD
66 * @param systemID
67 * is the system ID of the DTD
68 */
69 public DefaultDocumentType(String elementName, String publicID,
70 String systemID) {
71 this.elementName = elementName;
72 this.publicID = publicID;
73 this.systemID = systemID;
74 }
75
76 public String getElementName() {
77 return elementName;
78 }
79
80 public void setElementName(String elementName) {
81 this.elementName = elementName;
82 }
83
84 /***
85 * DOCUMENT ME!
86 *
87 * @return the public ID of the document type
88 */
89 public String getPublicID() {
90 return publicID;
91 }
92
93 /***
94 * Sets the public ID of the document type
95 *
96 * @param publicID
97 * DOCUMENT ME!
98 */
99 public void setPublicID(String publicID) {
100 this.publicID = publicID;
101 }
102
103 /***
104 * DOCUMENT ME!
105 *
106 * @return the system ID of the document type
107 */
108 public String getSystemID() {
109 return systemID;
110 }
111
112 /***
113 * Sets the system ID of the document type
114 *
115 * @param systemID
116 * DOCUMENT ME!
117 */
118 public void setSystemID(String systemID) {
119 this.systemID = systemID;
120 }
121
122 public List getInternalDeclarations() {
123 return internalDeclarations;
124 }
125
126 public void setInternalDeclarations(List internalDeclarations) {
127 this.internalDeclarations = internalDeclarations;
128 }
129
130 public List getExternalDeclarations() {
131 return externalDeclarations;
132 }
133
134 public void setExternalDeclarations(List externalDeclarations) {
135 this.externalDeclarations = externalDeclarations;
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
163
164
165
166
167
168
169
170
171
172
173
174