1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.openehealth.ipf.platform.camel.ihe.xds.core.converters;
17
18 import org.apache.camel.Converter;
19 import org.openehealth.ipf.commons.ihe.xds.core.ebxml.ebxml30.*;
20 import org.openehealth.ipf.commons.ihe.xds.core.requests.*;
21 import org.openehealth.ipf.commons.ihe.xds.core.responses.QueryResponse;
22 import org.openehealth.ipf.commons.ihe.xds.core.responses.Response;
23 import org.openehealth.ipf.commons.ihe.xds.core.responses.RetrievedDocumentSet;
24 import org.openehealth.ipf.commons.ihe.xds.core.stub.ebrs30.lcm.RemoveObjectsRequest;
25 import org.openehealth.ipf.commons.ihe.xds.core.stub.ebrs30.lcm.SubmitObjectsRequest;
26 import org.openehealth.ipf.commons.ihe.xds.core.stub.ebrs30.query.AdhocQueryRequest;
27 import org.openehealth.ipf.commons.ihe.xds.core.stub.ebrs30.query.AdhocQueryResponse;
28 import org.openehealth.ipf.commons.ihe.xds.core.stub.ebrs30.rs.RegistryResponseType;
29 import org.openehealth.ipf.commons.ihe.xds.core.transform.requests.*;
30 import org.openehealth.ipf.commons.ihe.xds.core.transform.responses.QueryResponseTransformer;
31 import org.openehealth.ipf.commons.ihe.xds.core.transform.responses.ResponseTransformer;
32 import org.openehealth.ipf.commons.ihe.xds.core.transform.responses.RetrieveDocumentSetResponseTransformer;
33
34
35
36
37
38
39
40
41
42
43
44 @Converter
45 public class EbXML30Converters {
46 private final static EbXMLFactory30 factory = new EbXMLFactory30();
47
48
49
50
51
52
53
54 @Converter
55 public static ProvideAndRegisterDocumentSetRequestType convert(ProvideAndRegisterDocumentSet in) {
56 ProvideAndRegisterDocumentSetTransformer transformer = new ProvideAndRegisterDocumentSetTransformer(factory);
57 return (ProvideAndRegisterDocumentSetRequestType) transformer.toEbXML(in).getInternal();
58 }
59
60
61
62
63
64
65
66 @Converter
67 public static ProvideAndRegisterDocumentSet convert(ProvideAndRegisterDocumentSetRequestType in) {
68 ProvideAndRegisterDocumentSetTransformer transformer = new ProvideAndRegisterDocumentSetTransformer(factory);
69 return transformer.fromEbXML(new EbXMLProvideAndRegisterDocumentSetRequest30(in));
70 }
71
72
73
74
75
76
77
78 @Converter
79 public static SubmitObjectsRequest convert(RegisterDocumentSet in) {
80 RegisterDocumentSetTransformer transformer = new RegisterDocumentSetTransformer(factory);
81 return (SubmitObjectsRequest) transformer.toEbXML(in).getInternal();
82 }
83
84
85
86
87
88
89
90 @Converter
91 public static RegisterDocumentSet convert(SubmitObjectsRequest in) {
92 RegisterDocumentSetTransformer transformer = new RegisterDocumentSetTransformer(factory);
93 return transformer.fromEbXML(new EbXMLSubmitObjectsRequest30(in));
94 }
95
96
97
98
99
100
101
102 @Converter
103 public static RegistryResponseType convert(Response in) {
104 ResponseTransformer transformer = new ResponseTransformer(factory);
105 return (RegistryResponseType) transformer.toEbXML(in).getInternal();
106 }
107
108
109
110
111
112
113
114 @Converter
115 public static Response convert(RegistryResponseType in) {
116 ResponseTransformer transformer = new ResponseTransformer(factory);
117 return transformer.fromEbXML(new EbXMLRegistryResponse30(in));
118 }
119
120
121
122
123
124
125
126 @Converter
127 public static AdhocQueryRequest convert(QueryRegistry in) {
128 QueryRegistryTransformer transformer = new QueryRegistryTransformer();
129 return (AdhocQueryRequest)transformer.toEbXML(in).getInternal();
130 }
131
132
133
134
135
136
137
138 @Converter
139 public static QueryRegistry convert(AdhocQueryRequest in) {
140 QueryRegistryTransformer transformer = new QueryRegistryTransformer();
141 return transformer.fromEbXML(new EbXMLAdhocQueryRequest30(in));
142 }
143
144
145
146
147
148
149
150 @Converter
151 public static AdhocQueryResponse convert(QueryResponse in) {
152 QueryResponseTransformer transformer = new QueryResponseTransformer(factory);
153 return (AdhocQueryResponse) transformer.toEbXML(in).getInternal();
154 }
155
156
157
158
159
160
161
162 @Converter
163 public static QueryResponse convertToQueryResponse(AdhocQueryResponse in) {
164 QueryResponseTransformer transformer = new QueryResponseTransformer(factory);
165 return transformer.fromEbXML(new EbXMLQueryResponse30(in));
166 }
167
168
169
170
171
172
173
174 @Converter
175 public static RetrieveDocumentSetRequestType convert(RetrieveDocumentSet in) {
176 RetrieveDocumentSetRequestTransformer transformer = new RetrieveDocumentSetRequestTransformer(factory);
177 return (RetrieveDocumentSetRequestType) transformer.toEbXML(in).getInternal();
178 }
179
180
181
182
183
184
185
186 @Converter
187 public static RetrieveDocumentSet convert(RetrieveDocumentSetRequestType in) {
188 RetrieveDocumentSetRequestTransformer transformer = new RetrieveDocumentSetRequestTransformer(factory);
189 return transformer.fromEbXML(new EbXMLNonconstructiveDocumentSetRequest30<>(in));
190 }
191
192
193
194
195
196
197
198 @Converter
199 public static RemoveDocumentsRequestType convert(RemoveDocuments in) {
200 RemoveDocumentsRequestTransformer transformer = new RemoveDocumentsRequestTransformer(factory);
201 return (RemoveDocumentsRequestType) transformer.toEbXML(in).getInternal();
202 }
203
204
205
206
207
208
209
210 @Converter
211 public static RemoveDocuments convert(RemoveDocumentsRequestType in) {
212 RemoveDocumentsRequestTransformer transformer = new RemoveDocumentsRequestTransformer(factory);
213 return transformer.fromEbXML(new EbXMLNonconstructiveDocumentSetRequest30<>(in));
214 }
215
216
217
218
219
220
221
222 @Converter
223 public static RetrieveDocumentSetResponseType convert(RetrievedDocumentSet in) {
224 RetrieveDocumentSetResponseTransformer transformer = new RetrieveDocumentSetResponseTransformer(factory);
225 return (RetrieveDocumentSetResponseType) transformer.toEbXML(in).getInternal();
226 }
227
228
229
230
231
232
233
234 @Converter
235 public static RetrievedDocumentSet convert(RetrieveDocumentSetResponseType in) {
236 RetrieveDocumentSetResponseTransformer transformer = new RetrieveDocumentSetResponseTransformer(factory);
237 return transformer.fromEbXML(new EbXMLRetrieveDocumentSetResponse30(in));
238 }
239
240
241
242
243
244
245 @Converter
246 public static RetrieveImagingDocumentSetRequestType convert(RetrieveImagingDocumentSet in) {
247 RetrieveImagingDocumentSetRequestTransformer transformer = new RetrieveImagingDocumentSetRequestTransformer(factory);
248 return (RetrieveImagingDocumentSetRequestType) transformer.toEbXML(in).getInternal();
249 }
250
251
252
253
254
255
256 @Converter
257 public static RetrieveImagingDocumentSet convert(RetrieveImagingDocumentSetRequestType in) {
258 RetrieveImagingDocumentSetRequestTransformer transformer = new RetrieveImagingDocumentSetRequestTransformer(factory);
259 return transformer.fromEbXML(new EbXMLRetrieveImagingDocumentSetRequest30(in));
260 }
261
262
263
264
265
266
267 @Converter
268 public static RemoveObjectsRequest convert(RemoveMetadata in) {
269 RemoveMetadataRequestTransformer transformer = new RemoveMetadataRequestTransformer();
270 return (RemoveObjectsRequest) transformer.toEbXML(in).getInternal();
271 }
272
273
274
275
276
277
278 @Converter
279 public static RemoveMetadata convert(RemoveObjectsRequest in) {
280 RemoveMetadataRequestTransformer transformer = new RemoveMetadataRequestTransformer();
281 return transformer.fromEbXML(new EbXMLRemoveMetadataRequest30(in));
282 }
283
284 }
285