1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
package org.qedeq.kernel.xml.mapper; |
19 |
|
|
20 |
|
import java.util.ArrayList; |
21 |
|
import java.util.HashMap; |
22 |
|
import java.util.List; |
23 |
|
import java.util.Map; |
24 |
|
|
25 |
|
import org.qedeq.base.trace.Trace; |
26 |
|
import org.qedeq.base.utility.Enumerator; |
27 |
|
import org.qedeq.kernel.base.list.ElementList; |
28 |
|
import org.qedeq.kernel.base.module.Author; |
29 |
|
import org.qedeq.kernel.base.module.AuthorList; |
30 |
|
import org.qedeq.kernel.base.module.Axiom; |
31 |
|
import org.qedeq.kernel.base.module.Chapter; |
32 |
|
import org.qedeq.kernel.base.module.ChapterList; |
33 |
|
import org.qedeq.kernel.base.module.Formula; |
34 |
|
import org.qedeq.kernel.base.module.FunctionDefinition; |
35 |
|
import org.qedeq.kernel.base.module.Header; |
36 |
|
import org.qedeq.kernel.base.module.Import; |
37 |
|
import org.qedeq.kernel.base.module.ImportList; |
38 |
|
import org.qedeq.kernel.base.module.Latex; |
39 |
|
import org.qedeq.kernel.base.module.LatexList; |
40 |
|
import org.qedeq.kernel.base.module.LinkList; |
41 |
|
import org.qedeq.kernel.base.module.LiteratureItem; |
42 |
|
import org.qedeq.kernel.base.module.LiteratureItemList; |
43 |
|
import org.qedeq.kernel.base.module.Location; |
44 |
|
import org.qedeq.kernel.base.module.LocationList; |
45 |
|
import org.qedeq.kernel.base.module.Node; |
46 |
|
import org.qedeq.kernel.base.module.PredicateDefinition; |
47 |
|
import org.qedeq.kernel.base.module.Proof; |
48 |
|
import org.qedeq.kernel.base.module.ProofList; |
49 |
|
import org.qedeq.kernel.base.module.Proposition; |
50 |
|
import org.qedeq.kernel.base.module.Qedeq; |
51 |
|
import org.qedeq.kernel.base.module.Rule; |
52 |
|
import org.qedeq.kernel.base.module.Section; |
53 |
|
import org.qedeq.kernel.base.module.SectionList; |
54 |
|
import org.qedeq.kernel.base.module.Specification; |
55 |
|
import org.qedeq.kernel.base.module.Subsection; |
56 |
|
import org.qedeq.kernel.base.module.SubsectionList; |
57 |
|
import org.qedeq.kernel.base.module.Term; |
58 |
|
import org.qedeq.kernel.base.module.UsedByList; |
59 |
|
import org.qedeq.kernel.base.module.VariableList; |
60 |
|
import org.qedeq.kernel.common.ModuleContext; |
61 |
|
import org.qedeq.kernel.common.ModuleDataException; |
62 |
|
import org.qedeq.kernel.visitor.AbstractModuleVisitor; |
63 |
|
import org.qedeq.kernel.visitor.QedeqNotNullTraverser; |
64 |
|
import org.qedeq.kernel.xml.tracker.SimpleXPath; |
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
@link |
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
@link |
74 |
|
|
75 |
|
|
76 |
|
|
77 |
|
|
78 |
|
|
79 |
|
|
80 |
|
|
81 |
|
|
82 |
|
|
83 |
|
|
84 |
|
@version |
85 |
|
@author |
86 |
|
|
|
|
| 91,3% |
Uncovered Elements: 44 (508) |
Complexity: 110 |
Complexity Density: 0,3 |
|
87 |
|
public final class Context2SimpleXPath extends AbstractModuleVisitor { |
88 |
|
|
89 |
|
|
90 |
|
private static final Class CLASS = Context2SimpleXPath.class; |
91 |
|
|
92 |
|
|
93 |
|
private QedeqNotNullTraverser traverser; |
94 |
|
|
95 |
|
|
96 |
|
private Qedeq qedeq; |
97 |
|
|
98 |
|
|
99 |
|
private final ModuleContext find; |
100 |
|
|
101 |
|
|
102 |
|
private SimpleXPath current; |
103 |
|
|
104 |
|
|
105 |
|
private final List elements; |
106 |
|
|
107 |
|
|
108 |
|
private int level; |
109 |
|
|
110 |
|
|
111 |
|
private boolean matching; |
112 |
|
|
113 |
|
@link |
114 |
|
private String matchingBegin; |
115 |
|
|
116 |
|
@link |
117 |
|
private SimpleXPath matchingPath; |
118 |
|
|
119 |
|
|
120 |
|
|
121 |
|
|
122 |
|
@param |
123 |
|
@param |
124 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
125 |
32548
|
private Context2SimpleXPath(final ModuleContext find, final Qedeq qedeq) {... |
126 |
32548
|
this.qedeq = qedeq; |
127 |
32548
|
traverser = new QedeqNotNullTraverser(find.getModuleLocation(), this); |
128 |
32548
|
this.find = find; |
129 |
32548
|
elements = new ArrayList(20); |
130 |
|
} |
131 |
|
|
132 |
|
|
133 |
|
@link |
134 |
|
|
135 |
|
|
136 |
|
|
137 |
|
@link |
138 |
|
|
139 |
|
|
140 |
|
|
141 |
|
|
142 |
|
|
143 |
|
|
144 |
|
|
145 |
|
|
146 |
|
|
147 |
|
|
148 |
|
|
149 |
|
|
150 |
|
|
151 |
|
|
152 |
|
@param |
153 |
|
@param |
154 |
|
@return |
155 |
|
@throws |
156 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
157 |
32548
|
public static SimpleXPath getXPath(final ModuleContext find, final Qedeq qedeq)... |
158 |
|
throws ModuleDataException { |
159 |
32548
|
final Context2SimpleXPath converter = new Context2SimpleXPath(find, qedeq); |
160 |
32548
|
return converter.find(); |
161 |
|
} |
162 |
|
|
|
|
| 75% |
Uncovered Elements: 3 (12) |
Complexity: 2 |
Complexity Density: 0,17 |
|
163 |
32548
|
private final SimpleXPath find() throws ModuleDataException {... |
164 |
32548
|
final String method = "find()"; |
165 |
32548
|
Trace.paramInfo(CLASS, this, method, "find", find); |
166 |
32548
|
elements.clear(); |
167 |
32548
|
level = 0; |
168 |
32548
|
current = new SimpleXPath(); |
169 |
32548
|
try { |
170 |
32548
|
traverser.accept(qedeq); |
171 |
|
} catch (LocationFoundException e) { |
172 |
32548
|
Trace.paramInfo(CLASS, this, method, "location found", current); |
173 |
32548
|
return current; |
174 |
|
} |
175 |
0
|
Trace.param(CLASS, this, method, "level", level); |
176 |
0
|
Trace.info(CLASS, this, method, "location was not found"); |
177 |
0
|
throw new LocationNotFoundException(find); |
178 |
|
} |
179 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
180 |
32548
|
public final void visitEnter(final Qedeq qedeq) throws ModuleDataException {... |
181 |
32548
|
enter("QEDEQ"); |
182 |
32548
|
final String method = "visitEnter(Qedeq)"; |
183 |
32548
|
Trace.param(CLASS, this, method, "current", current); |
184 |
32548
|
checkMatching(method); |
185 |
|
} |
186 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
187 |
0
|
public final void visitLeave(final Qedeq qedeq) {... |
188 |
0
|
leave(); |
189 |
|
} |
190 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0,12 |
|
191 |
32546
|
public final void visitEnter(final Header header) throws ModuleDataException {... |
192 |
32546
|
enter("HEADER"); |
193 |
32546
|
final String method = "visitEnter(Header)"; |
194 |
32546
|
Trace.param(CLASS, this, method, "current", current); |
195 |
32546
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
196 |
32546
|
checkMatching(method); |
197 |
|
|
198 |
32533
|
traverser.setLocationWithinModule(context + ".getEmail()"); |
199 |
32533
|
current.setAttribute("email"); |
200 |
32533
|
checkIfFound(); |
201 |
|
} |
202 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
203 |
31979
|
public final void visitLeave(final Header header) {... |
204 |
31979
|
leave(); |
205 |
|
} |
206 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 1 |
Complexity Density: 0,09 |
|
207 |
662
|
public final void visitEnter(final Specification specification) throws ModuleDataException {... |
208 |
662
|
enter("SPECIFICATION"); |
209 |
662
|
final String method = "visitEnter(Specification)"; |
210 |
662
|
Trace.param(CLASS, this, method, "current", current); |
211 |
662
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
212 |
662
|
checkMatching(method); |
213 |
|
|
214 |
614
|
traverser.setLocationWithinModule(context + ".getName()"); |
215 |
614
|
current.setAttribute("name"); |
216 |
614
|
checkIfFound(); |
217 |
|
|
218 |
592
|
traverser.setLocationWithinModule(context + ".getRuleVersion()"); |
219 |
592
|
current.setAttribute("ruleVersion"); |
220 |
592
|
checkIfFound(); |
221 |
|
} |
222 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
223 |
438
|
public final void visitLeave(final Specification specification) {... |
224 |
438
|
leave(); |
225 |
|
} |
226 |
|
|
|
|
| 96,1% |
Uncovered Elements: 2 (51) |
Complexity: 12 |
Complexity Density: 0,41 |
|
227 |
176383
|
public final void visitEnter(final LatexList latexList) throws ModuleDataException {... |
228 |
176383
|
final String method = "visitEnter(LatexList)"; |
229 |
176383
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
230 |
176383
|
final String name; |
231 |
176383
|
if (context.endsWith(".getTitle()")) { |
232 |
74927
|
name = "TITLE"; |
233 |
101456
|
} else if (context.endsWith(".getSummary()")) { |
234 |
392
|
name = "ABSTRACT"; |
235 |
101064
|
} else if (context.endsWith(".getIntroduction()")) { |
236 |
61780
|
name = "INTRODUCTION"; |
237 |
39284
|
} else if (context.endsWith(".getName()")) { |
238 |
12535
|
name = "NAME"; |
239 |
26749
|
} else if (context.endsWith(".getPrecedingText()")) { |
240 |
25885
|
name = "PRECEDING"; |
241 |
864
|
} else if (context.endsWith(".getSucceedingText()")) { |
242 |
284
|
name = "SUCCEEDING"; |
243 |
580
|
} else if (context.endsWith(".getLatex()")) { |
244 |
180
|
name = "TEXT"; |
245 |
400
|
} else if (context.endsWith(".getDescription()")) { |
246 |
160
|
name = "DESCRIPTION"; |
247 |
240
|
} else if (context.endsWith(".getNonFormalProof()")) { |
248 |
142
|
name = null; |
249 |
98
|
} else if (context.endsWith(".getItem()")) { |
250 |
98
|
name = null; |
251 |
|
} else { |
252 |
0
|
throw new IllegalArgumentException("unknown LatexList " + context); |
253 |
|
} |
254 |
176383
|
Trace.param(CLASS, this, method, "name", name); |
255 |
176383
|
if (name != null) { |
256 |
176143
|
enter(name); |
257 |
|
} |
258 |
176383
|
Trace.param(CLASS, this, method, "current", current); |
259 |
|
|
260 |
176383
|
checkMatching(method); |
261 |
|
} |
262 |
|
|
|
|
| 80% |
Uncovered Elements: 1 (5) |
Complexity: 3 |
Complexity Density: 1 |
|
263 |
170885
|
public final void visitLeave(final LatexList latexList) {... |
264 |
170885
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
265 |
170885
|
if (!context.endsWith(".getNonFormalProof()") |
266 |
|
&& !context.endsWith(".getItem()")) { |
267 |
170885
|
leave(); |
268 |
|
} |
269 |
|
} |
270 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (15) |
Complexity: 2 |
Complexity Density: 0,15 |
|
271 |
4227
|
public final void visitEnter(final Latex latex) throws ModuleDataException {... |
272 |
4227
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
273 |
4227
|
if (context.indexOf(".getAuthorList().get(") >= 0) { |
274 |
13
|
enter("NAME"); |
275 |
|
} |
276 |
4227
|
enter("LATEX"); |
277 |
4227
|
final String method = "visitEnter(Latex)"; |
278 |
4227
|
Trace.param(CLASS, this, method, "current", current); |
279 |
4227
|
checkMatching(method); |
280 |
|
|
281 |
1330
|
traverser.setLocationWithinModule(context + ".getLanguage()"); |
282 |
1330
|
current.setAttribute("language"); |
283 |
1330
|
checkIfFound(); |
284 |
|
|
285 |
1330
|
traverser.setLocationWithinModule(context + ".getLatex()"); |
286 |
1330
|
current.setAttribute(null); |
287 |
1330
|
checkIfFound(); |
288 |
|
} |
289 |
|
|
|
|
| 66,7% |
Uncovered Elements: 2 (6) |
Complexity: 2 |
Complexity Density: 0,5 |
|
290 |
1330
|
public final void visitLeave(final Latex latex) {... |
291 |
|
|
292 |
1330
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
293 |
1330
|
if (context.indexOf(".getAuthorList().get(") >= 0) { |
294 |
0
|
leave(); |
295 |
|
} |
296 |
1330
|
leave(); |
297 |
|
} |
298 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
299 |
132
|
public final void visitEnter(final LocationList locationList) throws ModuleDataException {... |
300 |
132
|
enter("LOCATIONS"); |
301 |
132
|
final String method = "visitEnter(LocationList)"; |
302 |
132
|
Trace.param(CLASS, this, method, "current", current); |
303 |
132
|
checkMatching(method); |
304 |
|
|
305 |
|
} |
306 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
307 |
0
|
public final void visitLeave(final LocationList locationList) {... |
308 |
0
|
leave(); |
309 |
|
} |
310 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0,12 |
|
311 |
98
|
public final void visitEnter(final Location location) throws ModuleDataException {... |
312 |
98
|
enter("LOCATION"); |
313 |
98
|
final String method = "visitEnter(Location)"; |
314 |
98
|
Trace.param(CLASS, this, method, "current", current); |
315 |
98
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
316 |
98
|
checkMatching(method); |
317 |
|
|
318 |
40
|
traverser.setLocationWithinModule(context + ".getLocation()"); |
319 |
40
|
current.setAttribute("value"); |
320 |
40
|
checkIfFound(); |
321 |
|
} |
322 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
323 |
14
|
public final void visitLeave(final Location location) {... |
324 |
14
|
leave(); |
325 |
|
} |
326 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
327 |
346
|
public final void visitEnter(final AuthorList authorList) throws ModuleDataException {... |
328 |
346
|
enter("AUTHORS"); |
329 |
346
|
final String method = "visitEnter(AuthorList)"; |
330 |
346
|
Trace.param(CLASS, this, method, "current", current); |
331 |
346
|
checkMatching(method); |
332 |
|
} |
333 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
334 |
274
|
public final void visitLeave(final AuthorList authorList) {... |
335 |
274
|
leave(); |
336 |
|
} |
337 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0,12 |
|
338 |
48
|
public final void visitEnter(final Author author) throws ModuleDataException {... |
339 |
48
|
enter("AUTHOR"); |
340 |
48
|
final String method = "visitEnter(Author)"; |
341 |
48
|
Trace.param(CLASS, this, method, "current", current); |
342 |
48
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
343 |
48
|
checkMatching(method); |
344 |
|
|
345 |
24
|
traverser.setLocationWithinModule(context + ".getEmail()"); |
346 |
24
|
current.setAttribute("email"); |
347 |
24
|
checkIfFound(); |
348 |
|
} |
349 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
350 |
0
|
public final void visitLeave(final Author author) {... |
351 |
0
|
leave(); |
352 |
|
} |
353 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
354 |
252
|
public final void visitEnter(final ImportList importList) throws ModuleDataException {... |
355 |
252
|
enter("IMPORTS"); |
356 |
252
|
final String method = "visitEnter(ImportList)"; |
357 |
252
|
Trace.param(CLASS, this, method, "current", current); |
358 |
252
|
checkMatching(method); |
359 |
|
} |
360 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
361 |
33
|
public final void visitLeave(final ImportList importList) {... |
362 |
33
|
leave(); |
363 |
|
} |
364 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0,12 |
|
365 |
292
|
public final void visitEnter(final Import imp) throws ModuleDataException {... |
366 |
292
|
enter("IMPORT"); |
367 |
292
|
final String method = "visitEnter(Import)"; |
368 |
292
|
Trace.param(CLASS, this, method, "current", current); |
369 |
292
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
370 |
292
|
checkMatching(method); |
371 |
|
|
372 |
278
|
traverser.setLocationWithinModule(context + ".getLabel()"); |
373 |
278
|
current.setAttribute("label"); |
374 |
278
|
checkIfFound(); |
375 |
|
} |
376 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
377 |
85
|
public final void visitLeave(final Import imp) {... |
378 |
85
|
leave(); |
379 |
|
} |
380 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
381 |
55
|
public final void visitEnter(final UsedByList usedByList) throws ModuleDataException {... |
382 |
55
|
enter("USEDBY"); |
383 |
55
|
final String method = "visitEnter(UsedByList)"; |
384 |
55
|
Trace.param(CLASS, this, method, "current", current); |
385 |
55
|
checkMatching(method); |
386 |
|
} |
387 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
388 |
0
|
public final void visitLeave(final UsedByList usedByList) {... |
389 |
0
|
leave(); |
390 |
|
} |
391 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
392 |
31979
|
public final void visitEnter(final ChapterList chapterList) throws ModuleDataException {... |
393 |
31979
|
final String method = "visitEnter(ChapterList)"; |
394 |
|
|
395 |
|
|
396 |
31979
|
checkMatching(method); |
397 |
|
} |
398 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
399 |
170
|
public final void visitLeave(final ChapterList chapterList) {... |
400 |
170
|
traverser.setBlocked(false); |
401 |
|
} |
402 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0,12 |
|
403 |
140246
|
public final void visitEnter(final Chapter chapter) throws ModuleDataException {... |
404 |
140246
|
enter("CHAPTER"); |
405 |
140246
|
final String method = "visitEnter(Chapter)"; |
406 |
140246
|
Trace.param(CLASS, this, method, "current", current); |
407 |
140246
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
408 |
140246
|
checkMatching(method); |
409 |
|
|
410 |
140120
|
traverser.setLocationWithinModule(context + ".getNoNumber()"); |
411 |
140120
|
current.setAttribute("noNumber"); |
412 |
140120
|
checkIfFound(); |
413 |
|
} |
414 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
415 |
108450
|
public final void visitLeave(final Chapter chapter) {... |
416 |
108450
|
leave(); |
417 |
|
} |
418 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
419 |
31169
|
public final void visitEnter(final SectionList sectionList) throws ModuleDataException {... |
420 |
31169
|
final String method = "visitEnter(SectionList)"; |
421 |
|
|
422 |
|
|
423 |
31169
|
checkMatching(method); |
424 |
|
} |
425 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
426 |
0
|
public final void visitLeave(final SectionList sectionList) {... |
427 |
0
|
traverser.setBlocked(false); |
428 |
|
} |
429 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0,12 |
|
430 |
75365
|
public final void visitEnter(final Section section) throws ModuleDataException {... |
431 |
75365
|
enter("SECTION"); |
432 |
75365
|
final String method = "visitEnter(Section)"; |
433 |
75365
|
Trace.param(CLASS, this, method, "current", current); |
434 |
75365
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
435 |
75365
|
checkMatching(method); |
436 |
|
|
437 |
75131
|
traverser.setLocationWithinModule(context + ".getNoNumber()"); |
438 |
75131
|
current.setAttribute("noNumber"); |
439 |
75131
|
checkIfFound(); |
440 |
|
} |
441 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
442 |
44272
|
public final void visitLeave(final Section section) {... |
443 |
44272
|
leave(); |
444 |
|
} |
445 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
446 |
29939
|
public final void visitEnter(final SubsectionList subsectionList) throws ModuleDataException {... |
447 |
29939
|
enter("SUBSECTIONS"); |
448 |
29939
|
final String method = "visitEnter(SubsectionList)"; |
449 |
29939
|
Trace.param(CLASS, this, method, "current", current); |
450 |
29939
|
checkMatching(method); |
451 |
|
} |
452 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
453 |
0
|
public final void visitLeave(final SubsectionList subsectionList) {... |
454 |
0
|
leave(); |
455 |
|
} |
456 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 1 |
Complexity Density: 0,09 |
|
457 |
5470
|
public final void visitEnter(final Subsection subsection) throws ModuleDataException {... |
458 |
5470
|
enter("SUBSECTION"); |
459 |
5470
|
final String method = "visitEnter(Subsection)"; |
460 |
5470
|
Trace.param(CLASS, this, method, "current", current); |
461 |
5470
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
462 |
5470
|
checkMatching(method); |
463 |
|
|
464 |
5362
|
traverser.setLocationWithinModule(context + ".getId()"); |
465 |
5362
|
current.setAttribute("id"); |
466 |
5362
|
checkIfFound(); |
467 |
|
|
468 |
5362
|
traverser.setLocationWithinModule(context + ".getLevel()"); |
469 |
5362
|
current.setAttribute("level"); |
470 |
5362
|
checkIfFound(); |
471 |
|
} |
472 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
473 |
5062
|
public final void visitLeave(final Subsection subsection) {... |
474 |
5062
|
leave(); |
475 |
|
} |
476 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (14) |
Complexity: 1 |
Complexity Density: 0,07 |
|
477 |
146527
|
public final void visitEnter(final Node node) throws ModuleDataException {... |
478 |
146527
|
enter("NODE"); |
479 |
146527
|
final String method = "visitEnter(Node)"; |
480 |
146527
|
Trace.param(CLASS, this, method, "current", current); |
481 |
146527
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
482 |
146527
|
checkMatching(method); |
483 |
|
|
484 |
145819
|
traverser.setLocationWithinModule(context + ".getId()"); |
485 |
145819
|
current.setAttribute("id"); |
486 |
145819
|
checkIfFound(); |
487 |
|
|
488 |
145557
|
traverser.setLocationWithinModule(context + ".getLevel()"); |
489 |
145557
|
current.setAttribute("level"); |
490 |
145557
|
checkIfFound(); |
491 |
|
|
492 |
|
|
493 |
145406
|
traverser.setLocationWithinModule(context + ".getNodeType()"); |
494 |
145406
|
current.setAttribute(null); |
495 |
145406
|
checkIfFound(); |
496 |
|
|
497 |
|
} |
498 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
499 |
117126
|
public final void visitLeave(final Node node) {... |
500 |
117126
|
leave(); |
501 |
|
} |
502 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
503 |
2425
|
public final void visitEnter(final Axiom axiom) throws ModuleDataException {... |
504 |
2425
|
enter("AXIOM"); |
505 |
2425
|
final String method = "visitEnter(Axiom)"; |
506 |
2425
|
Trace.param(CLASS, this, method, "current", current); |
507 |
2425
|
checkMatching(method); |
508 |
|
} |
509 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
510 |
68
|
public final void visitLeave(final Axiom axiom) {... |
511 |
68
|
leave(); |
512 |
|
} |
513 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
514 |
18395
|
public final void visitEnter(final Proposition proposition) throws ModuleDataException {... |
515 |
18395
|
enter("THEOREM"); |
516 |
18395
|
final String method = "visitEnter(Proposition)"; |
517 |
18395
|
Trace.param(CLASS, this, method, "current", current); |
518 |
18395
|
checkMatching(method); |
519 |
|
} |
520 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
521 |
56
|
public final void visitLeave(final Proposition proposition) {... |
522 |
56
|
leave(); |
523 |
|
} |
524 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
525 |
319
|
public final void visitEnter(final ProofList proofList) throws ModuleDataException {... |
526 |
319
|
final String method = "visitEnter(ProofList)"; |
527 |
|
|
528 |
|
|
529 |
319
|
checkMatching(method); |
530 |
|
} |
531 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (11) |
Complexity: 1 |
Complexity Density: 0,09 |
|
532 |
291
|
public final void visitEnter(final Proof proof) throws ModuleDataException {... |
533 |
291
|
enter("PROOF"); |
534 |
291
|
final String method = "visitEnter(Proof)"; |
535 |
291
|
Trace.param(CLASS, this, method, "current", current); |
536 |
291
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
537 |
291
|
checkMatching(method); |
538 |
|
|
539 |
210
|
traverser.setLocationWithinModule(context + ".getKind()"); |
540 |
210
|
current.setAttribute("kind"); |
541 |
210
|
checkIfFound(); |
542 |
|
|
543 |
189
|
traverser.setLocationWithinModule(context + ".getLevel()"); |
544 |
189
|
current.setAttribute("level"); |
545 |
189
|
checkIfFound(); |
546 |
|
} |
547 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
548 |
26
|
public final void visitLeave(final Proof proof) {... |
549 |
26
|
leave(); |
550 |
|
} |
551 |
|
|
|
|
| 90,9% |
Uncovered Elements: 2 (22) |
Complexity: 3 |
Complexity Density: 0,17 |
|
552 |
1846
|
public final void visitEnter(final PredicateDefinition definition) throws ModuleDataException {... |
553 |
1846
|
enter("DEFINITION_PREDICATE"); |
554 |
1846
|
final String method = "visitEnter(PredicateDefinition)"; |
555 |
1846
|
Trace.param(CLASS, this, method, "current", current); |
556 |
1846
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
557 |
1846
|
checkMatching(method); |
558 |
|
|
559 |
1752
|
traverser.setLocationWithinModule(context + ".getArgumentNumber()"); |
560 |
1752
|
current.setAttribute("arguments"); |
561 |
1752
|
checkIfFound(); |
562 |
|
|
563 |
1712
|
traverser.setLocationWithinModule(context + ".getName()"); |
564 |
1712
|
current.setAttribute("name"); |
565 |
1712
|
checkIfFound(); |
566 |
|
|
567 |
1672
|
traverser.setLocationWithinModule(context + ".getLatexPattern()"); |
568 |
1672
|
enter("LATEXPATTERN"); |
569 |
1672
|
if (find.getLocationWithinModule().equals(traverser.getCurrentContext() |
570 |
|
.getLocationWithinModule())) { |
571 |
40
|
if (definition.getLatexPattern() == null) { |
572 |
0
|
leave(); |
573 |
|
} |
574 |
40
|
throw new LocationFoundException(traverser.getCurrentContext()); |
575 |
|
} |
576 |
1632
|
leave(); |
577 |
|
} |
578 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
579 |
80
|
public final void visitLeave(final PredicateDefinition definition) {... |
580 |
80
|
leave(); |
581 |
|
} |
582 |
|
|
|
|
| 90,9% |
Uncovered Elements: 2 (22) |
Complexity: 3 |
Complexity Density: 0,17 |
|
583 |
2062
|
public final void visitEnter(final FunctionDefinition definition) throws ModuleDataException {... |
584 |
2062
|
enter("DEFINITION_FUNCTION"); |
585 |
2062
|
final String method = "visitEnter(FunctionDefinition)"; |
586 |
2062
|
Trace.param(CLASS, this, method, "current", current); |
587 |
2062
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
588 |
2062
|
checkMatching(method); |
589 |
|
|
590 |
1966
|
traverser.setLocationWithinModule(context + ".getArgumentNumber()"); |
591 |
1966
|
current.setAttribute("arguments"); |
592 |
1966
|
checkIfFound(); |
593 |
|
|
594 |
1934
|
traverser.setLocationWithinModule(context + ".getName()"); |
595 |
1934
|
current.setAttribute("name"); |
596 |
1934
|
checkIfFound(); |
597 |
|
|
598 |
1902
|
traverser.setLocationWithinModule(context + ".getLatexPattern()"); |
599 |
1902
|
enter("LATEXPATTERN"); |
600 |
1902
|
if (find.getLocationWithinModule().equals(traverser.getCurrentContext() |
601 |
|
.getLocationWithinModule())) { |
602 |
32
|
if (definition.getLatexPattern() == null) { |
603 |
0
|
leave(); |
604 |
|
} |
605 |
32
|
throw new LocationFoundException(traverser.getCurrentContext()); |
606 |
|
} |
607 |
1870
|
leave(); |
608 |
|
} |
609 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
610 |
42
|
public final void visitLeave(final FunctionDefinition definition) {... |
611 |
42
|
leave(); |
612 |
|
} |
613 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0,12 |
|
614 |
240
|
public final void visitEnter(final Rule rule) throws ModuleDataException {... |
615 |
240
|
enter("RULE"); |
616 |
240
|
final String method = "visitEnter(Rule)"; |
617 |
240
|
Trace.param(CLASS, this, method, "current", current); |
618 |
240
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
619 |
240
|
checkMatching(method); |
620 |
|
|
621 |
186
|
traverser.setLocationWithinModule(context + ".getName()"); |
622 |
186
|
current.setAttribute("name"); |
623 |
186
|
checkIfFound(); |
624 |
|
} |
625 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
626 |
38
|
public final void visitLeave(final Rule rule) {... |
627 |
38
|
leave(); |
628 |
|
} |
629 |
|
|
|
|
| 93,8% |
Uncovered Elements: 1 (16) |
Complexity: 3 |
Complexity Density: 0,25 |
|
630 |
22
|
public final void visitEnter(final LinkList linkList) throws ModuleDataException {... |
631 |
22
|
final String method = "visitEnter(LinkList)"; |
632 |
22
|
Trace.param(CLASS, this, method, "current", current); |
633 |
22
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
634 |
22
|
checkMatching(method); |
635 |
|
|
636 |
30
|
for (int i = 0; i < linkList.size(); i++) { |
637 |
16
|
enter("LINK"); |
638 |
16
|
if (linkList.get(i) != null) { |
639 |
16
|
traverser.setLocationWithinModule(context + ".get(" + i + ")"); |
640 |
16
|
current.setAttribute("id"); |
641 |
16
|
checkIfFound(); |
642 |
|
} |
643 |
14
|
leave(); |
644 |
14
|
}; |
645 |
|
} |
646 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
647 |
14
|
public final void visitLeave(final LinkList linkList) {... |
648 |
|
} |
649 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
650 |
21450
|
public final void visitEnter(final Formula formula) throws ModuleDataException {... |
651 |
21450
|
enter("FORMULA"); |
652 |
21450
|
final String method = "visitEnter(Formula)"; |
653 |
21450
|
Trace.param(CLASS, this, method, "current", current); |
654 |
21450
|
checkMatching(method); |
655 |
|
} |
656 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
657 |
387
|
public final void visitLeave(final Formula formula) {... |
658 |
387
|
leave(); |
659 |
|
} |
660 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
661 |
1576
|
public final void visitEnter(final Term term) throws ModuleDataException {... |
662 |
1576
|
enter("TERM"); |
663 |
1576
|
final String method = "visitEnter(Term)"; |
664 |
1576
|
Trace.param(CLASS, this, method, "current", current); |
665 |
1576
|
checkMatching(method); |
666 |
|
} |
667 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
668 |
42
|
public final void visitLeave(final Term term) {... |
669 |
42
|
leave(); |
670 |
|
} |
671 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
672 |
3254
|
public final void visitEnter(final VariableList variableList) throws ModuleDataException {... |
673 |
3254
|
enter("VARLIST"); |
674 |
3254
|
final String method = "visitEnter(VariableList)"; |
675 |
3254
|
Trace.param(CLASS, this, method, "current", current); |
676 |
3254
|
checkMatching(method); |
677 |
|
} |
678 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
679 |
2566
|
public final void visitLeave(final VariableList variableList) {... |
680 |
2566
|
leave(); |
681 |
|
} |
682 |
|
|
|
|
| 87,1% |
Uncovered Elements: 4 (31) |
Complexity: 8 |
Complexity Density: 0,35 |
|
683 |
185831
|
public final void visitEnter(final ElementList list) throws ModuleDataException {... |
684 |
185831
|
final String operator = list.getOperator(); |
685 |
185831
|
enter(operator); |
686 |
185831
|
final String method = "visitEnter(ElementList)"; |
687 |
185831
|
Trace.param(CLASS, this, method, "current", current); |
688 |
185831
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
689 |
|
|
690 |
|
|
691 |
185831
|
if (context.startsWith(find.getLocationWithinModule())) { |
692 |
20059
|
throw new LocationFoundException(find); |
693 |
|
} |
694 |
|
|
695 |
165772
|
checkMatching(method); |
696 |
|
|
697 |
165772
|
traverser.setLocationWithinModule(context + ".getOperator()"); |
698 |
165772
|
checkIfFound(); |
699 |
165772
|
traverser.setLocationWithinModule(context); |
700 |
165772
|
final boolean firstIsAtom = list.size() > 0 && list.getElement(0).isAtom(); |
701 |
165772
|
if (firstIsAtom) { |
702 |
60274
|
traverser.setLocationWithinModule(context + ".getElement(0).getAtom()"); |
703 |
60274
|
if ("VAR".equals(operator) || "PREDVAR".equals(operator) |
704 |
|
|| "FUNVAR".equals(operator)) { |
705 |
14606
|
current.setAttribute("id"); |
706 |
14606
|
checkIfFound(); |
707 |
45668
|
} else if ("PREDCON".equals(operator) || "FUNCON".equals(operator)) { |
708 |
45668
|
current.setAttribute("ref"); |
709 |
45668
|
checkIfFound(); |
710 |
|
} else { |
711 |
0
|
current.setAttribute(null); |
712 |
0
|
Trace.info(CLASS, this, method, "unknown operator " + operator); |
713 |
0
|
throw new LocationFoundException(traverser.getCurrentContext()); |
714 |
|
} |
715 |
|
} |
716 |
|
} |
717 |
|
|
718 |
|
|
719 |
|
|
720 |
|
|
721 |
|
|
722 |
|
|
723 |
|
|
724 |
|
|
725 |
|
|
726 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
727 |
104089
|
public final void visitLeave(final ElementList list) {... |
728 |
104089
|
leave(); |
729 |
|
} |
730 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 1 |
Complexity Density: 0,25 |
|
731 |
170
|
public final void visitEnter(final LiteratureItemList list) throws ModuleDataException {... |
732 |
170
|
enter("BIBLIOGRAPHY"); |
733 |
170
|
final String method = "visitEnter(LiteratureItemList)"; |
734 |
170
|
Trace.param(CLASS, this, method, "current", current); |
735 |
170
|
checkMatching(method); |
736 |
|
} |
737 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
738 |
0
|
public final void visitLeave(final LiteratureItemList list) {... |
739 |
0
|
leave(); |
740 |
|
} |
741 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (8) |
Complexity: 1 |
Complexity Density: 0,12 |
|
742 |
524
|
public final void visitEnter(final LiteratureItem item) throws ModuleDataException {... |
743 |
524
|
enter("ITEM"); |
744 |
524
|
final String method = "visitEnter(LiteratureItem)"; |
745 |
524
|
Trace.param(CLASS, this, method, "current", current); |
746 |
524
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
747 |
524
|
checkMatching(method); |
748 |
|
|
749 |
478
|
traverser.setLocationWithinModule(context + ".getLabel()"); |
750 |
478
|
current.setAttribute("label"); |
751 |
478
|
checkIfFound(); |
752 |
|
} |
753 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
754 |
360
|
public final void visitLeave(final LiteratureItem item) {... |
755 |
360
|
leave(); |
756 |
|
} |
757 |
|
|
758 |
|
|
759 |
|
|
760 |
|
|
761 |
|
@throws |
762 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (4) |
Complexity: 2 |
Complexity Density: 1 |
|
763 |
1860617
|
private final void checkIfFound() throws LocationFoundException {... |
764 |
1860617
|
if (find.getLocationWithinModule().equals(traverser.getCurrentContext() |
765 |
|
.getLocationWithinModule())) { |
766 |
12417
|
throw new LocationFoundException(traverser.getCurrentContext()); |
767 |
|
} |
768 |
|
} |
769 |
|
|
770 |
|
|
771 |
|
|
772 |
|
|
773 |
|
@link |
774 |
|
|
775 |
|
@link |
776 |
|
|
777 |
|
@param |
778 |
|
@throws |
779 |
|
@throws |
780 |
|
|
|
|
| 60% |
Uncovered Elements: 10 (25) |
Complexity: 4 |
Complexity Density: 0,21 |
|
781 |
926630
|
private final void checkMatching(final String method)... |
782 |
|
throws LocationNotFoundException, LocationFoundException { |
783 |
926630
|
final String context = traverser.getCurrentContext().getLocationWithinModule(); |
784 |
926630
|
if (find.getLocationWithinModule().startsWith(context)) { |
785 |
338744
|
Trace.info(CLASS, this, method, "beginning matches"); |
786 |
338744
|
Trace.paramInfo(CLASS, this, method, "context", context); |
787 |
338744
|
matching = true; |
788 |
338744
|
matchingBegin = context; |
789 |
338744
|
matchingPath = new SimpleXPath(current); |
790 |
|
} else { |
791 |
587886
|
if (matching) { |
792 |
|
|
793 |
|
|
794 |
|
|
795 |
|
|
796 |
|
|
797 |
|
|
798 |
587886
|
if (!context.startsWith(matchingBegin)) { |
799 |
|
|
800 |
|
|
801 |
|
|
802 |
|
|
803 |
0
|
Trace.info(CLASS, this, method, "matching lost"); |
804 |
0
|
Trace.paramInfo(CLASS, this, method, "last match ", matchingBegin); |
805 |
0
|
Trace.paramInfo(CLASS, this, method, "current context", context); |
806 |
0
|
Trace.paramInfo(CLASS, this, method, |
807 |
|
"find context ", find.getLocationWithinModule()); |
808 |
|
|
809 |
|
|
810 |
|
|
811 |
0
|
Trace.traceStack(CLASS, this, method); |
812 |
0
|
Trace.info(CLASS, this, method, "changing XPath to last matching one"); |
813 |
|
|
814 |
|
|
815 |
|
|
816 |
0
|
current = matchingPath; |
817 |
0
|
throw new LocationFoundException(new ModuleContext(find.getModuleLocation(), |
818 |
|
matchingBegin)); |
819 |
|
} |
820 |
|
} |
821 |
587886
|
traverser.setBlocked(true); |
822 |
|
} |
823 |
926630
|
checkIfFound(); |
824 |
|
} |
825 |
|
|
826 |
|
|
827 |
|
|
828 |
|
|
829 |
|
@param |
830 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
831 |
886563
|
private final void enter(final String element) {... |
832 |
886563
|
level++; |
833 |
886563
|
current.addElement(element, addOccurence(element)); |
834 |
|
} |
835 |
|
|
836 |
|
|
837 |
|
|
838 |
|
|
839 |
|
@param |
840 |
|
|
|
|
| 0% |
Uncovered Elements: 2 (2) |
Complexity: 1 |
Complexity Density: 0,5 |
|
841 |
0
|
private final void enterFirst(final String element) {... |
842 |
0
|
level++; |
843 |
0
|
current.addElement(element); |
844 |
|
} |
845 |
|
|
846 |
|
|
847 |
|
|
848 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (3) |
Complexity: 1 |
Complexity Density: 0,33 |
|
849 |
591218
|
private final void leave() {... |
850 |
591218
|
level--; |
851 |
591218
|
current.deleteLastElement(); |
852 |
591218
|
traverser.setBlocked(false); |
853 |
|
} |
854 |
|
|
855 |
|
|
856 |
|
|
857 |
|
|
858 |
|
|
859 |
|
|
860 |
|
|
861 |
|
|
862 |
|
@param |
863 |
|
@return |
864 |
|
|
|
|
| 100% |
Uncovered Elements: 0 (18) |
Complexity: 4 |
Complexity Density: 0,33 |
|
865 |
886563
|
private final int addOccurence(final String name) {... |
866 |
886685
|
while (level < elements.size()) { |
867 |
122
|
elements.remove(elements.size() - 1); |
868 |
|
} |
869 |
1182173
|
while (level > elements.size()) { |
870 |
295610
|
elements.add(new HashMap()); |
871 |
|
} |
872 |
886563
|
final Map levelMap = (Map) elements.get(level - 1); |
873 |
886563
|
final Enumerator counter; |
874 |
886563
|
if (levelMap.containsKey(name)) { |
875 |
348857
|
counter = (Enumerator) levelMap.get(name); |
876 |
348857
|
counter.increaseNumber(); |
877 |
|
} else { |
878 |
537706
|
counter = new Enumerator(1); |
879 |
537706
|
levelMap.put(name, counter); |
880 |
|
} |
881 |
886563
|
return counter.getNumber(); |
882 |
|
} |
883 |
|
|
884 |
|
} |