1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.qedeq.kernel.xml.handler.module; |
17 |
|
|
18 |
|
import org.qedeq.kernel.se.dto.module.ConditionalProofVo; |
19 |
|
import org.qedeq.kernel.xml.common.XmlSyntaxException; |
20 |
|
import org.qedeq.kernel.xml.handler.common.AbstractSimpleHandler; |
21 |
|
import org.qedeq.kernel.xml.handler.common.SimpleAttributes; |
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
@author |
28 |
|
|
|
|
| 90.2% |
Uncovered Elements: 4 (41) |
Complexity: 13 |
Complexity Density: 0.65 |
|
29 |
|
public class ConditionalProofHandler extends AbstractSimpleHandler { |
30 |
|
|
31 |
|
|
32 |
|
private ConditionalProofVo conditionalProof; |
33 |
|
|
34 |
|
|
35 |
|
private HypothesisHandler hypothesisHandler; |
36 |
|
|
37 |
|
|
38 |
|
private FormalProofLineListHandler proofListHandler; |
39 |
|
|
40 |
|
|
41 |
|
private ConclusionHandler conclusionHandler; |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
|
|
46 |
|
@param |
47 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
48 |
1064
|
public ConditionalProofHandler(final AbstractSimpleHandler handler) {... |
49 |
1064
|
super(handler, "CP"); |
50 |
|
} |
51 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
52 |
450
|
public final void init() {... |
53 |
450
|
conditionalProof = null; |
54 |
|
|
55 |
450
|
hypothesisHandler = new HypothesisHandler(this); |
56 |
450
|
proofListHandler = new FormalProofLineListHandler(this); |
57 |
450
|
conclusionHandler = new ConclusionHandler(this); |
58 |
|
} |
59 |
|
|
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
@return |
64 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
65 |
450
|
public final ConditionalProofVo getConditionalProofVo() {... |
66 |
450
|
return conditionalProof; |
67 |
|
} |
68 |
|
|
|
|
| 87.5% |
Uncovered Elements: 2 (16) |
Complexity: 5 |
Complexity Density: 0.62 |
|
69 |
1800
|
public final void startElement(final String name, final SimpleAttributes attributes)... |
70 |
|
throws XmlSyntaxException { |
71 |
1800
|
if (getStartTag().equals(name)) { |
72 |
|
|
73 |
1350
|
} else if (hypothesisHandler.getStartTag().equals(name)) { |
74 |
450
|
changeHandler(hypothesisHandler, name, attributes); |
75 |
900
|
} else if (proofListHandler.getStartTag().equals(name)) { |
76 |
450
|
changeHandler(proofListHandler, name, attributes); |
77 |
450
|
} else if (conclusionHandler.getStartTag().equals(name)) { |
78 |
450
|
changeHandler(conclusionHandler, name, attributes); |
79 |
|
} else { |
80 |
0
|
throw XmlSyntaxException.createUnexpectedTagException(name); |
81 |
|
} |
82 |
|
} |
83 |
|
|
|
|
| 85.7% |
Uncovered Elements: 2 (14) |
Complexity: 5 |
Complexity Density: 0.83 |
|
84 |
1800
|
public final void endElement(final String name) throws XmlSyntaxException {... |
85 |
1800
|
if (getStartTag().equals(name)) { |
86 |
450
|
conditionalProof = new ConditionalProofVo(hypothesisHandler.getHypothesis(), |
87 |
|
proofListHandler.getFormalProofLineList(), |
88 |
|
conclusionHandler.getConclusion()); |
89 |
1350
|
} else if (hypothesisHandler.getStartTag().equals(name)) { |
90 |
|
|
91 |
900
|
} else if (proofListHandler.getStartTag().equals(name)) { |
92 |
|
|
93 |
450
|
} else if (conclusionHandler.getStartTag().equals(name)) { |
94 |
|
|
95 |
|
} else { |
96 |
0
|
throw XmlSyntaxException.createUnexpectedTagException(name); |
97 |
|
} |
98 |
|
} |
99 |
|
|
100 |
|
} |