1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 package org.ximtec.igesture.batch.jdom;
28
29 import org.jdom.Element;
30 import org.sigtec.jdom.element.JdomIntegerElement;
31 import org.ximtec.igesture.batch.Statistic;
32
33
34
35
36
37
38
39
40
41 public class JdomClassStatistic extends Element {
42
43 public static final String ROOT_TAG = "classStatistic";
44
45 public static final String NAME_ATTRIBUTE = "name";
46
47 public static final String NUMBER_OF_REJECT_CORRECT = "numberOfRejectCorrect";
48
49 public static final String NUMBER_OF_REJECT_ERROR = "numberOfRejectError";
50
51 public static final String NUMBER_OF_ERRORS = "numberOfErrors";
52
53 public static final String NUMBER_OF_CORRECTS = "numberOfCorrects";
54
55
56 public JdomClassStatistic(Statistic statistic) {
57 super(ROOT_TAG);
58 this.setAttribute(NAME_ATTRIBUTE, statistic.getClassName());
59 this.addContent(new JdomIntegerElement(NUMBER_OF_CORRECTS, statistic
60 .getCorrect()));
61 this.addContent(new JdomIntegerElement(NUMBER_OF_ERRORS, statistic
62 .getError()));
63 this.addContent(new JdomIntegerElement(NUMBER_OF_REJECT_ERROR, statistic
64 .getRejectError()));
65 this.addContent(new JdomIntegerElement(NUMBER_OF_REJECT_CORRECT, statistic
66 .getRejectCorrect()));
67 }
68
69 }