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 java.awt.Image;
25
26 import fr.ens.transcriptome.nividic.om.BioAssay;
27 import fr.ens.transcriptome.nividic.util.parameter.Parameters;
28
29 /***
30 * This clas is the abstract superclass of QualityUnitTest and QualityGlobalUnit
31 * @author Laurent Jourdren
32 */
33 public abstract class QualityTestResult {
34
35 private static int count;
36
37 private int id = count++;
38 private Parameters parameters;
39 private String message;
40 private String testType;
41 private String testId;
42 private String testDescription;
43 private Image image;
44 private boolean result;
45 private String bioassay;
46
47
48
49
50
51 /***
52 * Get identifier of the result.
53 * @return the identifier of the result
54 */
55 public int getId() {
56 return id;
57 }
58
59 /***
60 * Get message of the test.
61 * @return The message from the test
62 */
63 public String getMessage() {
64 return message;
65 }
66
67 /***
68 * Get Test description.
69 * @return The description of the test
70 */
71 public String getTestDescription() {
72 return testDescription;
73 }
74
75 /***
76 * Get the parameters
77 * @return The parameters of the test
78 */
79 public Parameters getParameters() {
80 return parameters;
81 }
82
83 /***
84 * Get the image.
85 * @return Returns the image
86 */
87 public Image getImage() {
88 return image;
89 }
90
91 /***
92 * Get the result
93 * @return Returns the result
94 */
95 public boolean getResult() {
96 return result;
97 }
98
99 /***
100 * The identifier of the test.
101 * @return The identifier of the test
102 */
103 public String getTestId() {
104 return testId;
105 }
106
107 /***
108 * Get the type of the test
109 * @return The type of the test
110 */
111 public String getTestType() {
112 return testType;
113 }
114
115 /***
116 * Get the bioassay reference.
117 * @return The bioassay reference
118 */
119 public String getBioAssay() {
120 return bioassay;
121 }
122
123
124
125
126
127 /***
128 * Set the message of the test.
129 * @param message Message to set
130 */
131 public void setMessage(final String message) {
132 this.message = message;
133 }
134
135 /***
136 * Set Test description.
137 * @param description The description of the test
138 */
139 public void setTestDescription(final String description) {
140 this.testDescription = description;
141 }
142
143 /***
144 * Set the parameters of the test.
145 * @param parameters The parameters of the test
146 */
147 public void setParameters(final Parameters parameters) {
148 this.parameters = parameters;
149 }
150
151 /***
152 * Set the image.
153 * @param image The image to set
154 */
155 public void setImage(final Image image) {
156 this.image = image;
157 }
158
159 /***
160 * Set the result
161 * @param result The result to set
162 */
163 public void setResult(final boolean result) {
164 this.result = result;
165 }
166
167 /***
168 * Set the identifier of the test.
169 * @param id The identifier of the test
170 */
171 public void setTestId(final String id) {
172 testId = id;
173 }
174
175 /***
176 * Set the type of the test.
177 * @param type The type of the test
178 */
179 public void setTestType(final String type) {
180 testType = type;
181 }
182
183 /***
184 * Set the bioassay reference.
185 * @param reference The reference of the bioassay
186 */
187 public void setBioAssay(final String reference) {
188 bioassay = reference;
189 }
190
191 /***
192 * Set the bioassay reference.
193 * @param bioassay The bioassay
194 */
195 public void setBioAssay(final BioAssay bioassay) {
196
197 if (bioassay == null)
198 return;
199 setBioAssay(bioassay.getName());
200 }
201
202 }