1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
package org.qedeq.kernel.dto.module; |
19 |
|
|
20 |
|
import org.qedeq.base.utility.EqualsUtility; |
21 |
|
import org.qedeq.kernel.base.module.Axiom; |
22 |
|
import org.qedeq.kernel.base.module.FunctionDefinition; |
23 |
|
import org.qedeq.kernel.base.module.LatexList; |
24 |
|
import org.qedeq.kernel.base.module.LinkList; |
25 |
|
import org.qedeq.kernel.base.module.PredicateDefinition; |
26 |
|
import org.qedeq.kernel.base.module.ProofList; |
27 |
|
import org.qedeq.kernel.base.module.Proposition; |
28 |
|
import org.qedeq.kernel.base.module.Rule; |
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
@version |
35 |
|
@author |
36 |
|
|
|
|
| 87,7% |
Uncovered Elements: 8 (65) |
Complexity: 22 |
Complexity Density: 0,69 |
|
37 |
|
public class RuleVo implements Rule { |
38 |
|
|
39 |
|
|
40 |
|
private LinkListVo linkList; |
41 |
|
|
42 |
|
|
43 |
|
private LatexList description; |
44 |
|
|
45 |
|
|
46 |
|
private String name; |
47 |
|
|
48 |
|
|
49 |
|
private ProofListVo proofList; |
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
54 |
284
|
public RuleVo() {... |
55 |
|
|
56 |
|
} |
57 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
58 |
0
|
public Axiom getAxiom() {... |
59 |
0
|
return null; |
60 |
|
} |
61 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
62 |
0
|
public PredicateDefinition getPredicateDefinition() {... |
63 |
0
|
return null; |
64 |
|
} |
65 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
66 |
0
|
public FunctionDefinition getFunctionDefinition() {... |
67 |
0
|
return null; |
68 |
|
} |
69 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
70 |
0
|
public Proposition getProposition() {... |
71 |
0
|
return null; |
72 |
|
} |
73 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
74 |
202
|
public Rule getRule() {... |
75 |
202
|
return this; |
76 |
|
} |
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
|
81 |
|
@param |
82 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
83 |
247
|
public final void setName(final String name) {... |
84 |
247
|
this.name = name; |
85 |
|
} |
86 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
87 |
827
|
public final String getName() {... |
88 |
827
|
return name; |
89 |
|
} |
90 |
|
|
91 |
|
|
92 |
|
|
93 |
|
|
94 |
|
@param |
95 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
96 |
23
|
public final void setLinkList(final LinkListVo linkList) {... |
97 |
23
|
this.linkList = linkList; |
98 |
|
} |
99 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
100 |
1046
|
public final LinkList getLinkList() {... |
101 |
1046
|
return linkList; |
102 |
|
} |
103 |
|
|
104 |
|
|
105 |
|
|
106 |
|
|
107 |
|
@param |
108 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0,67 |
|
109 |
15
|
public final void addLink(final String id) {... |
110 |
15
|
if (linkList == null) { |
111 |
10
|
linkList = new LinkListVo(); |
112 |
|
} |
113 |
15
|
linkList.add(id); |
114 |
|
} |
115 |
|
|
116 |
|
|
117 |
|
|
118 |
|
|
119 |
|
@param |
120 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
121 |
247
|
public final void setDescription(final LatexListVo description) {... |
122 |
247
|
this.description = description; |
123 |
|
} |
124 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
125 |
1811
|
public LatexList getDescription() {... |
126 |
1811
|
return description; |
127 |
|
} |
128 |
|
|
129 |
|
|
130 |
|
|
131 |
|
|
132 |
|
@param |
133 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
134 |
16
|
public final void setProofList(final ProofListVo proofList) {... |
135 |
16
|
this.proofList = proofList; |
136 |
|
} |
137 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
138 |
883
|
public final ProofList getProofList() {... |
139 |
883
|
return proofList; |
140 |
|
} |
141 |
|
|
142 |
|
|
143 |
|
|
144 |
|
|
145 |
|
@param |
146 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 2 |
Complexity Density: 0,67 |
|
147 |
7
|
public final void addProof(final ProofVo proof) {... |
148 |
7
|
if (proofList == null) { |
149 |
2
|
proofList = new ProofListVo(); |
150 |
|
} |
151 |
7
|
proofList.add(proof); |
152 |
|
} |
153 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (6) |
Complexity: 2 |
Complexity Density: 0,5 |
|
154 |
85
|
public boolean equals(final Object obj) {... |
155 |
85
|
if (!(obj instanceof RuleVo)) { |
156 |
8
|
return false; |
157 |
|
} |
158 |
77
|
final RuleVo other = (RuleVo) obj; |
159 |
77
|
return EqualsUtility.equals(getName(), other.getName()) |
160 |
|
&& EqualsUtility.equals(getLinkList(), other.getLinkList()) |
161 |
|
&& EqualsUtility.equals(getDescription(), other.getDescription()) |
162 |
|
&& EqualsUtility.equals(getProofList(), other.getProofList()); |
163 |
|
} |
164 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (9) |
Complexity: 1 |
Complexity Density: 1 |
|
165 |
76
|
public int hashCode() {... |
166 |
76
|
return (getName() != null ? 1 ^ getName().hashCode() : 0) |
167 |
76
|
^ (getLinkList() != null ? 1 ^ getLinkList().hashCode() : 0) |
168 |
76
|
^ (getDescription() != null ? 2 ^ getDescription().hashCode() : 0) |
169 |
76
|
^ (getProofList() != null ? 2 ^ getProofList().hashCode() : 0); |
170 |
|
} |
171 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0,12 |
|
172 |
54
|
public String toString() {... |
173 |
54
|
final StringBuffer buffer = new StringBuffer(); |
174 |
54
|
buffer.append("Rule: " + getName() + "\n"); |
175 |
54
|
buffer.append(getLinkList()); |
176 |
54
|
buffer.append("\nDescription:\n"); |
177 |
54
|
buffer.append(getDescription()); |
178 |
54
|
buffer.append("\nProof:\n"); |
179 |
54
|
buffer.append(getProofList()); |
180 |
54
|
return buffer.toString(); |
181 |
|
} |
182 |
|
} |