Clover coverage report - dom4j - 1.6.1
Coverage timestamp: ma mei 16 2005 14:23:01 GMT+01:00

file stats: | LOC: | 105 |  | Methods: | 7
| NCLOC: | 27 |  | Classes: | 1

Source file | Conditionals | Statements | Methods | TOTAL

DefaultText.java

-

75%

85,7%

80%

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 org.dom4j.Element;
11 |  |
12 |  | /**
13 |  | * <p>
14 |  | * <code>DefaultText</code> is the default Text implementation. It is a doubly
15 |  | * linked node which supports the parent relationship and can be modified in
16 |  | * place.
17 |  | * </p>
18 |  | *
19 |  | * @author <a href="mailto:jstrachan@apache.org">James Strachan </a>
20 |  | * @version $Revision: 1.11 $
21 |  | */
22 |  | public class DefaultText extends FlyweightText {
23 |  | /** The parent of this node */
24 |  | private Element parent;
25 |  |
26 |  | /**
27 |  | * DOCUMENT ME!
28 |  | *
29 |  | * @param text
30 |  | * is the Text text
31 |  | */
32 | 121763 | public DefaultText(String text) {
33 | 121763 | super(text);
34 |  | }
35 |  |
36 |  | /**
37 |  | * DOCUMENT ME!
38 |  | *
39 |  | * @param parent
40 |  | * is the parent element
41 |  | * @param text
42 |  | * is the Text text
43 |  | */
44 | 0 | public DefaultText(Element parent, String text) {
45 | 0 | super(text);
46 | 0 | this.parent = parent;
47 |  | }
48 |  |
49 | 12026 | public void setText(String text) {
50 | 12026 | this.text = text;
51 |  | }
52 |  |
53 | 266 | public Element getParent() {
54 | 266 | return parent;
55 |  | }
56 |  |
57 | 134189 | public void setParent(Element parent) {
58 | 134189 | this.parent = parent;
59 |  | }
60 |  |
61 | 6 | public boolean supportsParent() {
62 | 6 | return true;
63 |  | }
64 |  |
65 | 200 | public boolean isReadOnly() {
66 | 200 | return false;
67 |  | }
68 |  | }
69 |  |
70 |  | /*
71 |  | * Redistribution and use of this software and associated documentation
72 |  | * ("Software"), with or without modification, are permitted provided that the
73 |  | * following conditions are met:
74 |  | *
75 |  | * 1. Redistributions of source code must retain copyright statements and
76 |  | * notices. Redistributions must also contain a copy of this document.
77 |  | *
78 |  | * 2. Redistributions in binary form must reproduce the above copyright notice,
79 |  | * this list of conditions and the following disclaimer in the documentation
80 |  | * and/or other materials provided with the distribution.
81 |  | *
82 |  | * 3. The name "DOM4J" must not be used to endorse or promote products derived
83 |  | * from this Software without prior written permission of MetaStuff, Ltd. For
84 |  | * written permission, please contact dom4j-info@metastuff.com.
85 |  | *
86 |  | * 4. Products derived from this Software may not be called "DOM4J" nor may
87 |  | * "DOM4J" appear in their names without prior written permission of MetaStuff,
88 |  | * Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.
89 |  | *
90 |  | * 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org
91 |  | *
92 |  | * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND
93 |  | * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
94 |  | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
95 |  | * ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE
96 |  | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
97 |  | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
98 |  | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
99 |  | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
100 |  | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
101 |  | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
102 |  | * POSSIBILITY OF SUCH DAMAGE.
103 |  | *
104 |  | * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.
105 |  | */