|
|||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
ElementDecl.java | - | 71,4% | 57,1% | 64,3% |
|
1 | /* | |
2 | * Copyright 2001-2004 (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: ElementDecl.java,v 1.4 2004/06/25 08:03:36 maartenc Exp $ | |
8 | */ | |
9 | ||
10 | package org.dom4j.dtd; | |
11 | ||
12 | /** <p><code>AttributeDecl</code> represents an element declaration in a DTD.</p> | |
13 | * | |
14 | * @author <a href="mailto:james.strachan@metastuff.com">James Strachan</a> | |
15 | * @version $Revision: 1.4 $ | |
16 | */ | |
17 | public class ElementDecl { | |
18 | ||
19 | /** Holds value of property name. */ | |
20 | private String name; | |
21 | ||
22 | /** Holds value of property model. */ | |
23 | private String model; | |
24 | ||
25 | ||
26 | 0 | public ElementDecl() { |
27 | } | |
28 | ||
29 | 22 | public ElementDecl(String name, String model) { |
30 | 22 | this.name = name; |
31 | 22 | this.model = model; |
32 | } | |
33 | ||
34 | /** Getter for property name. | |
35 | * @return Value of property name. | |
36 | */ | |
37 | 22 | public String getName() { |
38 | 22 | return name; |
39 | } | |
40 | ||
41 | /** Setter for property name. | |
42 | * @param name New value of property name. | |
43 | */ | |
44 | 0 | public void setName(String name) { |
45 | 0 | this.name = name; |
46 | } | |
47 | ||
48 | /** Getter for property model. | |
49 | * @return Value of property model. | |
50 | */ | |
51 | 22 | public String getModel() { |
52 | 22 | return model; |
53 | } | |
54 | ||
55 | /** Setter for property model. | |
56 | * @param model New value of property model. | |
57 | */ | |
58 | 0 | public void setModel(String model) { |
59 | 0 | this.model = model; |
60 | } | |
61 | ||
62 | 36 | public String toString() { |
63 | 36 | return "<!ELEMENT " + name + " " + model + ">"; |
64 | } | |
65 | } | |
66 | ||
67 | ||
68 | ||
69 | ||
70 | /* | |
71 | * Redistribution and use of this software and associated documentation | |
72 | * ("Software"), with or without modification, are permitted provided | |
73 | * that the following conditions are met: | |
74 | * | |
75 | * 1. Redistributions of source code must retain copyright | |
76 | * statements and notices. Redistributions must also contain a | |
77 | * copy of this document. | |
78 | * | |
79 | * 2. Redistributions in binary form must reproduce the | |
80 | * above copyright notice, this list of conditions and the | |
81 | * following disclaimer in the documentation and/or other | |
82 | * materials provided with the distribution. | |
83 | * | |
84 | * 3. The name "DOM4J" must not be used to endorse or promote | |
85 | * products derived from this Software without prior written | |
86 | * permission of MetaStuff, Ltd. For written permission, | |
87 | * please contact dom4j-info@metastuff.com. | |
88 | * | |
89 | * 4. Products derived from this Software may not be called "DOM4J" | |
90 | * nor may "DOM4J" appear in their names without prior written | |
91 | * permission of MetaStuff, Ltd. DOM4J is a registered | |
92 | * trademark of MetaStuff, Ltd. | |
93 | * | |
94 | * 5. Due credit should be given to the DOM4J Project - | |
95 | * http://www.dom4j.org | |
96 | * | |
97 | * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS | |
98 | * ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT | |
99 | * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND | |
100 | * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL | |
101 | * METASTUFF, LTD. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, | |
102 | * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | |
103 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
104 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
105 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | |
106 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
107 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | |
108 | * OF THE POSSIBILITY OF SUCH DAMAGE. | |
109 | * | |
110 | * Copyright 2001-2004 (C) MetaStuff, Ltd. All Rights Reserved. | |
111 | * | |
112 | * $Id: ElementDecl.java,v 1.4 2004/06/25 08:03:36 maartenc Exp $ | |
113 | */ |
|