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