1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
package jalview.ws.io.mime; |
22 |
|
|
23 |
|
import jalview.io.packed.DataProvider; |
24 |
|
import jalview.io.packed.JalviewDataset; |
25 |
|
|
26 |
|
import java.io.IOException; |
27 |
|
import java.io.InputStream; |
28 |
|
import java.util.ArrayList; |
29 |
|
import java.util.List; |
30 |
|
|
31 |
|
import org.apache.james.mime4j.MimeException; |
32 |
|
import org.apache.james.mime4j.descriptor.BodyDescriptor; |
33 |
|
import org.apache.james.mime4j.parser.ContentHandler; |
34 |
|
import org.apache.james.mime4j.parser.Field; |
35 |
|
|
36 |
|
|
37 |
|
|
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
@author |
42 |
|
|
43 |
|
|
|
|
| 0% |
Uncovered Elements: 17 (17) |
Complexity: 15 |
Complexity Density: 7.5 |
|
44 |
|
public class JalviewMimeContentHandler implements ContentHandler |
45 |
|
{ |
46 |
|
|
47 |
|
|
48 |
|
|
49 |
|
JalviewDataset context; |
50 |
|
|
51 |
|
|
52 |
|
|
53 |
|
|
54 |
|
@param |
55 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
56 |
0 |
public JalviewMimeContentHandler(JalviewDataset ds)... |
57 |
|
{ |
58 |
0 |
context = ds; |
59 |
|
} |
60 |
|
|
61 |
|
|
62 |
|
|
63 |
|
|
64 |
|
String currentType; |
65 |
|
|
66 |
|
|
67 |
|
|
68 |
|
|
69 |
|
String currentName; |
70 |
|
|
71 |
|
|
72 |
|
|
73 |
|
|
74 |
|
List<DataProvider> dataItems = new ArrayList<DataProvider>(); |
75 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
76 |
0 |
@Override... |
77 |
|
public void body(BodyDescriptor arg0, InputStream arg1) |
78 |
|
throws MimeException, IOException |
79 |
|
{ |
80 |
|
|
81 |
|
|
82 |
|
|
83 |
|
} |
84 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
85 |
0 |
@Override... |
86 |
|
public void endBodyPart() throws MimeException |
87 |
|
{ |
88 |
|
|
89 |
|
|
90 |
|
} |
91 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
92 |
0 |
@Override... |
93 |
|
public void endHeader() throws MimeException |
94 |
|
{ |
95 |
|
|
96 |
|
|
97 |
|
} |
98 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
99 |
0 |
@Override... |
100 |
|
public void endMessage() throws MimeException |
101 |
|
{ |
102 |
|
|
103 |
|
|
104 |
|
} |
105 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
106 |
0 |
@Override... |
107 |
|
public void endMultipart() throws MimeException |
108 |
|
{ |
109 |
|
|
110 |
|
|
111 |
|
} |
112 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
113 |
0 |
@Override... |
114 |
|
public void epilogue(InputStream arg0) throws MimeException, IOException |
115 |
|
{ |
116 |
|
|
117 |
|
|
118 |
|
} |
119 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
120 |
0 |
@Override... |
121 |
|
public void field(Field arg0) throws MimeException |
122 |
|
{ |
123 |
|
|
124 |
|
|
125 |
|
} |
126 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
127 |
0 |
@Override... |
128 |
|
public void preamble(InputStream arg0) throws MimeException, IOException |
129 |
|
{ |
130 |
|
|
131 |
|
|
132 |
|
} |
133 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
134 |
0 |
@Override... |
135 |
|
public void raw(InputStream arg0) throws MimeException, IOException |
136 |
|
{ |
137 |
|
|
138 |
|
|
139 |
|
} |
140 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
141 |
0 |
@Override... |
142 |
|
public void startBodyPart() throws MimeException |
143 |
|
{ |
144 |
|
|
145 |
|
|
146 |
|
} |
147 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
148 |
0 |
@Override... |
149 |
|
public void startHeader() throws MimeException |
150 |
|
{ |
151 |
|
|
152 |
|
|
153 |
|
} |
154 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
155 |
0 |
@Override... |
156 |
|
public void startMessage() throws MimeException |
157 |
|
{ |
158 |
|
|
159 |
|
|
160 |
|
} |
161 |
|
|
|
|
| - |
Uncovered Elements: 0 (0) |
Complexity: 1 |
Complexity Density: - |
|
162 |
0 |
@Override... |
163 |
|
public void startMultipart(BodyDescriptor arg0) throws MimeException |
164 |
|
{ |
165 |
|
|
166 |
|
|
167 |
|
} |
168 |
|
|
169 |
|
|
170 |
|
|
171 |
|
@return |
172 |
|
|
173 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
174 |
0 |
public Iterable<DataProvider> getJalviewDataProviders()... |
175 |
|
{ |
176 |
|
|
177 |
0 |
return null; |
178 |
|
} |
179 |
|
|
180 |
|
} |