1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
package org.qedeq.kernel.bo.module; |
19 |
|
|
20 |
|
import java.io.File; |
21 |
|
import java.io.IOException; |
22 |
|
import java.lang.reflect.InvocationTargetException; |
23 |
|
|
24 |
|
import javax.xml.parsers.ParserConfigurationException; |
25 |
|
|
26 |
|
import org.qedeq.base.io.IoUtility; |
27 |
|
import org.qedeq.base.test.DynamicGetter; |
28 |
|
import org.qedeq.base.test.QedeqTestCase; |
29 |
|
import org.qedeq.base.trace.Trace; |
30 |
|
import org.qedeq.kernel.base.list.Atom; |
31 |
|
import org.qedeq.kernel.base.list.ElementList; |
32 |
|
import org.qedeq.kernel.base.module.Author; |
33 |
|
import org.qedeq.kernel.base.module.AuthorList; |
34 |
|
import org.qedeq.kernel.base.module.Axiom; |
35 |
|
import org.qedeq.kernel.base.module.Chapter; |
36 |
|
import org.qedeq.kernel.base.module.ChapterList; |
37 |
|
import org.qedeq.kernel.base.module.Formula; |
38 |
|
import org.qedeq.kernel.base.module.FunctionDefinition; |
39 |
|
import org.qedeq.kernel.base.module.Header; |
40 |
|
import org.qedeq.kernel.base.module.Import; |
41 |
|
import org.qedeq.kernel.base.module.ImportList; |
42 |
|
import org.qedeq.kernel.base.module.Latex; |
43 |
|
import org.qedeq.kernel.base.module.LatexList; |
44 |
|
import org.qedeq.kernel.base.module.LinkList; |
45 |
|
import org.qedeq.kernel.base.module.LiteratureItem; |
46 |
|
import org.qedeq.kernel.base.module.LiteratureItemList; |
47 |
|
import org.qedeq.kernel.base.module.Location; |
48 |
|
import org.qedeq.kernel.base.module.LocationList; |
49 |
|
import org.qedeq.kernel.base.module.Node; |
50 |
|
import org.qedeq.kernel.base.module.PredicateDefinition; |
51 |
|
import org.qedeq.kernel.base.module.Proof; |
52 |
|
import org.qedeq.kernel.base.module.ProofList; |
53 |
|
import org.qedeq.kernel.base.module.Proposition; |
54 |
|
import org.qedeq.kernel.base.module.Qedeq; |
55 |
|
import org.qedeq.kernel.base.module.Rule; |
56 |
|
import org.qedeq.kernel.base.module.Section; |
57 |
|
import org.qedeq.kernel.base.module.SectionList; |
58 |
|
import org.qedeq.kernel.base.module.Specification; |
59 |
|
import org.qedeq.kernel.base.module.Subsection; |
60 |
|
import org.qedeq.kernel.base.module.SubsectionList; |
61 |
|
import org.qedeq.kernel.base.module.SubsectionType; |
62 |
|
import org.qedeq.kernel.base.module.Term; |
63 |
|
import org.qedeq.kernel.base.module.UsedByList; |
64 |
|
import org.qedeq.kernel.base.module.VariableList; |
65 |
|
import org.qedeq.kernel.bo.control.QedeqBoFactoryTest; |
66 |
|
import org.qedeq.kernel.bo.service.DefaultModuleAddress; |
67 |
|
import org.qedeq.kernel.common.ModuleAddress; |
68 |
|
import org.qedeq.kernel.common.ModuleDataException; |
69 |
|
import org.qedeq.kernel.visitor.QedeqNotNullTraverser; |
70 |
|
import org.qedeq.kernel.visitor.QedeqVisitor; |
71 |
|
import org.qedeq.kernel.xml.mapper.Context2SimpleXPath; |
72 |
|
import org.qedeq.kernel.xml.tracker.SimpleXPath; |
73 |
|
import org.qedeq.kernel.xml.tracker.XPathLocationParser; |
74 |
|
import org.xml.sax.SAXException; |
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
|
81 |
|
@version |
82 |
|
@author |
83 |
|
|
|
|
| 88% |
Uncovered Elements: 21 (175) |
Complexity: 81 |
Complexity Density: 0,84 |
|
84 |
|
public class VisitorContextTest extends QedeqTestCase implements QedeqVisitor { |
85 |
|
|
86 |
|
|
87 |
|
private static final Class CLASS = VisitorContextTest.class; |
88 |
|
|
89 |
|
|
90 |
|
private QedeqNotNullTraverser traverser; |
91 |
|
|
92 |
|
private Qedeq qedeq; |
93 |
|
|
94 |
|
private File moduleFile; |
95 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (5) |
Complexity: 1 |
Complexity Density: 0,2 |
1
PASS
|
|
96 |
1
|
public void testContext() throws Exception {... |
97 |
1
|
moduleFile = QedeqBoFactoryTest.getQedeqFile("math/qedeq_set_theory_v1.xml"); |
98 |
1
|
final ModuleAddress globalContext = new DefaultModuleAddress(moduleFile); |
99 |
1
|
qedeq = QedeqBoFactoryTest.loadQedeq(moduleFile); |
100 |
1
|
traverser = new QedeqNotNullTraverser(globalContext, this); |
101 |
1
|
traverser.accept(qedeq); |
102 |
|
} |
103 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
104 |
1215
|
public void visitEnter(final Atom atom) throws ModuleDataException {... |
105 |
1215
|
checkContext(); |
106 |
|
} |
107 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
108 |
1459
|
public void visitEnter(final ElementList list) throws ModuleDataException {... |
109 |
1459
|
checkContext(); |
110 |
|
} |
111 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
112 |
1
|
public void visitEnter(final Author author) throws ModuleDataException {... |
113 |
1
|
checkContext(); |
114 |
|
} |
115 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
116 |
1
|
public void visitEnter(final AuthorList authorList) throws ModuleDataException {... |
117 |
1
|
checkContext(); |
118 |
|
} |
119 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
120 |
11
|
public void visitEnter(final Axiom axiom) throws ModuleDataException {... |
121 |
11
|
checkContext(); |
122 |
|
} |
123 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
124 |
8
|
public void visitEnter(final Chapter chapter) throws ModuleDataException {... |
125 |
8
|
checkContext(); |
126 |
|
} |
127 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
128 |
1
|
public void visitEnter(final ChapterList chapterList) throws ModuleDataException {... |
129 |
1
|
checkContext(); |
130 |
|
} |
131 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
132 |
71
|
public void visitEnter(final Formula formula) throws ModuleDataException {... |
133 |
71
|
checkContext(); |
134 |
|
} |
135 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
136 |
16
|
public void visitEnter(final FunctionDefinition functionDefinition) throws ModuleDataException {... |
137 |
16
|
checkContext(); |
138 |
|
} |
139 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
140 |
1
|
public void visitEnter(final Header header) throws ModuleDataException {... |
141 |
1
|
checkContext(); |
142 |
|
} |
143 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
144 |
1
|
public void visitEnter(final Import imp) throws ModuleDataException {... |
145 |
1
|
checkContext(); |
146 |
|
} |
147 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
148 |
1
|
public void visitEnter(final ImportList importList) throws ModuleDataException {... |
149 |
1
|
checkContext(); |
150 |
|
} |
151 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
152 |
495
|
public void visitEnter(final Latex latex) throws ModuleDataException {... |
153 |
495
|
checkContext(); |
154 |
|
} |
155 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
156 |
253
|
public void visitEnter(final LatexList latexList) throws ModuleDataException {... |
157 |
253
|
checkContext(); |
158 |
|
} |
159 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
160 |
1
|
public void visitEnter(final LinkList linkList) throws ModuleDataException {... |
161 |
1
|
checkContext(); |
162 |
|
} |
163 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
164 |
3
|
public void visitEnter(final LiteratureItem literatureItem) throws ModuleDataException {... |
165 |
3
|
checkContext(); |
166 |
|
} |
167 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
168 |
1
|
public void visitEnter(final LiteratureItemList literatureItemList) throws ModuleDataException {... |
169 |
1
|
checkContext(); |
170 |
|
} |
171 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
172 |
3
|
public void visitEnter(final Location location) throws ModuleDataException {... |
173 |
3
|
checkContext(); |
174 |
|
} |
175 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
176 |
2
|
public void visitEnter(final LocationList locationList) throws ModuleDataException {... |
177 |
2
|
checkContext(); |
178 |
|
} |
179 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
180 |
89
|
public void visitEnter(final Node authorList) throws ModuleDataException {... |
181 |
89
|
checkContext(); |
182 |
|
} |
183 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
184 |
7
|
public void visitEnter(final PredicateDefinition predicateDefinition)... |
185 |
|
throws ModuleDataException { |
186 |
7
|
checkContext(); |
187 |
|
} |
188 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
189 |
9
|
public void visitEnter(final Proof proof) throws ModuleDataException {... |
190 |
9
|
checkContext(); |
191 |
|
} |
192 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
193 |
8
|
public void visitEnter(final ProofList proofList) throws ModuleDataException {... |
194 |
8
|
checkContext(); |
195 |
|
} |
196 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
197 |
54
|
public void visitEnter(final Proposition proposition) throws ModuleDataException {... |
198 |
54
|
checkContext(); |
199 |
|
} |
200 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
201 |
1
|
public void visitEnter(final Qedeq qedeq) throws ModuleDataException {... |
202 |
1
|
checkContext(); |
203 |
|
} |
204 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
205 |
1
|
public void visitEnter(final Rule rule) throws ModuleDataException {... |
206 |
1
|
checkContext(); |
207 |
|
} |
208 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
209 |
22
|
public void visitEnter(final Section section) throws ModuleDataException {... |
210 |
22
|
checkContext(); |
211 |
|
} |
212 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
213 |
5
|
public void visitEnter(final SectionList sectionList) throws ModuleDataException {... |
214 |
5
|
checkContext(); |
215 |
|
} |
216 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
217 |
2
|
public void visitEnter(final Specification specification) throws ModuleDataException {... |
218 |
2
|
checkContext(); |
219 |
|
} |
220 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
221 |
2
|
public void visitEnter(final Subsection subsection) throws ModuleDataException {... |
222 |
2
|
checkContext(); |
223 |
|
} |
224 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
225 |
14
|
public void visitEnter(final SubsectionList subsectionList) throws ModuleDataException {... |
226 |
14
|
checkContext(); |
227 |
|
} |
228 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
229 |
0
|
public void visitEnter(final SubsectionType subsectionType) throws ModuleDataException {... |
230 |
0
|
checkContext(); |
231 |
|
} |
232 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
233 |
16
|
public void visitEnter(final Term term) throws ModuleDataException {... |
234 |
16
|
checkContext(); |
235 |
|
} |
236 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
237 |
0
|
public void visitEnter(final UsedByList usedByList) throws ModuleDataException {... |
238 |
0
|
checkContext(); |
239 |
|
} |
240 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
241 |
20
|
public void visitEnter(final VariableList variableList) throws ModuleDataException {... |
242 |
20
|
checkContext(); |
243 |
|
} |
244 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
245 |
1
|
public void visitLeave(final Author author) throws ModuleDataException {... |
246 |
1
|
checkContext(); |
247 |
|
} |
248 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
249 |
1
|
public void visitLeave(final AuthorList authorList) throws ModuleDataException {... |
250 |
1
|
checkContext(); |
251 |
|
} |
252 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
253 |
11
|
public void visitLeave(final Axiom axiom) throws ModuleDataException {... |
254 |
11
|
checkContext(); |
255 |
|
} |
256 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
257 |
8
|
public void visitLeave(final Chapter chapter) throws ModuleDataException {... |
258 |
8
|
checkContext(); |
259 |
|
} |
260 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
261 |
1
|
public void visitLeave(final ChapterList chapterList) throws ModuleDataException {... |
262 |
1
|
checkContext(); |
263 |
|
} |
264 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
265 |
71
|
public void visitLeave(final Formula formula) throws ModuleDataException {... |
266 |
71
|
checkContext(); |
267 |
|
} |
268 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
269 |
16
|
public void visitLeave(final FunctionDefinition functionDefinition) throws ModuleDataException {... |
270 |
16
|
checkContext(); |
271 |
|
} |
272 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
273 |
1
|
public void visitLeave(final Header header) throws ModuleDataException {... |
274 |
1
|
checkContext(); |
275 |
|
} |
276 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
277 |
1
|
public void visitLeave(final Import imp) throws ModuleDataException {... |
278 |
1
|
checkContext(); |
279 |
|
} |
280 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
281 |
1
|
public void visitLeave(final ImportList importList) throws ModuleDataException {... |
282 |
1
|
checkContext(); |
283 |
|
} |
284 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
285 |
495
|
public void visitLeave(final Latex latex) throws ModuleDataException {... |
286 |
495
|
checkContext(); |
287 |
|
} |
288 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
289 |
253
|
public void visitLeave(final LatexList latexList) throws ModuleDataException {... |
290 |
253
|
checkContext(); |
291 |
|
} |
292 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
293 |
1
|
public void visitLeave(final LinkList linkList) throws ModuleDataException {... |
294 |
1
|
checkContext(); |
295 |
|
} |
296 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
297 |
3
|
public void visitLeave(final LiteratureItem literatureItem) throws ModuleDataException {... |
298 |
3
|
checkContext(); |
299 |
|
} |
300 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
301 |
1
|
public void visitLeave(final LiteratureItemList literatureItemList) throws ModuleDataException {... |
302 |
1
|
checkContext(); |
303 |
|
} |
304 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
305 |
3
|
public void visitLeave(final Location location) throws ModuleDataException {... |
306 |
3
|
checkContext(); |
307 |
|
} |
308 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
309 |
2
|
public void visitLeave(final LocationList locationList) throws ModuleDataException {... |
310 |
2
|
checkContext(); |
311 |
|
} |
312 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
313 |
89
|
public void visitLeave(final Node authorList) throws ModuleDataException {... |
314 |
89
|
checkContext(); |
315 |
|
} |
316 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
317 |
7
|
public void visitLeave(final PredicateDefinition predicateDefinition)... |
318 |
|
throws ModuleDataException { |
319 |
7
|
checkContext(); |
320 |
|
} |
321 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
322 |
9
|
public void visitLeave(final Proof proof) throws ModuleDataException {... |
323 |
9
|
checkContext(); |
324 |
|
} |
325 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
326 |
8
|
public void visitLeave(final ProofList proofList) throws ModuleDataException {... |
327 |
8
|
checkContext(); |
328 |
|
} |
329 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
330 |
54
|
public void visitLeave(final Proposition proposition) throws ModuleDataException {... |
331 |
54
|
checkContext(); |
332 |
|
} |
333 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
334 |
1
|
public void visitLeave(final Qedeq qedeq) throws ModuleDataException {... |
335 |
1
|
checkContext(); |
336 |
|
} |
337 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
338 |
1
|
public void visitLeave(final Rule rule) throws ModuleDataException {... |
339 |
1
|
checkContext(); |
340 |
|
} |
341 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
342 |
22
|
public void visitLeave(final Section section) throws ModuleDataException {... |
343 |
22
|
checkContext(); |
344 |
|
} |
345 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
346 |
5
|
public void visitLeave(final SectionList sectionList) throws ModuleDataException {... |
347 |
5
|
checkContext(); |
348 |
|
} |
349 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
350 |
2
|
public void visitLeave(final Specification specification) throws ModuleDataException {... |
351 |
2
|
checkContext(); |
352 |
|
} |
353 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
354 |
2
|
public void visitLeave(final Subsection subsection) throws ModuleDataException {... |
355 |
2
|
checkContext(); |
356 |
|
} |
357 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
358 |
14
|
public void visitLeave(final SubsectionList subsectionList) throws ModuleDataException {... |
359 |
14
|
checkContext(); |
360 |
|
} |
361 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
362 |
0
|
public void visitLeave(final SubsectionType subsectionType) throws ModuleDataException {... |
363 |
0
|
checkContext(); |
364 |
|
} |
365 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
366 |
16
|
public void visitLeave(final Term term) throws ModuleDataException {... |
367 |
16
|
checkContext(); |
368 |
|
} |
369 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
370 |
0
|
public void visitLeave(final UsedByList usedByList) throws ModuleDataException {... |
371 |
0
|
checkContext(); |
372 |
|
} |
373 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
374 |
20
|
public void visitLeave(final VariableList variableList) throws ModuleDataException {... |
375 |
20
|
checkContext(); |
376 |
|
} |
377 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
378 |
1215
|
public void visitLeave(final Atom atom) throws ModuleDataException {... |
379 |
1215
|
checkContext(); |
380 |
|
} |
381 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
382 |
1459
|
public void visitLeave(final ElementList list) throws ModuleDataException {... |
383 |
1459
|
checkContext(); |
384 |
|
} |
385 |
|
|
|
|
| 53,6% |
Uncovered Elements: 13 (28) |
Complexity: 10 |
Complexity Density: 0,45 |
|
386 |
7588
|
private void checkContext() throws ModuleDataException {... |
387 |
7588
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
388 |
7588
|
try { |
389 |
7588
|
Trace.param(CLASS, "checkContext()", |
390 |
|
"context > ", context); |
391 |
7588
|
if (context.length() > 0) { |
392 |
7586
|
DynamicGetter.get(qedeq, context); |
393 |
|
} |
394 |
|
} catch (RuntimeException e) { |
395 |
0
|
System.err.println(context); |
396 |
0
|
throw e; |
397 |
|
} catch (IllegalAccessException e) { |
398 |
0
|
throw new RuntimeException(e); |
399 |
|
} catch (InvocationTargetException e) { |
400 |
0
|
throw new RuntimeException(e); |
401 |
|
} |
402 |
|
|
403 |
7588
|
SimpleXPath xpath = Context2SimpleXPath.getXPath(traverser.getCurrentContext(), qedeq); |
404 |
7588
|
Trace.param(CLASS, "checkContext()", |
405 |
|
"xpath < ", xpath); |
406 |
7588
|
try { |
407 |
7588
|
final SimpleXPath find = XPathLocationParser.getXPathLocation(moduleFile, |
408 |
|
xpath.toString(), IoUtility.toUrl(moduleFile)); |
409 |
7588
|
if (find.getStartLocation() == null) { |
410 |
0
|
System.out.println(traverser.getCurrentContext()); |
411 |
0
|
throw new RuntimeException("start not found: " + find + "\ncontext: " |
412 |
|
+ context); |
413 |
|
} |
414 |
7588
|
if (find.getEndLocation() == null) { |
415 |
0
|
System.out.println(traverser.getCurrentContext()); |
416 |
0
|
throw new RuntimeException("end not found: " + find + "\ncontext: " |
417 |
|
+ context); |
418 |
|
} |
419 |
|
|
420 |
|
} catch (ParserConfigurationException e) { |
421 |
0
|
throw new RuntimeException(e); |
422 |
|
} catch (SAXException e) { |
423 |
0
|
throw new RuntimeException(e); |
424 |
|
} catch (IOException e) { |
425 |
0
|
throw new RuntimeException(e); |
426 |
|
} |
427 |
|
} |
428 |
|
|
429 |
|
} |