1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package fr.ens.transcriptome.doelan.data;
23
24 import org.apache.log4j.Logger;
25
26 import fr.ens.transcriptome.nividic.platform.PlatformException;
27 import fr.ens.transcriptome.nividic.platform.data.Data;
28 import fr.ens.transcriptome.nividic.platform.data.DataDefaults;
29 import fr.ens.transcriptome.nividic.platform.module.AboutModule;
30 import fr.ens.transcriptome.nividic.platform.module.Module;
31 import fr.ens.transcriptome.nividic.platform.module.ModuleDescription;
32 import fr.ens.transcriptome.nividic.util.SystemUtils;
33
34 /***
35 * Wrapper of QualityGlobalTestResult.
36 * @author Laurent Jourdren
37 */
38 public class QualityGlobalTestResultData extends Data implements Module {
39
40
41 private static Logger log = Logger.getLogger(QualityUnitTestResultData.class);
42
43 /***
44 * Get the name of the data.
45 * @return The name of the data
46 */
47 public String getName() {
48 return SystemUtils
49 .getClassNameWithoutPackage(QualityGlobalTestResultData.class);
50 }
51
52 /***
53 * Get the format of the data.
54 * @return The name of the format of the data
55 */
56 public String getFormat() {
57 return DataDefaults.OM_FORMAT;
58 }
59
60 /***
61 * Get the type of the data.
62 * @return The type of the data.
63 */
64 public String getType() {
65
66 return DoelanDataDefaults.GLOBAL_TEST_RESULT_TYPE;
67 }
68
69 /***
70 * Get the class of the data.
71 * @return The class of the data.
72 */
73 public Class getDataClass() {
74 return QualityGlobalTestResult.class;
75 }
76
77 /***
78 * Set the Result.
79 * @param result Result to set
80 */
81 public void setData(final QualityGlobalTestResult result) {
82
83 try {
84 super.setData(result);
85 } catch (PlatformException e) {
86 log.error("Cast exception");
87 }
88 }
89
90 /***
91 * Get the description of the module.
92 * @return The description of the module
93 */
94 public AboutModule aboutModule() {
95
96 ModuleDescription md = null;
97 try {
98 md = new ModuleDescription("QualityGlobalTestResult",
99 "QualityUnitTest result data type");
100 } catch (PlatformException e) {
101 log.error("Unable to create module description");
102 }
103 return md;
104 }
105
106
107
108
109
110 /***
111 * Public constructor.
112 * @param result Result of a QualityUnitTest
113 */
114 public QualityGlobalTestResultData(final QualityGlobalTestResult result) {
115 setData(result);
116 }
117
118 }