4773 |
20 Apr 18 |
olle |
1 |
package net.sf.basedb.meludi.dao; |
4773 |
20 Apr 18 |
olle |
2 |
|
4773 |
20 Apr 18 |
olle |
3 |
import net.sf.basedb.core.DbControl; |
4773 |
20 Apr 18 |
olle |
4 |
import net.sf.basedb.core.Sample; |
4773 |
20 Apr 18 |
olle |
5 |
import net.sf.basedb.meludi.Meludi; |
4773 |
20 Apr 18 |
olle |
//import net.sf.basedb.meludi.projectarchive.ProjectArchiveService; |
4773 |
20 Apr 18 |
olle |
7 |
|
4773 |
20 Apr 18 |
olle |
8 |
/** |
4773 |
20 Apr 18 |
olle |
Class for handling information related to consent information. |
4773 |
20 Apr 18 |
olle |
10 |
|
4773 |
20 Apr 18 |
olle |
@author nicklas |
4773 |
20 Apr 18 |
olle |
@since 2.2 |
4773 |
20 Apr 18 |
olle |
13 |
*/ |
4773 |
20 Apr 18 |
olle |
14 |
public class Consent |
4773 |
20 Apr 18 |
olle |
15 |
{ |
4773 |
20 Apr 18 |
olle |
16 |
|
4773 |
20 Apr 18 |
olle |
17 |
/** |
4773 |
20 Apr 18 |
olle |
Load all consent-related annotations for the given item. |
4773 |
20 Apr 18 |
olle |
19 |
*/ |
4773 |
20 Apr 18 |
olle |
20 |
public static void loadConsentAnnotations(DbControl dc, MeludiItem<?> item) |
4773 |
20 Apr 18 |
olle |
21 |
{ |
4773 |
20 Apr 18 |
olle |
22 |
item.loadAnnotations(dc, "consent", Annotationtype.CONSENT, null); |
4773 |
20 Apr 18 |
olle |
23 |
item.loadAnnotations(dc, "consentDate", Annotationtype.CONSENT_DATE, Meludi.CONVERTER_DATE_TO_STRING); |
4773 |
20 Apr 18 |
olle |
24 |
} |
4773 |
20 Apr 18 |
olle |
25 |
|
4773 |
20 Apr 18 |
olle |
26 |
|
4773 |
20 Apr 18 |
olle |
27 |
/** |
4773 |
20 Apr 18 |
olle |
Copy all consent-related annotations from one item to the other. |
4773 |
20 Apr 18 |
olle |
29 |
*/ |
4773 |
20 Apr 18 |
olle |
30 |
public static void copyConsentAnnotations(DbControl dc, Sample from, Sample to) |
4773 |
20 Apr 18 |
olle |
31 |
{ |
4773 |
20 Apr 18 |
olle |
32 |
Annotationtype.CONSENT.copyAnnotationValues(dc, from, to, false); |
4773 |
20 Apr 18 |
olle |
33 |
Annotationtype.CONSENT_DATE.copyAnnotationValues(dc, from, to, false); |
4773 |
20 Apr 18 |
olle |
//ProjectArchiveService.getInstance().setForceCheck(); |
4773 |
20 Apr 18 |
olle |
35 |
} |
4773 |
20 Apr 18 |
olle |
36 |
|
4773 |
20 Apr 18 |
olle |
37 |
/** |
4773 |
20 Apr 18 |
olle |
Flag value for the {@link Annotationtype#FLAG} annotation when an |
4773 |
20 Apr 18 |
olle |
item has been flagged to be connected to a retracted consent, |
4773 |
20 Apr 18 |
olle |
or having been erroneously included, without a consent. |
4773 |
20 Apr 18 |
olle |
@since 2.17 |
4773 |
20 Apr 18 |
olle |
42 |
*/ |
4773 |
20 Apr 18 |
olle |
43 |
public static final String FLAG_RETRACTED = "Retracted"; |
4773 |
20 Apr 18 |
olle |
44 |
|
4773 |
20 Apr 18 |
olle |
45 |
} |