001package org.hl7.fhir.convertors.conv10_30;
002
003import org.hl7.fhir.convertors.VersionConvertorAdvisor30;
004import org.hl7.fhir.convertors.VersionConvertor_10_30;
005import org.hl7.fhir.exceptions.FHIRException;
006
007public class Bundle10_30 {
008
009    public static org.hl7.fhir.dstu3.model.Bundle convertBundle(org.hl7.fhir.dstu2.model.Bundle src) throws FHIRException {
010        if (src == null || src.isEmpty())
011            return null;
012        org.hl7.fhir.dstu3.model.Bundle tgt = new org.hl7.fhir.dstu3.model.Bundle();
013        VersionConvertor_10_30.copyResource(src, tgt);
014        if (src.hasType())
015            tgt.setTypeElement(convertBundleType(src.getTypeElement()));
016        if (src.hasTotal())
017            tgt.setTotalElement(VersionConvertor_10_30.convertUnsignedInt(src.getTotalElement()));
018        for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
019        for (org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent t : src.getEntry()) tgt.addEntry(convertBundleEntryComponent(t));
020        if (src.hasSignature())
021            tgt.setSignature(VersionConvertor_10_30.convertSignature(src.getSignature()));
022        return tgt;
023    }
024
025    public static org.hl7.fhir.dstu2.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src, VersionConvertorAdvisor30 advisor) throws FHIRException {
026        if (src == null || src.isEmpty())
027            return null;
028        org.hl7.fhir.dstu2.model.Bundle tgt = new org.hl7.fhir.dstu2.model.Bundle();
029        VersionConvertor_10_30.copyResource(src, tgt);
030        if (src.hasType())
031            tgt.setTypeElement(convertBundleType(src.getTypeElement()));
032        if (src.hasTotal())
033            tgt.setTotalElement(VersionConvertor_10_30.convertUnsignedInt(src.getTotalElement()));
034        for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
035        for (org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent t : src.getEntry()) tgt.addEntry(convertBundleEntryComponent(t, advisor));
036        if (src.hasSignature())
037            tgt.setSignature(VersionConvertor_10_30.convertSignature(src.getSignature()));
038        return tgt;
039    }
040
041    public static org.hl7.fhir.dstu2.model.Bundle convertBundle(org.hl7.fhir.dstu3.model.Bundle src) throws FHIRException {
042        return convertBundle(src, null);
043    }
044
045    public static org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent src, VersionConvertorAdvisor30 advisor) throws FHIRException {
046        if (src == null || src.isEmpty())
047            return null;
048        if (advisor.ignoreEntry(src))
049            return null;
050        org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent();
051        VersionConvertor_10_30.copyElement(src, tgt);
052        for (org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
053        if (src.hasFullUrlElement())
054            tgt.setFullUrlElement(VersionConvertor_10_30.convertUri(src.getFullUrlElement()));
055        org.hl7.fhir.dstu2.model.Resource res = advisor.convert(src.getResource());
056        if (res == null)
057            res = VersionConvertor_10_30.convertResource(src.getResource());
058        tgt.setResource(res);
059        if (src.hasSearch())
060            tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch()));
061        if (src.hasRequest())
062            tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest()));
063        if (src.hasResponse())
064            tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse()));
065        return tgt;
066    }
067
068    public static org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent src) throws FHIRException {
069        return convertBundleEntryComponent(src, null);
070    }
071
072    public static org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.dstu2.model.Bundle.BundleEntryComponent src) throws FHIRException {
073        if (src == null || src.isEmpty())
074            return null;
075        org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryComponent();
076        VersionConvertor_10_30.copyElement(src, tgt);
077        for (org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
078        if (src.hasFullUrlElement())
079            tgt.setFullUrlElement(VersionConvertor_10_30.convertUri(src.getFullUrlElement()));
080        if (src.hasResource())
081            tgt.setResource(VersionConvertor_10_30.convertResource(src.getResource()));
082        if (src.hasSearch())
083            tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch()));
084        if (src.hasRequest())
085            tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest()));
086        if (src.hasResponse())
087            tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse()));
088        return tgt;
089    }
090
091    public static org.hl7.fhir.dstu2.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent src) throws FHIRException {
092        if (src == null || src.isEmpty())
093            return null;
094        org.hl7.fhir.dstu2.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryRequestComponent();
095        VersionConvertor_10_30.copyElement(src, tgt);
096        if (src.hasMethod())
097            tgt.setMethodElement(convertHTTPVerb(src.getMethodElement()));
098        if (src.hasUrlElement())
099            tgt.setUrlElement(VersionConvertor_10_30.convertUri(src.getUrlElement()));
100        if (src.hasIfNoneMatchElement())
101            tgt.setIfNoneMatchElement(VersionConvertor_10_30.convertString(src.getIfNoneMatchElement()));
102        if (src.hasIfModifiedSinceElement())
103            tgt.setIfModifiedSinceElement(VersionConvertor_10_30.convertInstant(src.getIfModifiedSinceElement()));
104        if (src.hasIfMatchElement())
105            tgt.setIfMatchElement(VersionConvertor_10_30.convertString(src.getIfMatchElement()));
106        if (src.hasIfNoneExistElement())
107            tgt.setIfNoneExistElement(VersionConvertor_10_30.convertString(src.getIfNoneExistElement()));
108        return tgt;
109    }
110
111    public static org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.dstu2.model.Bundle.BundleEntryRequestComponent src) throws FHIRException {
112        if (src == null || src.isEmpty())
113            return null;
114        org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryRequestComponent();
115        VersionConvertor_10_30.copyElement(src, tgt);
116        if (src.hasMethod())
117            tgt.setMethodElement(convertHTTPVerb(src.getMethodElement()));
118        if (src.hasUrlElement())
119            tgt.setUrlElement(VersionConvertor_10_30.convertUri(src.getUrlElement()));
120        if (src.hasIfNoneMatchElement())
121            tgt.setIfNoneMatchElement(VersionConvertor_10_30.convertString(src.getIfNoneMatchElement()));
122        if (src.hasIfModifiedSinceElement())
123            tgt.setIfModifiedSinceElement(VersionConvertor_10_30.convertInstant(src.getIfModifiedSinceElement()));
124        if (src.hasIfMatchElement())
125            tgt.setIfMatchElement(VersionConvertor_10_30.convertString(src.getIfMatchElement()));
126        if (src.hasIfNoneExistElement())
127            tgt.setIfNoneExistElement(VersionConvertor_10_30.convertString(src.getIfNoneExistElement()));
128        return tgt;
129    }
130
131    public static org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent src) throws FHIRException {
132        if (src == null || src.isEmpty())
133            return null;
134        org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent();
135        VersionConvertor_10_30.copyElement(src, tgt);
136        if (src.hasStatusElement())
137            tgt.setStatusElement(VersionConvertor_10_30.convertString(src.getStatusElement()));
138        if (src.hasLocationElement())
139            tgt.setLocationElement(VersionConvertor_10_30.convertUri(src.getLocationElement()));
140        if (src.hasEtagElement())
141            tgt.setEtagElement(VersionConvertor_10_30.convertString(src.getEtagElement()));
142        if (src.hasLastModifiedElement())
143            tgt.setLastModifiedElement(VersionConvertor_10_30.convertInstant(src.getLastModifiedElement()));
144        return tgt;
145    }
146
147    public static org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.dstu2.model.Bundle.BundleEntryResponseComponent src) throws FHIRException {
148        if (src == null || src.isEmpty())
149            return null;
150        org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntryResponseComponent();
151        VersionConvertor_10_30.copyElement(src, tgt);
152        if (src.hasStatusElement())
153            tgt.setStatusElement(VersionConvertor_10_30.convertString(src.getStatusElement()));
154        if (src.hasLocationElement())
155            tgt.setLocationElement(VersionConvertor_10_30.convertUri(src.getLocationElement()));
156        if (src.hasEtagElement())
157            tgt.setEtagElement(VersionConvertor_10_30.convertString(src.getEtagElement()));
158        if (src.hasLastModifiedElement())
159            tgt.setLastModifiedElement(VersionConvertor_10_30.convertInstant(src.getLastModifiedElement()));
160        return tgt;
161    }
162
163    public static org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent src) throws FHIRException {
164        if (src == null || src.isEmpty())
165            return null;
166        org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent();
167        VersionConvertor_10_30.copyElement(src, tgt);
168        if (src.hasMode())
169            tgt.setModeElement(convertSearchEntryMode(src.getModeElement()));
170        if (src.hasScoreElement())
171            tgt.setScoreElement(VersionConvertor_10_30.convertDecimal(src.getScoreElement()));
172        return tgt;
173    }
174
175    public static org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.dstu2.model.Bundle.BundleEntrySearchComponent src) throws FHIRException {
176        if (src == null || src.isEmpty())
177            return null;
178        org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleEntrySearchComponent();
179        VersionConvertor_10_30.copyElement(src, tgt);
180        if (src.hasMode())
181            tgt.setModeElement(convertSearchEntryMode(src.getModeElement()));
182        if (src.hasScoreElement())
183            tgt.setScoreElement(VersionConvertor_10_30.convertDecimal(src.getScoreElement()));
184        return tgt;
185    }
186
187    public static org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent src) throws FHIRException {
188        if (src == null || src.isEmpty())
189            return null;
190        org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent();
191        VersionConvertor_10_30.copyElement(src, tgt);
192        if (src.hasRelationElement())
193            tgt.setRelationElement(VersionConvertor_10_30.convertString(src.getRelationElement()));
194        if (src.hasUrlElement())
195            tgt.setUrlElement(VersionConvertor_10_30.convertUri(src.getUrlElement()));
196        return tgt;
197    }
198
199    public static org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.dstu2.model.Bundle.BundleLinkComponent src) throws FHIRException {
200        if (src == null || src.isEmpty())
201            return null;
202        org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.dstu3.model.Bundle.BundleLinkComponent();
203        VersionConvertor_10_30.copyElement(src, tgt);
204        if (src.hasRelationElement())
205            tgt.setRelationElement(VersionConvertor_10_30.convertString(src.getRelationElement()));
206        if (src.hasUrlElement())
207            tgt.setUrlElement(VersionConvertor_10_30.convertUri(src.getUrlElement()));
208        return tgt;
209    }
210
211    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.BundleType> convertBundleType(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Bundle.BundleType> src) throws FHIRException {
212        if (src == null || src.isEmpty())
213            return null;
214        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.BundleType> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Bundle.BundleTypeEnumFactory());
215        VersionConvertor_10_30.copyElement(src, tgt);
216        switch(src.getValue()) {
217            case DOCUMENT:
218                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.DOCUMENT);
219                break;
220            case MESSAGE:
221                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.MESSAGE);
222                break;
223            case TRANSACTION:
224                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.TRANSACTION);
225                break;
226            case TRANSACTIONRESPONSE:
227                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.TRANSACTIONRESPONSE);
228                break;
229            case BATCH:
230                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.BATCH);
231                break;
232            case BATCHRESPONSE:
233                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.BATCHRESPONSE);
234                break;
235            case HISTORY:
236                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.HISTORY);
237                break;
238            case SEARCHSET:
239                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.SEARCHSET);
240                break;
241            case COLLECTION:
242                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.COLLECTION);
243                break;
244            default:
245                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.BundleType.NULL);
246                break;
247        }
248        return tgt;
249    }
250
251    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Bundle.BundleType> convertBundleType(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.BundleType> src) throws FHIRException {
252        if (src == null || src.isEmpty())
253            return null;
254        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Bundle.BundleType> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Bundle.BundleTypeEnumFactory());
255        VersionConvertor_10_30.copyElement(src, tgt);
256        switch(src.getValue()) {
257            case DOCUMENT:
258                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.BundleType.DOCUMENT);
259                break;
260            case MESSAGE:
261                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.BundleType.MESSAGE);
262                break;
263            case TRANSACTION:
264                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.BundleType.TRANSACTION);
265                break;
266            case TRANSACTIONRESPONSE:
267                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.BundleType.TRANSACTIONRESPONSE);
268                break;
269            case BATCH:
270                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.BundleType.BATCH);
271                break;
272            case BATCHRESPONSE:
273                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.BundleType.BATCHRESPONSE);
274                break;
275            case HISTORY:
276                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.BundleType.HISTORY);
277                break;
278            case SEARCHSET:
279                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.BundleType.SEARCHSET);
280                break;
281            case COLLECTION:
282                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.BundleType.COLLECTION);
283                break;
284            default:
285                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.BundleType.NULL);
286                break;
287        }
288        return tgt;
289    }
290
291    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.HTTPVerb> convertHTTPVerb(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Bundle.HTTPVerb> src) throws FHIRException {
292        if (src == null || src.isEmpty())
293            return null;
294        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.HTTPVerb> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Bundle.HTTPVerbEnumFactory());
295        VersionConvertor_10_30.copyElement(src, tgt);
296        switch(src.getValue()) {
297            case GET:
298                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.GET);
299                break;
300            case POST:
301                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.POST);
302                break;
303            case PUT:
304                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.PUT);
305                break;
306            case DELETE:
307                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.DELETE);
308                break;
309            default:
310                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.HTTPVerb.NULL);
311                break;
312        }
313        return tgt;
314    }
315
316    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Bundle.HTTPVerb> convertHTTPVerb(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.HTTPVerb> src) throws FHIRException {
317        if (src == null || src.isEmpty())
318            return null;
319        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Bundle.HTTPVerb> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Bundle.HTTPVerbEnumFactory());
320        VersionConvertor_10_30.copyElement(src, tgt);
321        switch(src.getValue()) {
322            case GET:
323                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.GET);
324                break;
325            case POST:
326                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.POST);
327                break;
328            case PUT:
329                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.PUT);
330                break;
331            case DELETE:
332                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.DELETE);
333                break;
334            default:
335                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.HTTPVerb.NULL);
336                break;
337        }
338        return tgt;
339    }
340
341    static public org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode> convertSearchEntryMode(org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode> src) throws FHIRException {
342        if (src == null || src.isEmpty())
343            return null;
344        org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode> tgt = new org.hl7.fhir.dstu3.model.Enumeration<>(new org.hl7.fhir.dstu3.model.Bundle.SearchEntryModeEnumFactory());
345        VersionConvertor_10_30.copyElement(src, tgt);
346        switch(src.getValue()) {
347            case MATCH:
348                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.MATCH);
349                break;
350            case INCLUDE:
351                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.INCLUDE);
352                break;
353            case OUTCOME:
354                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.OUTCOME);
355                break;
356            default:
357                tgt.setValue(org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode.NULL);
358                break;
359        }
360        return tgt;
361    }
362
363    static public org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode> convertSearchEntryMode(org.hl7.fhir.dstu3.model.Enumeration<org.hl7.fhir.dstu3.model.Bundle.SearchEntryMode> src) throws FHIRException {
364        if (src == null || src.isEmpty())
365            return null;
366        org.hl7.fhir.dstu2.model.Enumeration<org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode> tgt = new org.hl7.fhir.dstu2.model.Enumeration<>(new org.hl7.fhir.dstu2.model.Bundle.SearchEntryModeEnumFactory());
367        VersionConvertor_10_30.copyElement(src, tgt);
368        switch(src.getValue()) {
369            case MATCH:
370                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode.MATCH);
371                break;
372            case INCLUDE:
373                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode.INCLUDE);
374                break;
375            case OUTCOME:
376                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode.OUTCOME);
377                break;
378            default:
379                tgt.setValue(org.hl7.fhir.dstu2.model.Bundle.SearchEntryMode.NULL);
380                break;
381        }
382        return tgt;
383    }
384}