Clover coverage report - dom4j - 1.6.1 Coverage timestamp: ma mei 16 2005 14:23:01 GMT+01:00 FRAMES NO FRAMES |
file stats: | LOC: | 174 |  | Methods: | 13
| NCLOC: | 51 |  | Classes: | 1
Source file | Conditionals | Statements | Methods | TOTAL
DefaultDocumentType.java | - | 73,3% | 76,9% | 75% |

1 |  | /*
2 |  | * Copyright 2001-2005 (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 |  |
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 | 1 | 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 | 0 | public DefaultDocumentType(String elementName, String systemID) {
52 | 0 | this.elementName = elementName;
53 | 0 | 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 | 13 | public DefaultDocumentType(String elementName, String publicID,
70 |  | String systemID) {
71 | 13 | this.elementName = elementName;
72 | 13 | this.publicID = publicID;
73 | 13 | this.systemID = systemID;
74 |  | }
75 |  |
76 | 9 | public String getElementName() {
77 | 9 | return elementName;
78 |  | }
79 |  |
80 | 1 | public void setElementName(String elementName) {
81 | 1 | this.elementName = elementName;
82 |  | }
83 |  |
84 |  | /**
85 |  | * DOCUMENT ME!
86 |  | *
87 |  | * @return the public ID of the document type
88 |  | */
89 | 9 | public String getPublicID() {
90 | 9 | return publicID;
91 |  | }
92 |  |
93 |  | /**
94 |  | * Sets the public ID of the document type
95 |  | *
96 |  | * @param publicID
97 |  | * DOCUMENT ME!
98 |  | */
99 | 0 | public void setPublicID(String publicID) {
100 | 0 | this.publicID = publicID;
101 |  | }
102 |  |
103 |  | /**
104 |  | * DOCUMENT ME!
105 |  | *
106 |  | * @return the system ID of the document type
107 |  | */
108 | 9 | public String getSystemID() {
109 | 9 | return systemID;
110 |  | }
111 |  |
112 |  | /**
113 |  | * Sets the system ID of the document type
114 |  | *
115 |  | * @param systemID
116 |  | * DOCUMENT ME!
117 |  | */
118 | 0 | public void setSystemID(String systemID) {
119 | 0 | this.systemID = systemID;
120 |  | }
121 |  |
122 | 8 | public List getInternalDeclarations() {
123 | 8 | return internalDeclarations;
124 |  | }
125 |  |
126 | 6 | public void setInternalDeclarations(List internalDeclarations) {
127 | 6 | this.internalDeclarations = internalDeclarations;
128 |  | }
129 |  |
130 | 6 | public List getExternalDeclarations() {
131 | 6 | return externalDeclarations;
132 |  | }
133 |  |
134 | 5 | public void setExternalDeclarations(List externalDeclarations) {
135 | 5 | this.externalDeclarations = externalDeclarations;
136 |  | }
137 |  | }
138 |  |
139 |  | /*
140 |  | * Redistribution and use of this software and associated documentation
141 |  | * ("Software"), with or without modification, are permitted provided that the
142 |  | * following conditions are met:
143 |  | *
144 |  | * 1. Redistributions of source code must retain copyright statements and
145 |  | * notices. Redistributions must also contain a copy of this document.
146 |  | *
147 |  | * 2. Redistributions in binary form must reproduce the above copyright notice,
148 |  | * this list of conditions and the following disclaimer in the documentation
149 |  | * and/or other materials provided with the distribution.
150 |  | *
151 |  | * 3. The name "DOM4J" must not be used to endorse or promote products derived
152 |  | * from this Software without prior written permission of MetaStuff, Ltd. For
153 |  | * written permission, please contact dom4j-info@metastuff.com.
154 |  | *
155 |  | * 4. Products derived from this Software may not be called "DOM4J" nor may
156 |  | * "DOM4J" appear in their names without prior written permission of MetaStuff,
157 |  | * Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.
158 |  | *
159 |  | * 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org
160 |  | *
161 |  | * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND
162 |  | * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
163 |  | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
164 |  | * ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE
165 |  | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
166 |  | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
167 |  | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
168 |  | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
169 |  | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
170 |  | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
171 |  | * POSSIBILITY OF SUCH DAMAGE.
172 |  | *
173 |  | * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
174 |  | */