001package org.hl7.fhir.convertors.conv40_50;
002
003
004import org.hl7.fhir.convertors.VersionConvertor_40_50;
005import org.hl7.fhir.exceptions.FHIRException;
006
007/*
008  Copyright (c) 2011+, HL7, Inc.
009  All rights reserved.
010  
011  Redistribution and use in source and binary forms, with or without modification, 
012  are permitted provided that the following conditions are met:
013  
014   * Redistributions of source code must retain the above copyright notice, this 
015     list of conditions and the following disclaimer.
016   * Redistributions in binary form must reproduce the above copyright notice, 
017     this list of conditions and the following disclaimer in the documentation 
018     and/or other materials provided with the distribution.
019   * Neither the name of HL7 nor the names of its contributors may be used to 
020     endorse or promote products derived from this software without specific 
021     prior written permission.
022  
023  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
024  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
025  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
026  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
027  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
028  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
029  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
030  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
031  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
032  POSSIBILITY OF SUCH DAMAGE.
033  
034*/
035// Generated on Sun, Feb 24, 2019 11:37+1100 for FHIR v4.0.0
036public class Bundle40_50 extends VersionConvertor_40_50 {
037
038    public static org.hl7.fhir.r5.model.Bundle convertBundle(org.hl7.fhir.r4.model.Bundle src) throws FHIRException {
039        if (src == null)
040            return null;
041        org.hl7.fhir.r5.model.Bundle tgt = new org.hl7.fhir.r5.model.Bundle();
042        copyResource(src, tgt);
043        if (src.hasIdentifier())
044            tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
045        if (src.hasType())
046            tgt.setTypeElement(convertBundleType(src.getTypeElement()));
047        if (src.hasTimestamp())
048            tgt.setTimestampElement(convertInstant(src.getTimestampElement()));
049        if (src.hasTotal())
050            tgt.setTotalElement(convertUnsignedInt(src.getTotalElement()));
051        for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
052        for (org.hl7.fhir.r4.model.Bundle.BundleEntryComponent t : src.getEntry()) tgt.addEntry(convertBundleEntryComponent(t));
053        if (src.hasSignature())
054            tgt.setSignature(convertSignature(src.getSignature()));
055        return tgt;
056    }
057
058    public static org.hl7.fhir.r4.model.Bundle convertBundle(org.hl7.fhir.r5.model.Bundle src) throws FHIRException {
059        if (src == null)
060            return null;
061        org.hl7.fhir.r4.model.Bundle tgt = new org.hl7.fhir.r4.model.Bundle();
062        copyResource(src, tgt);
063        if (src.hasIdentifier())
064            tgt.setIdentifier(convertIdentifier(src.getIdentifier()));
065        if (src.hasType())
066            tgt.setTypeElement(convertBundleType(src.getTypeElement()));
067        if (src.hasTimestamp())
068            tgt.setTimestampElement(convertInstant(src.getTimestampElement()));
069        if (src.hasTotal())
070            tgt.setTotalElement(convertUnsignedInt(src.getTotalElement()));
071        for (org.hl7.fhir.r5.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
072        for (org.hl7.fhir.r5.model.Bundle.BundleEntryComponent t : src.getEntry()) tgt.addEntry(convertBundleEntryComponent(t));
073        if (src.hasSignature())
074            tgt.setSignature(convertSignature(src.getSignature()));
075        return tgt;
076    }
077
078    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.BundleType> convertBundleType(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Bundle.BundleType> src) throws FHIRException {
079        if (src == null || src.isEmpty())
080            return null;
081        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.BundleType> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Bundle.BundleTypeEnumFactory());
082        VersionConvertor_40_50.copyElement(src, tgt);
083        switch(src.getValue()) {
084            case DOCUMENT:
085                tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.DOCUMENT);
086                break;
087            case MESSAGE:
088                tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.MESSAGE);
089                break;
090            case TRANSACTION:
091                tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.TRANSACTION);
092                break;
093            case TRANSACTIONRESPONSE:
094                tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.TRANSACTIONRESPONSE);
095                break;
096            case BATCH:
097                tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.BATCH);
098                break;
099            case BATCHRESPONSE:
100                tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.BATCHRESPONSE);
101                break;
102            case HISTORY:
103                tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.HISTORY);
104                break;
105            case SEARCHSET:
106                tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.SEARCHSET);
107                break;
108            case COLLECTION:
109                tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.COLLECTION);
110                break;
111            default:
112                tgt.setValue(org.hl7.fhir.r5.model.Bundle.BundleType.NULL);
113                break;
114        }
115        return tgt;
116    }
117
118    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Bundle.BundleType> convertBundleType(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.BundleType> src) throws FHIRException {
119        if (src == null || src.isEmpty())
120            return null;
121        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Bundle.BundleType> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Bundle.BundleTypeEnumFactory());
122        VersionConvertor_40_50.copyElement(src, tgt);
123        switch(src.getValue()) {
124            case DOCUMENT:
125                tgt.setValue(org.hl7.fhir.r4.model.Bundle.BundleType.DOCUMENT);
126                break;
127            case MESSAGE:
128                tgt.setValue(org.hl7.fhir.r4.model.Bundle.BundleType.MESSAGE);
129                break;
130            case TRANSACTION:
131                tgt.setValue(org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTION);
132                break;
133            case TRANSACTIONRESPONSE:
134                tgt.setValue(org.hl7.fhir.r4.model.Bundle.BundleType.TRANSACTIONRESPONSE);
135                break;
136            case BATCH:
137                tgt.setValue(org.hl7.fhir.r4.model.Bundle.BundleType.BATCH);
138                break;
139            case BATCHRESPONSE:
140                tgt.setValue(org.hl7.fhir.r4.model.Bundle.BundleType.BATCHRESPONSE);
141                break;
142            case HISTORY:
143                tgt.setValue(org.hl7.fhir.r4.model.Bundle.BundleType.HISTORY);
144                break;
145            case SEARCHSET:
146                tgt.setValue(org.hl7.fhir.r4.model.Bundle.BundleType.SEARCHSET);
147                break;
148            case COLLECTION:
149                tgt.setValue(org.hl7.fhir.r4.model.Bundle.BundleType.COLLECTION);
150                break;
151            default:
152                tgt.setValue(org.hl7.fhir.r4.model.Bundle.BundleType.NULL);
153                break;
154        }
155        return tgt;
156    }
157
158    public static org.hl7.fhir.r5.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.r4.model.Bundle.BundleLinkComponent src) throws FHIRException {
159        if (src == null)
160            return null;
161        org.hl7.fhir.r5.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleLinkComponent();
162        copyElement(src, tgt);
163        if (src.hasRelation())
164            tgt.setRelationElement(convertString(src.getRelationElement()));
165        if (src.hasUrl())
166            tgt.setUrlElement(convertUri(src.getUrlElement()));
167        return tgt;
168    }
169
170    public static org.hl7.fhir.r4.model.Bundle.BundleLinkComponent convertBundleLinkComponent(org.hl7.fhir.r5.model.Bundle.BundleLinkComponent src) throws FHIRException {
171        if (src == null)
172            return null;
173        org.hl7.fhir.r4.model.Bundle.BundleLinkComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleLinkComponent();
174        copyElement(src, tgt);
175        if (src.hasRelation())
176            tgt.setRelationElement(convertString(src.getRelationElement()));
177        if (src.hasUrl())
178            tgt.setUrlElement(convertUri(src.getUrlElement()));
179        return tgt;
180    }
181
182    public static org.hl7.fhir.r5.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryComponent src) throws FHIRException {
183        if (src == null)
184            return null;
185        org.hl7.fhir.r5.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleEntryComponent();
186        copyElement(src, tgt);
187        for (org.hl7.fhir.r4.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
188        if (src.hasFullUrl())
189            tgt.setFullUrlElement(convertUri(src.getFullUrlElement()));
190        if (src.hasResource())
191            tgt.setResource(convertResource(src.getResource()));
192        if (src.hasSearch())
193            tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch()));
194        if (src.hasRequest())
195            tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest()));
196        if (src.hasResponse())
197            tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse()));
198        return tgt;
199    }
200
201    public static org.hl7.fhir.r4.model.Bundle.BundleEntryComponent convertBundleEntryComponent(org.hl7.fhir.r5.model.Bundle.BundleEntryComponent src) throws FHIRException {
202        if (src == null)
203            return null;
204        org.hl7.fhir.r4.model.Bundle.BundleEntryComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryComponent();
205        copyElement(src, tgt);
206        for (org.hl7.fhir.r5.model.Bundle.BundleLinkComponent t : src.getLink()) tgt.addLink(convertBundleLinkComponent(t));
207        if (src.hasFullUrl())
208            tgt.setFullUrlElement(convertUri(src.getFullUrlElement()));
209        if (src.hasResource())
210            tgt.setResource(convertResource(src.getResource()));
211        if (src.hasSearch())
212            tgt.setSearch(convertBundleEntrySearchComponent(src.getSearch()));
213        if (src.hasRequest())
214            tgt.setRequest(convertBundleEntryRequestComponent(src.getRequest()));
215        if (src.hasResponse())
216            tgt.setResponse(convertBundleEntryResponseComponent(src.getResponse()));
217        return tgt;
218    }
219
220    public static org.hl7.fhir.r5.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent src) throws FHIRException {
221        if (src == null)
222            return null;
223        org.hl7.fhir.r5.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleEntrySearchComponent();
224        copyElement(src, tgt);
225        if (src.hasMode())
226            tgt.setModeElement(convertSearchEntryMode(src.getModeElement()));
227        if (src.hasScore())
228            tgt.setScoreElement(convertDecimal(src.getScoreElement()));
229        return tgt;
230    }
231
232    public static org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent convertBundleEntrySearchComponent(org.hl7.fhir.r5.model.Bundle.BundleEntrySearchComponent src) throws FHIRException {
233        if (src == null)
234            return null;
235        org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntrySearchComponent();
236        copyElement(src, tgt);
237        if (src.hasMode())
238            tgt.setModeElement(convertSearchEntryMode(src.getModeElement()));
239        if (src.hasScore())
240            tgt.setScoreElement(convertDecimal(src.getScoreElement()));
241        return tgt;
242    }
243
244    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.SearchEntryMode> convertSearchEntryMode(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Bundle.SearchEntryMode> src) throws FHIRException {
245        if (src == null || src.isEmpty())
246            return null;
247        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.SearchEntryMode> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Bundle.SearchEntryModeEnumFactory());
248        VersionConvertor_40_50.copyElement(src, tgt);
249        switch(src.getValue()) {
250            case MATCH:
251                tgt.setValue(org.hl7.fhir.r5.model.Bundle.SearchEntryMode.MATCH);
252                break;
253            case INCLUDE:
254                tgt.setValue(org.hl7.fhir.r5.model.Bundle.SearchEntryMode.INCLUDE);
255                break;
256            case OUTCOME:
257                tgt.setValue(org.hl7.fhir.r5.model.Bundle.SearchEntryMode.OUTCOME);
258                break;
259            default:
260                tgt.setValue(org.hl7.fhir.r5.model.Bundle.SearchEntryMode.NULL);
261                break;
262        }
263        return tgt;
264    }
265
266    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Bundle.SearchEntryMode> convertSearchEntryMode(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.SearchEntryMode> src) throws FHIRException {
267        if (src == null || src.isEmpty())
268            return null;
269        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Bundle.SearchEntryMode> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Bundle.SearchEntryModeEnumFactory());
270        VersionConvertor_40_50.copyElement(src, tgt);
271        switch(src.getValue()) {
272            case MATCH:
273                tgt.setValue(org.hl7.fhir.r4.model.Bundle.SearchEntryMode.MATCH);
274                break;
275            case INCLUDE:
276                tgt.setValue(org.hl7.fhir.r4.model.Bundle.SearchEntryMode.INCLUDE);
277                break;
278            case OUTCOME:
279                tgt.setValue(org.hl7.fhir.r4.model.Bundle.SearchEntryMode.OUTCOME);
280                break;
281            default:
282                tgt.setValue(org.hl7.fhir.r4.model.Bundle.SearchEntryMode.NULL);
283                break;
284        }
285        return tgt;
286    }
287
288    public static org.hl7.fhir.r5.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent src) throws FHIRException {
289        if (src == null)
290            return null;
291        org.hl7.fhir.r5.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleEntryRequestComponent();
292        copyElement(src, tgt);
293        if (src.hasMethod())
294            tgt.setMethodElement(convertHTTPVerb(src.getMethodElement()));
295        if (src.hasUrl())
296            tgt.setUrlElement(convertUri(src.getUrlElement()));
297        if (src.hasIfNoneMatch())
298            tgt.setIfNoneMatchElement(convertString(src.getIfNoneMatchElement()));
299        if (src.hasIfModifiedSince())
300            tgt.setIfModifiedSinceElement(convertInstant(src.getIfModifiedSinceElement()));
301        if (src.hasIfMatch())
302            tgt.setIfMatchElement(convertString(src.getIfMatchElement()));
303        if (src.hasIfNoneExist())
304            tgt.setIfNoneExistElement(convertString(src.getIfNoneExistElement()));
305        return tgt;
306    }
307
308    public static org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent convertBundleEntryRequestComponent(org.hl7.fhir.r5.model.Bundle.BundleEntryRequestComponent src) throws FHIRException {
309        if (src == null)
310            return null;
311        org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryRequestComponent();
312        copyElement(src, tgt);
313        if (src.hasMethod())
314            tgt.setMethodElement(convertHTTPVerb(src.getMethodElement()));
315        if (src.hasUrl())
316            tgt.setUrlElement(convertUri(src.getUrlElement()));
317        if (src.hasIfNoneMatch())
318            tgt.setIfNoneMatchElement(convertString(src.getIfNoneMatchElement()));
319        if (src.hasIfModifiedSince())
320            tgt.setIfModifiedSinceElement(convertInstant(src.getIfModifiedSinceElement()));
321        if (src.hasIfMatch())
322            tgt.setIfMatchElement(convertString(src.getIfMatchElement()));
323        if (src.hasIfNoneExist())
324            tgt.setIfNoneExistElement(convertString(src.getIfNoneExistElement()));
325        return tgt;
326    }
327
328    static public org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.HTTPVerb> convertHTTPVerb(org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Bundle.HTTPVerb> src) throws FHIRException {
329        if (src == null || src.isEmpty())
330            return null;
331        org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.HTTPVerb> tgt = new org.hl7.fhir.r5.model.Enumeration<>(new org.hl7.fhir.r5.model.Bundle.HTTPVerbEnumFactory());
332        VersionConvertor_40_50.copyElement(src, tgt);
333        switch(src.getValue()) {
334            case GET:
335                tgt.setValue(org.hl7.fhir.r5.model.Bundle.HTTPVerb.GET);
336                break;
337            case HEAD:
338                tgt.setValue(org.hl7.fhir.r5.model.Bundle.HTTPVerb.HEAD);
339                break;
340            case POST:
341                tgt.setValue(org.hl7.fhir.r5.model.Bundle.HTTPVerb.POST);
342                break;
343            case PUT:
344                tgt.setValue(org.hl7.fhir.r5.model.Bundle.HTTPVerb.PUT);
345                break;
346            case DELETE:
347                tgt.setValue(org.hl7.fhir.r5.model.Bundle.HTTPVerb.DELETE);
348                break;
349            case PATCH:
350                tgt.setValue(org.hl7.fhir.r5.model.Bundle.HTTPVerb.PATCH);
351                break;
352            default:
353                tgt.setValue(org.hl7.fhir.r5.model.Bundle.HTTPVerb.NULL);
354                break;
355        }
356        return tgt;
357    }
358
359    static public org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Bundle.HTTPVerb> convertHTTPVerb(org.hl7.fhir.r5.model.Enumeration<org.hl7.fhir.r5.model.Bundle.HTTPVerb> src) throws FHIRException {
360        if (src == null || src.isEmpty())
361            return null;
362        org.hl7.fhir.r4.model.Enumeration<org.hl7.fhir.r4.model.Bundle.HTTPVerb> tgt = new org.hl7.fhir.r4.model.Enumeration<>(new org.hl7.fhir.r4.model.Bundle.HTTPVerbEnumFactory());
363        VersionConvertor_40_50.copyElement(src, tgt);
364        switch(src.getValue()) {
365            case GET:
366                tgt.setValue(org.hl7.fhir.r4.model.Bundle.HTTPVerb.GET);
367                break;
368            case HEAD:
369                tgt.setValue(org.hl7.fhir.r4.model.Bundle.HTTPVerb.HEAD);
370                break;
371            case POST:
372                tgt.setValue(org.hl7.fhir.r4.model.Bundle.HTTPVerb.POST);
373                break;
374            case PUT:
375                tgt.setValue(org.hl7.fhir.r4.model.Bundle.HTTPVerb.PUT);
376                break;
377            case DELETE:
378                tgt.setValue(org.hl7.fhir.r4.model.Bundle.HTTPVerb.DELETE);
379                break;
380            case PATCH:
381                tgt.setValue(org.hl7.fhir.r4.model.Bundle.HTTPVerb.PATCH);
382                break;
383            default:
384                tgt.setValue(org.hl7.fhir.r4.model.Bundle.HTTPVerb.NULL);
385                break;
386        }
387        return tgt;
388    }
389
390    public static org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent src) throws FHIRException {
391        if (src == null)
392            return null;
393        org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent();
394        copyElement(src, tgt);
395        if (src.hasStatus())
396            tgt.setStatusElement(convertString(src.getStatusElement()));
397        if (src.hasLocation())
398            tgt.setLocationElement(convertUri(src.getLocationElement()));
399        if (src.hasEtag())
400            tgt.setEtagElement(convertString(src.getEtagElement()));
401        if (src.hasLastModified())
402            tgt.setLastModifiedElement(convertInstant(src.getLastModifiedElement()));
403        if (src.hasOutcome())
404            tgt.setOutcome(convertResource(src.getOutcome()));
405        return tgt;
406    }
407
408    public static org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent convertBundleEntryResponseComponent(org.hl7.fhir.r5.model.Bundle.BundleEntryResponseComponent src) throws FHIRException {
409        if (src == null)
410            return null;
411        org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent tgt = new org.hl7.fhir.r4.model.Bundle.BundleEntryResponseComponent();
412        copyElement(src, tgt);
413        if (src.hasStatus())
414            tgt.setStatusElement(convertString(src.getStatusElement()));
415        if (src.hasLocation())
416            tgt.setLocationElement(convertUri(src.getLocationElement()));
417        if (src.hasEtag())
418            tgt.setEtagElement(convertString(src.getEtagElement()));
419        if (src.hasLastModified())
420            tgt.setLastModifiedElement(convertInstant(src.getLastModifiedElement()));
421        if (src.hasOutcome())
422            tgt.setOutcome(convertResource(src.getOutcome()));
423        return tgt;
424    }
425}