1
1
package org .jbei .ice .services .rest ;
2
2
3
- import java .io .IOException ;
4
- import java .io .InputStream ;
5
- import java .io .InputStreamReader ;
6
- import java .io .OutputStream ;
7
- import java .io .OutputStreamWriter ;
8
- import java .io .Reader ;
9
- import java .io .Writer ;
10
- import java .lang .annotation .Annotation ;
11
- import java .lang .reflect .Type ;
3
+ import com .google .gson .Gson ;
4
+ import com .google .gson .GsonBuilder ;
5
+ import org .jbei .ice .lib .dao .IDataTransferModel ;
6
+
12
7
import javax .ws .rs .Consumes ;
13
8
import javax .ws .rs .Produces ;
14
9
import javax .ws .rs .WebApplicationException ;
17
12
import javax .ws .rs .ext .MessageBodyReader ;
18
13
import javax .ws .rs .ext .MessageBodyWriter ;
19
14
import javax .ws .rs .ext .Provider ;
20
-
21
- import org .jbei .ice .lib .dao .IDataTransferModel ;
22
-
23
- import com .google .gson .Gson ;
24
- import com .google .gson .GsonBuilder ;
15
+ import java .io .*;
16
+ import java .lang .annotation .Annotation ;
17
+ import java .lang .reflect .Type ;
25
18
26
19
/**
27
20
* Custom Writer and Reader for classes that extend {@link IDataTransferModel} using GSON for JSON conversion
@@ -36,8 +29,6 @@ public class PartDataJSONHandler
36
29
37
30
@ Override
38
31
public boolean isWriteable (Class <?> type , Type genericType , Annotation [] annotations , MediaType mediaType ) {
39
- // return type == PartData.class || type == PlasmidData.class || type == StrainData.class || type ==
40
- // ArabidopsisSeedData.class;
41
32
return true ;
42
33
}
43
34
@@ -59,8 +50,6 @@ public void writeTo(IDataTransferModel data, Class<?> type, Type genericType, An
59
50
60
51
@ Override
61
52
public boolean isReadable (Class <?> type , Type genericType , Annotation [] annotations , MediaType mediaType ) {
62
- // return type == PartData.class || type == PlasmidData.class || type == StrainData.class || type ==
63
- // ArabidopsisSeedData.class;
64
53
return true ;
65
54
}
66
55
0 commit comments