KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > xml > dom4j > o3impl > DefaultDocumentType


1 /*
2  * Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved.
3  *
4  * This software is open source.
5  * See the bottom of this file for the licence.
6  *
7  * $Id: DefaultDocumentType.java,v 1.2 2003/06/10 16:18:36 per_nyfelt Exp $
8  */

9
10 package org.ozoneDB.xml.dom4j.o3impl;
11
12 import java.util.List JavaDoc;
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.2 $
19  */

20 public class DefaultDocumentType extends AbstractDocumentType {
21
22     /** The root element name of the document typ */
23     protected String JavaDoc elementName;
24
25     /** Holds value of property publicID. */
26     private String JavaDoc publicID;
27
28     /** Holds value of property systemID. */
29     private String JavaDoc systemID;
30
31     /** The internal DTD declarations */
32     private List JavaDoc internalDeclarations;
33
34     /** The external DTD declarations */
35     private List JavaDoc 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 JavaDoc elementName, String JavaDoc 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 JavaDoc elementName, String JavaDoc publicID, String JavaDoc systemID) {
59         this.elementName = elementName;
60         this.publicID = publicID;
61         this.systemID = systemID;
62     }
63
64
65     public String JavaDoc getElementName() {
66         return elementName;
67     }
68
69     public void setElementName(String JavaDoc elementName) {
70         this.elementName = elementName;
71     }
72
73     /** @return the public ID of the document type
74      */

75     public String JavaDoc getPublicID() {
76         return publicID;
77     }
78
79     /** Sets the public ID of the document type
80      */

81     public void setPublicID(String JavaDoc publicID) {
82         this.publicID = publicID;
83     }
84
85     /** @return the system ID of the document type
86      */

87     public String JavaDoc getSystemID() {
88         return systemID;
89     }
90
91     /** Sets the system ID of the document type
92      */

93     public void setSystemID(String JavaDoc systemID) {
94         this.systemID = systemID;
95     }
96
97     public List JavaDoc getInternalDeclarations() {
98         return internalDeclarations;
99     }
100
101     public void setInternalDeclarations(List JavaDoc internalDeclarations) {
102         this.internalDeclarations = internalDeclarations;
103     }
104
105     public List JavaDoc getExternalDeclarations() {
106         return externalDeclarations;
107     }
108
109     public void setExternalDeclarations(List JavaDoc externalDeclarations) {
110         this.externalDeclarations = externalDeclarations;
111     }
112 }
113
114
115 /*
116  * Redistribution and use of this software and associated documentation
117  * ("Software"), with or without modification, are permitted provided
118  * that the following conditions are met:
119  *
120  * 1. Redistributions of source code must retain copyright
121  * statements and notices. Redistributions must also contain a
122  * copy of this document.
123  *
124  * 2. Redistributions in binary form must reproduce the
125  * above copyright notice, this list of conditions and the
126  * following disclaimer in the documentation and/or other
127  * materials provided with the distribution.
128  *
129  * 3. The name "DOM4J" must not be used to endorse or promote
130  * products derived from this Software without prior written
131  * permission of MetaStuff, Ltd. For written permission,
132  * please contact dom4j-info@metastuff.com.
133  *
134  * 4. Products derived from this Software may not be called "DOM4J"
135  * nor may "DOM4J" appear in their names without prior written
136  * permission of MetaStuff, Ltd. DOM4J is a registered
137  * trademark of MetaStuff, Ltd.
138  *
139  * 5. Due credit should be given to the DOM4J Project
140  * (http://dom4j.org/).
141  *
142  * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS
143  * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
144  * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
145  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
146  * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
147  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
148  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
149  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
150  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
151  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
152  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
153  * OF THE POSSIBILITY OF SUCH DAMAGE.
154  *
155  * Copyright 2001 (C) MetaStuff, Ltd. All Rights Reserved.
156  *
157  * $Id: DefaultDocumentType.java,v 1.2 2003/06/10 16:18:36 per_nyfelt Exp $
158  */

159
Popular Tags