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.FormalProofVo; |
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 |
|
|
|
|
| 84.6% |
Uncovered Elements: 4 (26) |
Complexity: 9 |
Complexity Density: 0.69 |
|
29 |
|
public class FormalProofHandler extends AbstractSimpleHandler { |
30 |
|
|
31 |
|
|
32 |
|
private final FormalProofLineListHandler formalProofLineListHandler; |
33 |
|
|
34 |
|
|
35 |
|
private FormalProofVo proof; |
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
@param |
41 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0.5 |
|
42 |
147
|
public FormalProofHandler(final AbstractSimpleHandler handler) {... |
43 |
147
|
super(handler, "FORMAL_PROOF"); |
44 |
147
|
formalProofLineListHandler = new FormalProofLineListHandler(this); |
45 |
|
} |
46 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
47 |
53
|
public final void init() {... |
48 |
53
|
proof = null; |
49 |
|
} |
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
@return |
55 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
56 |
53
|
public final FormalProofVo getProof() {... |
57 |
53
|
return proof; |
58 |
|
} |
59 |
|
|
|
|
| 77.8% |
Uncovered Elements: 2 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
60 |
106
|
public final void startElement(final String name, final SimpleAttributes attributes)... |
61 |
|
throws XmlSyntaxException { |
62 |
106
|
if (getStartTag().equals(name)) { |
63 |
53
|
proof = new FormalProofVo(); |
64 |
53
|
} else if (formalProofLineListHandler.getStartTag().equals(name)) { |
65 |
53
|
changeHandler(formalProofLineListHandler, name, attributes); |
66 |
|
} else { |
67 |
0
|
throw XmlSyntaxException.createUnexpectedTagException(name); |
68 |
|
} |
69 |
|
} |
70 |
|
|
|
|
| 75% |
Uncovered Elements: 2 (8) |
Complexity: 3 |
Complexity Density: 0.75 |
|
71 |
106
|
public final void endElement(final String name) throws XmlSyntaxException {... |
72 |
106
|
if (getStartTag().equals(name)) { |
73 |
|
|
74 |
53
|
} else if (formalProofLineListHandler.getStartTag().equals(name)) { |
75 |
53
|
proof.setFormalProofLineList(formalProofLineListHandler.getFormalProofLineList()); |
76 |
|
} else { |
77 |
0
|
throw XmlSyntaxException.createUnexpectedTagException(name); |
78 |
|
} |
79 |
|
} |
80 |
|
|
81 |
|
} |