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.LocationListVo; |
19 |
|
import org.qedeq.kernel.se.dto.module.LocationVo; |
20 |
|
import org.qedeq.kernel.se.dto.module.SpecificationVo; |
21 |
|
import org.qedeq.kernel.xml.common.XmlSyntaxException; |
22 |
|
import org.qedeq.kernel.xml.handler.common.AbstractSimpleHandler; |
23 |
|
import org.qedeq.kernel.xml.handler.common.SimpleAttributes; |
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
@version |
30 |
|
@author |
31 |
|
|
|
|
| 88.9% |
Uncovered Elements: 4 (36) |
Complexity: 11 |
Complexity Density: 0.58 |
|
32 |
|
public class SpecificationHandler extends AbstractSimpleHandler { |
33 |
|
|
34 |
|
|
35 |
|
private SpecificationVo specification; |
36 |
|
|
37 |
|
|
38 |
|
private String moduleName; |
39 |
|
|
40 |
|
|
41 |
|
private String ruleVersion; |
42 |
|
|
43 |
|
|
44 |
|
private LocationListVo locations; |
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
@param |
51 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
52 |
441
|
public SpecificationHandler(final AbstractSimpleHandler handler) {... |
53 |
441
|
super(handler, "SPECIFICATION"); |
54 |
|
} |
55 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0.25 |
|
56 |
311
|
public final void init() {... |
57 |
311
|
specification = null; |
58 |
311
|
moduleName = null; |
59 |
311
|
ruleVersion = null; |
60 |
311
|
locations = null; |
61 |
|
} |
62 |
|
|
63 |
|
|
64 |
|
|
65 |
|
|
66 |
|
@return |
67 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
68 |
311
|
public final SpecificationVo getSpecification() {... |
69 |
311
|
return specification; |
70 |
|
} |
71 |
|
|
|
|
| 85.7% |
Uncovered Elements: 2 (14) |
Complexity: 4 |
Complexity Density: 0.5 |
|
72 |
979
|
public final void startElement(final String name, final SimpleAttributes attributes)... |
73 |
|
throws XmlSyntaxException { |
74 |
979
|
if (getStartTag().equals(name)) { |
75 |
311
|
locations = new LocationListVo(); |
76 |
311
|
moduleName = attributes.getString("name"); |
77 |
311
|
ruleVersion = attributes.getString("ruleVersion"); |
78 |
668
|
} else if ("LOCATIONS".equals(name)) { |
79 |
|
|
80 |
357
|
} else if ("LOCATION".equals(name)) { |
81 |
357
|
locations.add(new LocationVo(attributes.getString("value"))); |
82 |
|
} else { |
83 |
0
|
throw XmlSyntaxException.createUnexpectedTagException(name); |
84 |
|
} |
85 |
|
} |
86 |
|
|
|
|
| 81.8% |
Uncovered Elements: 2 (11) |
Complexity: 4 |
Complexity Density: 0.8 |
|
87 |
979
|
public final void endElement(final String name) throws XmlSyntaxException {... |
88 |
979
|
if (getStartTag().equals(name)) { |
89 |
311
|
specification = new SpecificationVo(moduleName, ruleVersion, locations); |
90 |
668
|
} else if ("LOCATIONS".equals(name)) { |
91 |
|
|
92 |
357
|
} else if ("LOCATION".equals(name)) { |
93 |
|
|
94 |
|
} else { |
95 |
0
|
throw XmlSyntaxException.createUnexpectedTagException(name); |
96 |
|
} |
97 |
|
} |
98 |
|
|
99 |
|
} |