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