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.base.module.Conclusion; |
19 |
|
import org.qedeq.kernel.se.dto.module.ConclusionVo; |
20 |
|
import org.qedeq.kernel.xml.common.XmlSyntaxException; |
21 |
|
import org.qedeq.kernel.xml.handler.common.AbstractSimpleHandler; |
22 |
|
import org.qedeq.kernel.xml.handler.common.SimpleAttributes; |
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
@author |
29 |
|
|
|
|
| 85.2% |
Uncovered Elements: 4 (27) |
Complexity: 9 |
Complexity Density: 0.64 |
|
30 |
|
public class ConclusionHandler extends AbstractSimpleHandler { |
31 |
|
|
32 |
|
|
33 |
|
private final FormulaHandler formulaHandler; |
34 |
|
|
35 |
|
|
36 |
|
private ConclusionVo conclusion; |
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
@param |
42 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
43 |
450
|
public ConclusionHandler(final AbstractSimpleHandler handler) {... |
44 |
450
|
super(handler, "CONCLUSION"); |
45 |
450
|
formulaHandler = new FormulaHandler(this); |
46 |
|
} |
47 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
48 |
450
|
public final void init() {... |
49 |
450
|
conclusion = null; |
50 |
|
} |
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
@return |
56 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
57 |
450
|
public final Conclusion getConclusion() {... |
58 |
450
|
return conclusion; |
59 |
|
} |
60 |
|
|
|
|
| 80% |
Uncovered Elements: 2 (10) |
Complexity: 3 |
Complexity Density: 0.5 |
|
61 |
900
|
public final void startElement(final String name, final SimpleAttributes attributes)... |
62 |
|
throws XmlSyntaxException { |
63 |
900
|
if (getStartTag().equals(name)) { |
64 |
450
|
conclusion = new ConclusionVo(); |
65 |
450
|
conclusion.setLabel(attributes.getString("label")); |
66 |
450
|
} else if (formulaHandler.getStartTag().equals(name)) { |
67 |
450
|
changeHandler(formulaHandler, name, attributes); |
68 |
|
} else { |
69 |
0
|
throw XmlSyntaxException.createUnexpectedTagException(name); |
70 |
|
} |
71 |
|
} |
72 |
|
|
|
|
| 75% |
Uncovered Elements: 2 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
73 |
900
|
public final void endElement(final String name) throws XmlSyntaxException {... |
74 |
900
|
if (getStartTag().equals(name)) { |
75 |
|
|
76 |
450
|
} else if (formulaHandler.getStartTag().equals(name)) { |
77 |
450
|
conclusion.setFormula(formulaHandler.getFormula()); |
78 |
|
} else { |
79 |
0
|
throw XmlSyntaxException.createUnexpectedTagException(name); |
80 |
|
} |
81 |
|
} |
82 |
|
|
83 |
|
} |