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