![](/hapi-fhir/images/logos/raccoon-forwards.png)
001package org.hl7.fhir.r5.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import java.math.*; 038import org.hl7.fhir.utilities.Utilities; 039import org.hl7.fhir.r5.model.Enumerations.*; 040import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 041import org.hl7.fhir.exceptions.FHIRException; 042import org.hl7.fhir.instance.model.api.ICompositeType; 043import ca.uhn.fhir.model.api.annotation.ResourceDef; 044import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 045import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 046import ca.uhn.fhir.model.api.annotation.Child; 047import ca.uhn.fhir.model.api.annotation.ChildOrder; 048import ca.uhn.fhir.model.api.annotation.Description; 049import ca.uhn.fhir.model.api.annotation.Block; 050 051import org.hl7.fhir.instance.model.api.IBaseBundle; 052/** 053 * A container for a collection of resources. 054 */ 055@ResourceDef(name="Bundle", profile="http://hl7.org/fhir/StructureDefinition/Bundle") 056public class Bundle extends Resource implements IBaseBundle { 057 058 public enum BundleType { 059 /** 060 * The bundle is a document. The first resource is a Composition. 061 */ 062 DOCUMENT, 063 /** 064 * The bundle is a message. The first resource is a MessageHeader. 065 */ 066 MESSAGE, 067 /** 068 * The bundle is a transaction - intended to be processed by a server as an atomic commit. 069 */ 070 TRANSACTION, 071 /** 072 * The bundle is a transaction response. Because the response is a transaction response, the transaction has succeeded, and all responses are error free. 073 */ 074 TRANSACTIONRESPONSE, 075 /** 076 * The bundle is a set of actions - intended to be processed by a server as a group of independent actions. 077 */ 078 BATCH, 079 /** 080 * The bundle is a batch response. Note that as a batch, some responses may indicate failure and others success. 081 */ 082 BATCHRESPONSE, 083 /** 084 * The bundle is a list of resources from a history interaction on a server. 085 */ 086 HISTORY, 087 /** 088 * The bundle is a list of resources returned as a result of a search/query interaction, operation, or message. 089 */ 090 SEARCHSET, 091 /** 092 * The bundle is a set of resources collected into a single package for ease of distribution that imposes no processing obligations or behavioral rules beyond persistence. 093 */ 094 COLLECTION, 095 /** 096 * The bundle has been generated by a Subscription to communicate information to a client. 097 */ 098 SUBSCRIPTIONNOTIFICATION, 099 /** 100 * added to help the parsers with the generic types 101 */ 102 NULL; 103 public static BundleType fromCode(String codeString) throws FHIRException { 104 if (codeString == null || "".equals(codeString)) 105 return null; 106 if ("document".equals(codeString)) 107 return DOCUMENT; 108 if ("message".equals(codeString)) 109 return MESSAGE; 110 if ("transaction".equals(codeString)) 111 return TRANSACTION; 112 if ("transaction-response".equals(codeString)) 113 return TRANSACTIONRESPONSE; 114 if ("batch".equals(codeString)) 115 return BATCH; 116 if ("batch-response".equals(codeString)) 117 return BATCHRESPONSE; 118 if ("history".equals(codeString)) 119 return HISTORY; 120 if ("searchset".equals(codeString)) 121 return SEARCHSET; 122 if ("collection".equals(codeString)) 123 return COLLECTION; 124 if ("subscription-notification".equals(codeString)) 125 return SUBSCRIPTIONNOTIFICATION; 126 if (Configuration.isAcceptInvalidEnums()) 127 return null; 128 else 129 throw new FHIRException("Unknown BundleType code '"+codeString+"'"); 130 } 131 public String toCode() { 132 switch (this) { 133 case DOCUMENT: return "document"; 134 case MESSAGE: return "message"; 135 case TRANSACTION: return "transaction"; 136 case TRANSACTIONRESPONSE: return "transaction-response"; 137 case BATCH: return "batch"; 138 case BATCHRESPONSE: return "batch-response"; 139 case HISTORY: return "history"; 140 case SEARCHSET: return "searchset"; 141 case COLLECTION: return "collection"; 142 case SUBSCRIPTIONNOTIFICATION: return "subscription-notification"; 143 case NULL: return null; 144 default: return "?"; 145 } 146 } 147 public String getSystem() { 148 switch (this) { 149 case DOCUMENT: return "http://hl7.org/fhir/bundle-type"; 150 case MESSAGE: return "http://hl7.org/fhir/bundle-type"; 151 case TRANSACTION: return "http://hl7.org/fhir/bundle-type"; 152 case TRANSACTIONRESPONSE: return "http://hl7.org/fhir/bundle-type"; 153 case BATCH: return "http://hl7.org/fhir/bundle-type"; 154 case BATCHRESPONSE: return "http://hl7.org/fhir/bundle-type"; 155 case HISTORY: return "http://hl7.org/fhir/bundle-type"; 156 case SEARCHSET: return "http://hl7.org/fhir/bundle-type"; 157 case COLLECTION: return "http://hl7.org/fhir/bundle-type"; 158 case SUBSCRIPTIONNOTIFICATION: return "http://hl7.org/fhir/bundle-type"; 159 case NULL: return null; 160 default: return "?"; 161 } 162 } 163 public String getDefinition() { 164 switch (this) { 165 case DOCUMENT: return "The bundle is a document. The first resource is a Composition."; 166 case MESSAGE: return "The bundle is a message. The first resource is a MessageHeader."; 167 case TRANSACTION: return "The bundle is a transaction - intended to be processed by a server as an atomic commit."; 168 case TRANSACTIONRESPONSE: return "The bundle is a transaction response. Because the response is a transaction response, the transaction has succeeded, and all responses are error free."; 169 case BATCH: return "The bundle is a set of actions - intended to be processed by a server as a group of independent actions."; 170 case BATCHRESPONSE: return "The bundle is a batch response. Note that as a batch, some responses may indicate failure and others success."; 171 case HISTORY: return "The bundle is a list of resources from a history interaction on a server."; 172 case SEARCHSET: return "The bundle is a list of resources returned as a result of a search/query interaction, operation, or message."; 173 case COLLECTION: return "The bundle is a set of resources collected into a single package for ease of distribution that imposes no processing obligations or behavioral rules beyond persistence."; 174 case SUBSCRIPTIONNOTIFICATION: return "The bundle has been generated by a Subscription to communicate information to a client."; 175 case NULL: return null; 176 default: return "?"; 177 } 178 } 179 public String getDisplay() { 180 switch (this) { 181 case DOCUMENT: return "Document"; 182 case MESSAGE: return "Message"; 183 case TRANSACTION: return "Transaction"; 184 case TRANSACTIONRESPONSE: return "Transaction Response"; 185 case BATCH: return "Batch"; 186 case BATCHRESPONSE: return "Batch Response"; 187 case HISTORY: return "History List"; 188 case SEARCHSET: return "Search Results"; 189 case COLLECTION: return "Collection"; 190 case SUBSCRIPTIONNOTIFICATION: return "Subscription Notification"; 191 case NULL: return null; 192 default: return "?"; 193 } 194 } 195 } 196 197 public static class BundleTypeEnumFactory implements EnumFactory<BundleType> { 198 public BundleType fromCode(String codeString) throws IllegalArgumentException { 199 if (codeString == null || "".equals(codeString)) 200 if (codeString == null || "".equals(codeString)) 201 return null; 202 if ("document".equals(codeString)) 203 return BundleType.DOCUMENT; 204 if ("message".equals(codeString)) 205 return BundleType.MESSAGE; 206 if ("transaction".equals(codeString)) 207 return BundleType.TRANSACTION; 208 if ("transaction-response".equals(codeString)) 209 return BundleType.TRANSACTIONRESPONSE; 210 if ("batch".equals(codeString)) 211 return BundleType.BATCH; 212 if ("batch-response".equals(codeString)) 213 return BundleType.BATCHRESPONSE; 214 if ("history".equals(codeString)) 215 return BundleType.HISTORY; 216 if ("searchset".equals(codeString)) 217 return BundleType.SEARCHSET; 218 if ("collection".equals(codeString)) 219 return BundleType.COLLECTION; 220 if ("subscription-notification".equals(codeString)) 221 return BundleType.SUBSCRIPTIONNOTIFICATION; 222 throw new IllegalArgumentException("Unknown BundleType code '"+codeString+"'"); 223 } 224 public Enumeration<BundleType> fromType(PrimitiveType<?> code) throws FHIRException { 225 if (code == null) 226 return null; 227 if (code.isEmpty()) 228 return new Enumeration<BundleType>(this, BundleType.NULL, code); 229 String codeString = ((PrimitiveType) code).asStringValue(); 230 if (codeString == null || "".equals(codeString)) 231 return new Enumeration<BundleType>(this, BundleType.NULL, code); 232 if ("document".equals(codeString)) 233 return new Enumeration<BundleType>(this, BundleType.DOCUMENT, code); 234 if ("message".equals(codeString)) 235 return new Enumeration<BundleType>(this, BundleType.MESSAGE, code); 236 if ("transaction".equals(codeString)) 237 return new Enumeration<BundleType>(this, BundleType.TRANSACTION, code); 238 if ("transaction-response".equals(codeString)) 239 return new Enumeration<BundleType>(this, BundleType.TRANSACTIONRESPONSE, code); 240 if ("batch".equals(codeString)) 241 return new Enumeration<BundleType>(this, BundleType.BATCH, code); 242 if ("batch-response".equals(codeString)) 243 return new Enumeration<BundleType>(this, BundleType.BATCHRESPONSE, code); 244 if ("history".equals(codeString)) 245 return new Enumeration<BundleType>(this, BundleType.HISTORY, code); 246 if ("searchset".equals(codeString)) 247 return new Enumeration<BundleType>(this, BundleType.SEARCHSET, code); 248 if ("collection".equals(codeString)) 249 return new Enumeration<BundleType>(this, BundleType.COLLECTION, code); 250 if ("subscription-notification".equals(codeString)) 251 return new Enumeration<BundleType>(this, BundleType.SUBSCRIPTIONNOTIFICATION, code); 252 throw new FHIRException("Unknown BundleType code '"+codeString+"'"); 253 } 254 public String toCode(BundleType code) { 255 if (code == BundleType.DOCUMENT) 256 return "document"; 257 if (code == BundleType.MESSAGE) 258 return "message"; 259 if (code == BundleType.TRANSACTION) 260 return "transaction"; 261 if (code == BundleType.TRANSACTIONRESPONSE) 262 return "transaction-response"; 263 if (code == BundleType.BATCH) 264 return "batch"; 265 if (code == BundleType.BATCHRESPONSE) 266 return "batch-response"; 267 if (code == BundleType.HISTORY) 268 return "history"; 269 if (code == BundleType.SEARCHSET) 270 return "searchset"; 271 if (code == BundleType.COLLECTION) 272 return "collection"; 273 if (code == BundleType.SUBSCRIPTIONNOTIFICATION) 274 return "subscription-notification"; 275 return "?"; 276 } 277 public String toSystem(BundleType code) { 278 return code.getSystem(); 279 } 280 } 281 282 public enum HTTPVerb { 283 /** 284 * HTTP GET Command. 285 */ 286 GET, 287 /** 288 * HTTP HEAD Command. 289 */ 290 HEAD, 291 /** 292 * HTTP POST Command. 293 */ 294 POST, 295 /** 296 * HTTP PUT Command. 297 */ 298 PUT, 299 /** 300 * HTTP DELETE Command. 301 */ 302 DELETE, 303 /** 304 * HTTP PATCH Command. 305 */ 306 PATCH, 307 /** 308 * added to help the parsers with the generic types 309 */ 310 NULL; 311 public static HTTPVerb fromCode(String codeString) throws FHIRException { 312 if (codeString == null || "".equals(codeString)) 313 return null; 314 if ("GET".equals(codeString)) 315 return GET; 316 if ("HEAD".equals(codeString)) 317 return HEAD; 318 if ("POST".equals(codeString)) 319 return POST; 320 if ("PUT".equals(codeString)) 321 return PUT; 322 if ("DELETE".equals(codeString)) 323 return DELETE; 324 if ("PATCH".equals(codeString)) 325 return PATCH; 326 if (Configuration.isAcceptInvalidEnums()) 327 return null; 328 else 329 throw new FHIRException("Unknown HTTPVerb code '"+codeString+"'"); 330 } 331 public String toCode() { 332 switch (this) { 333 case GET: return "GET"; 334 case HEAD: return "HEAD"; 335 case POST: return "POST"; 336 case PUT: return "PUT"; 337 case DELETE: return "DELETE"; 338 case PATCH: return "PATCH"; 339 case NULL: return null; 340 default: return "?"; 341 } 342 } 343 public String getSystem() { 344 switch (this) { 345 case GET: return "http://hl7.org/fhir/http-verb"; 346 case HEAD: return "http://hl7.org/fhir/http-verb"; 347 case POST: return "http://hl7.org/fhir/http-verb"; 348 case PUT: return "http://hl7.org/fhir/http-verb"; 349 case DELETE: return "http://hl7.org/fhir/http-verb"; 350 case PATCH: return "http://hl7.org/fhir/http-verb"; 351 case NULL: return null; 352 default: return "?"; 353 } 354 } 355 public String getDefinition() { 356 switch (this) { 357 case GET: return "HTTP GET Command."; 358 case HEAD: return "HTTP HEAD Command."; 359 case POST: return "HTTP POST Command."; 360 case PUT: return "HTTP PUT Command."; 361 case DELETE: return "HTTP DELETE Command."; 362 case PATCH: return "HTTP PATCH Command."; 363 case NULL: return null; 364 default: return "?"; 365 } 366 } 367 public String getDisplay() { 368 switch (this) { 369 case GET: return "GET"; 370 case HEAD: return "HEAD"; 371 case POST: return "POST"; 372 case PUT: return "PUT"; 373 case DELETE: return "DELETE"; 374 case PATCH: return "PATCH"; 375 case NULL: return null; 376 default: return "?"; 377 } 378 } 379 } 380 381 public static class HTTPVerbEnumFactory implements EnumFactory<HTTPVerb> { 382 public HTTPVerb fromCode(String codeString) throws IllegalArgumentException { 383 if (codeString == null || "".equals(codeString)) 384 if (codeString == null || "".equals(codeString)) 385 return null; 386 if ("GET".equals(codeString)) 387 return HTTPVerb.GET; 388 if ("HEAD".equals(codeString)) 389 return HTTPVerb.HEAD; 390 if ("POST".equals(codeString)) 391 return HTTPVerb.POST; 392 if ("PUT".equals(codeString)) 393 return HTTPVerb.PUT; 394 if ("DELETE".equals(codeString)) 395 return HTTPVerb.DELETE; 396 if ("PATCH".equals(codeString)) 397 return HTTPVerb.PATCH; 398 throw new IllegalArgumentException("Unknown HTTPVerb code '"+codeString+"'"); 399 } 400 public Enumeration<HTTPVerb> fromType(PrimitiveType<?> code) throws FHIRException { 401 if (code == null) 402 return null; 403 if (code.isEmpty()) 404 return new Enumeration<HTTPVerb>(this, HTTPVerb.NULL, code); 405 String codeString = ((PrimitiveType) code).asStringValue(); 406 if (codeString == null || "".equals(codeString)) 407 return new Enumeration<HTTPVerb>(this, HTTPVerb.NULL, code); 408 if ("GET".equals(codeString)) 409 return new Enumeration<HTTPVerb>(this, HTTPVerb.GET, code); 410 if ("HEAD".equals(codeString)) 411 return new Enumeration<HTTPVerb>(this, HTTPVerb.HEAD, code); 412 if ("POST".equals(codeString)) 413 return new Enumeration<HTTPVerb>(this, HTTPVerb.POST, code); 414 if ("PUT".equals(codeString)) 415 return new Enumeration<HTTPVerb>(this, HTTPVerb.PUT, code); 416 if ("DELETE".equals(codeString)) 417 return new Enumeration<HTTPVerb>(this, HTTPVerb.DELETE, code); 418 if ("PATCH".equals(codeString)) 419 return new Enumeration<HTTPVerb>(this, HTTPVerb.PATCH, code); 420 throw new FHIRException("Unknown HTTPVerb code '"+codeString+"'"); 421 } 422 public String toCode(HTTPVerb code) { 423 if (code == HTTPVerb.GET) 424 return "GET"; 425 if (code == HTTPVerb.HEAD) 426 return "HEAD"; 427 if (code == HTTPVerb.POST) 428 return "POST"; 429 if (code == HTTPVerb.PUT) 430 return "PUT"; 431 if (code == HTTPVerb.DELETE) 432 return "DELETE"; 433 if (code == HTTPVerb.PATCH) 434 return "PATCH"; 435 return "?"; 436 } 437 public String toSystem(HTTPVerb code) { 438 return code.getSystem(); 439 } 440 } 441 442 public enum LinkRelationTypes { 443 /** 444 * Refers to a resource that is the subject of the link's context. 445 */ 446 ABOUT, 447 /** 448 * Asserts that the link target provides an access control description for the link context. 449 */ 450 ACL, 451 /** 452 * Refers to a substitute for this context 453 */ 454 ALTERNATE, 455 /** 456 * Used to reference alternative content that uses the AMP profile of the HTML format. 457 */ 458 AMPHTML, 459 /** 460 * Refers to an appendix. 461 */ 462 APPENDIX, 463 /** 464 * Refers to an icon for the context. Synonym for icon. 465 */ 466 APPLETOUCHICON, 467 /** 468 * Refers to a launch screen for the context. 469 */ 470 APPLETOUCHSTARTUPIMAGE, 471 /** 472 * Refers to a collection of records, documents, or other\n materials of historical interest. 473 */ 474 ARCHIVES, 475 /** 476 * Refers to the context's author. 477 */ 478 AUTHOR, 479 /** 480 * Identifies the entity that blocks access to a resource\n following receipt of a legal demand. 481 */ 482 BLOCKEDBY, 483 /** 484 * Gives a permanent link to use for bookmarking purposes. 485 */ 486 BOOKMARK, 487 /** 488 * Designates the preferred version of a resource (the IRI and its contents). 489 */ 490 CANONICAL, 491 /** 492 * Refers to a chapter in a collection of resources. 493 */ 494 CHAPTER, 495 /** 496 * Indicates that the link target is preferred over the link context for the purpose of permanent citation. 497 */ 498 CITEAS, 499 /** 500 * The target IRI points to a resource which represents the collection resource for the context IRI. 501 */ 502 COLLECTION, 503 /** 504 * Refers to a table of contents. 505 */ 506 CONTENTS, 507 /** 508 * The document linked to was later converted to the\n document that contains this link relation. For example, an RFC can\n have a link to the Internet-Draft that became the RFC; in that case,\n the link relation would be \"convertedFrom\". 509 */ 510 CONVERTEDFROM, 511 /** 512 * Refers to a copyright statement that applies to the\n link's context. 513 */ 514 COPYRIGHT, 515 /** 516 * The target IRI points to a resource where a submission form can be obtained. 517 */ 518 CREATEFORM, 519 /** 520 * Refers to a resource containing the most recent\n item(s) in a collection of resources. 521 */ 522 CURRENT, 523 /** 524 * Refers to a resource providing information about the\n link's context. 525 */ 526 DESCRIBEDBY, 527 /** 528 * The relationship A 'describes' B asserts that\n resource A provides a description of resource B. There are no\n constraints on the format or representation of either A or B,\n neither are there any further constraints on either resource. 529 */ 530 DESCRIBES, 531 /** 532 * Refers to a list of patent disclosures made with respect to \n material for which 'disclosure' relation is specified. 533 */ 534 DISCLOSURE, 535 /** 536 * Used to indicate an origin that will be used to fetch required \n resources for the link context, and that the user agent ought to resolve \n as early as possible. 537 */ 538 DNSPREFETCH, 539 /** 540 * Refers to a resource whose available representations\n are byte-for-byte identical with the corresponding representations of\n the context IRI. 541 */ 542 DUPLICATE, 543 /** 544 * Refers to a resource that can be used to edit the\n link's context. 545 */ 546 EDIT, 547 /** 548 * The target IRI points to a resource where a submission form for\n editing associated resource can be obtained. 549 */ 550 EDITFORM, 551 /** 552 * Refers to a resource that can be used to edit media\n associated with the link's context. 553 */ 554 EDITMEDIA, 555 /** 556 * Identifies a related resource that is potentially\n large and might require special handling. 557 */ 558 ENCLOSURE, 559 /** 560 * Refers to a resource that is not part of the same site as the current context. 561 */ 562 EXTERNAL, 563 /** 564 * An IRI that refers to the furthest preceding resource\n in a series of resources. 565 */ 566 FIRST, 567 /** 568 * Refers to a glossary of terms. 569 */ 570 GLOSSARY, 571 /** 572 * Refers to context-sensitive help. 573 */ 574 HELP, 575 /** 576 * Refers to a resource hosted by the server indicated by\n the link context. 577 */ 578 HOSTS, 579 /** 580 * Refers to a hub that enables registration for\n notification of updates to the context. 581 */ 582 HUB, 583 /** 584 * Refers to an icon representing the link's context. 585 */ 586 ICON, 587 /** 588 * Refers to an index. 589 */ 590 INDEX, 591 /** 592 * refers to a resource associated with a time interval that ends before the beginning of the time interval associated with the context resource 593 */ 594 INTERVALAFTER, 595 /** 596 * refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource 597 */ 598 INTERVALBEFORE, 599 /** 600 * refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource 601 */ 602 INTERVALCONTAINS, 603 /** 604 * refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource, or ends before the beginning of the time interval associated with the context resource 605 */ 606 INTERVALDISJOINT, 607 /** 608 * refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource 609 */ 610 INTERVALDURING, 611 /** 612 * refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource 613 */ 614 INTERVALEQUALS, 615 /** 616 * refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource 617 */ 618 INTERVALFINISHEDBY, 619 /** 620 * refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource 621 */ 622 INTERVALFINISHES, 623 /** 624 * refers to a resource associated with a time interval that begins before or is coincident with the beginning of the time interval associated with the context resource, and ends after or is coincident with the end of the time interval associated with the context resource 625 */ 626 INTERVALIN, 627 /** 628 * refers to a resource associated with a time interval whose beginning coincides with the end of the time interval associated with the context resource 629 */ 630 INTERVALMEETS, 631 /** 632 * refers to a resource associated with a time interval whose end coincides with the beginning of the time interval associated with the context resource 633 */ 634 INTERVALMETBY, 635 /** 636 * refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the beginning of the time interval associated with the context resource 637 */ 638 INTERVALOVERLAPPEDBY, 639 /** 640 * refers to a resource associated with a time interval that begins before the end of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource 641 */ 642 INTERVALOVERLAPS, 643 /** 644 * refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource 645 */ 646 INTERVALSTARTEDBY, 647 /** 648 * refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource 649 */ 650 INTERVALSTARTS, 651 /** 652 * The target IRI points to a resource that is a member of the collection represented by the context IRI. 653 */ 654 ITEM, 655 /** 656 * An IRI that refers to the furthest following resource\n in a series of resources. 657 */ 658 LAST, 659 /** 660 * Points to a resource containing the latest (e.g.,\n current) version of the context. 661 */ 662 LATESTVERSION, 663 /** 664 * Refers to a license associated with this context. 665 */ 666 LICENSE, 667 /** 668 * The link target of a link with the \"linkset\" relation\n type provides a set of links, including links in which the link\n context of the link participates.\n 669 */ 670 LINKSET, 671 /** 672 * Refers to further information about the link's context,\n expressed as a LRDD (\"Link-based Resource Descriptor Document\")\n resource. See for information about\n processing this relation type in host-meta documents. When used\n elsewhere, it refers to additional links and other metadata.\n Multiple instances indicate additional LRDD resources. LRDD\n resources MUST have an \"application/xrd+xml\" representation, and\n MAY have others. 673 */ 674 LRDD, 675 /** 676 * Links to a manifest file for the context. 677 */ 678 MANIFEST, 679 /** 680 * Refers to a mask that can be applied to the icon for the context. 681 */ 682 MASKICON, 683 /** 684 * Refers to a feed of personalised media recommendations relevant to the link context. 685 */ 686 MEDIAFEED, 687 /** 688 * The Target IRI points to a Memento, a fixed resource that will not change state anymore. 689 */ 690 MEMENTO, 691 /** 692 * Links to the context's Micropub endpoint. 693 */ 694 MICROPUB, 695 /** 696 * Refers to a module that the user agent is to preemptively fetch and store for use in the current context. 697 */ 698 MODULEPRELOAD, 699 /** 700 * Refers to a resource that can be used to monitor changes in an HTTP resource.\n 701 */ 702 MONITOR, 703 /** 704 * Refers to a resource that can be used to monitor changes in a specified group of HTTP resources.\n 705 */ 706 MONITORGROUP, 707 /** 708 * Indicates that the link's context is a part of a series, and\n that the next in the series is the link target.\n 709 */ 710 NEXT, 711 /** 712 * Refers to the immediately following archive resource. 713 */ 714 NEXTARCHIVE, 715 /** 716 * Indicates that the context?s original author or publisher does not endorse the link target. 717 */ 718 NOFOLLOW, 719 /** 720 * Indicates that any newly created top-level browsing context which results from following the link will not be an auxiliary browsing context. 721 */ 722 NOOPENER, 723 /** 724 * Indicates that no referrer information is to be leaked when following the link. 725 */ 726 NOREFERRER, 727 /** 728 * Indicates that any newly created top-level browsing context which results from following the link will be an auxiliary browsing context. 729 */ 730 OPENER, 731 /** 732 * Refers to an OpenID Authentication server on which the context relies for an assertion that the end user controls an Identifier. 733 */ 734 OPENID2_LOCALID, 735 /** 736 * Refers to a resource which accepts OpenID Authentication protocol messages for the context. 737 */ 738 OPENID2_PROVIDER, 739 /** 740 * The Target IRI points to an Original Resource. 741 */ 742 ORIGINAL, 743 /** 744 * Refers to a P3P privacy policy for the context. 745 */ 746 P3PV1, 747 /** 748 * Indicates a resource where payment is accepted. 749 */ 750 PAYMENT, 751 /** 752 * Gives the address of the pingback resource for the link context. 753 */ 754 PINGBACK, 755 /** 756 * Used to indicate an origin that will be used to fetch required \n resources for the link context. Initiating an early connection, which \n includes the DNS lookup, TCP handshake, and optional TLS negotiation, \n allows the user agent to mask the high latency costs of establishing a \n connection. 757 */ 758 PRECONNECT, 759 /** 760 * Points to a resource containing the predecessor\n version in the version history.\n 761 */ 762 PREDECESSORVERSION, 763 /** 764 * The prefetch link relation type is used to identify a resource \n that might be required by the next navigation from the link context, and \n that the user agent ought to fetch, such that the user agent can deliver a \n faster response once the resource is requested in the future. 765 */ 766 PREFETCH, 767 /** 768 * Refers to a resource that should be loaded early in the \n processing of the link's context, without blocking rendering. 769 */ 770 PRELOAD, 771 /** 772 * Used to identify a resource that might be required by the next \n navigation from the link context, and that the user agent ought to fetch \n and execute, such that the user agent can deliver a faster response once \n the resource is requested in the future. 773 */ 774 PRERENDER, 775 /** 776 * Indicates that the link's context is a part of a series, and\n that the previous in the series is the link target.\n 777 */ 778 PREV, 779 /** 780 * Refers to a resource that provides a preview of the link's context. 781 */ 782 PREVIEW, 783 /** 784 * Refers to the previous resource in an ordered series\n of resources. Synonym for \"prev\". 785 */ 786 PREVIOUS, 787 /** 788 * Refers to the immediately preceding archive resource. 789 */ 790 PREVARCHIVE, 791 /** 792 * Refers to a privacy policy associated with the link's context. 793 */ 794 PRIVACYPOLICY, 795 /** 796 * Identifying that a resource representation conforms\nto a certain profile, without affecting the non-profile semantics\nof the resource representation. 797 */ 798 PROFILE, 799 /** 800 * Links to a publication manifest. A manifest represents \n structured information about a publication, such as informative metadata, \n a list of resources, and a default reading order. 801 */ 802 PUBLICATION, 803 /** 804 * Identifies a related resource. 805 */ 806 RELATED, 807 /** 808 * Identifies the root of RESTCONF API as configured on this HTTP server.\n The \"restconf\" relation defines the root of the API defined in RFC8040.\n Subsequent revisions of RESTCONF will use alternate relation values to support \n protocol versioning. 809 */ 810 RESTCONF, 811 /** 812 * Identifies a resource that is a reply to the context\n of the link.\n 813 */ 814 REPLIES, 815 /** 816 * The resource identified by the link target provides an input value to an \n instance of a rule, where the resource which represents the rule instance is \n identified by the link context.\n 817 */ 818 RULEINPUT, 819 /** 820 * Refers to a resource that can be used to search through\n the link's context and related resources. 821 */ 822 SEARCH, 823 /** 824 * Refers to a section in a collection of resources. 825 */ 826 SECTION, 827 /** 828 * Conveys an identifier for the link's context.\n 829 */ 830 SELF, 831 /** 832 * Indicates a URI that can be used to retrieve a\n service document. 833 */ 834 SERVICE, 835 /** 836 * Identifies service description for the context that\n is primarily intended for consumption by machines. 837 */ 838 SERVICEDESC, 839 /** 840 * Identifies service documentation for the context that\n is primarily intended for human consumption. 841 */ 842 SERVICEDOC, 843 /** 844 * Identifies general metadata for the context that is\n primarily intended for consumption by machines. 845 */ 846 SERVICEMETA, 847 /** 848 * Refers to a resource that is within a context that is \n sponsored (such as advertising or another compensation agreement). 849 */ 850 SPONSORED, 851 /** 852 * Refers to the first resource in a collection of\n resources. 853 */ 854 START, 855 /** 856 * Identifies a resource that represents the context's\n status. 857 */ 858 STATUS, 859 /** 860 * Refers to a stylesheet. 861 */ 862 STYLESHEET, 863 /** 864 * Refers to a resource serving as a subsection in a\n collection of resources. 865 */ 866 SUBSECTION, 867 /** 868 * Points to a resource containing the successor version\n in the version history.\n 869 */ 870 SUCCESSORVERSION, 871 /** 872 * Identifies a resource that provides information about\n the context's retirement policy.\n 873 */ 874 SUNSET, 875 /** 876 * Gives a tag (identified by the given address) that applies to\n the current document.\n 877 */ 878 TAG, 879 /** 880 * Refers to the terms of service associated with the link's context. 881 */ 882 TERMSOFSERVICE, 883 /** 884 * The Target IRI points to a TimeGate for an Original Resource. 885 */ 886 TIMEGATE, 887 /** 888 * The Target IRI points to a TimeMap for an Original Resource. 889 */ 890 TIMEMAP, 891 /** 892 * Refers to a resource identifying the abstract semantic type of which the link's context is considered to be an instance. 893 */ 894 TYPE, 895 /** 896 * Refers to a resource that is within a context that is User Generated Content.\n 897 */ 898 UGC, 899 /** 900 * Refers to a parent document in a hierarchy of\n documents.\n 901 */ 902 UP, 903 /** 904 * Points to a resource containing the version history\n for the context.\n 905 */ 906 VERSIONHISTORY, 907 /** 908 * Identifies a resource that is the source of the\n information in the link's context.\n 909 */ 910 VIA, 911 /** 912 * Identifies a target URI that supports the Webmention protocol.\n This allows clients that mention a resource in some form of publishing process\n to contact that endpoint and inform it that this resource has been mentioned. 913 */ 914 WEBMENTION, 915 /** 916 * Points to a working copy for this resource. 917 */ 918 WORKINGCOPY, 919 /** 920 * Points to the versioned resource from which this\n working copy was obtained.\n 921 */ 922 WORKINGCOPYOF, 923 /** 924 * added to help the parsers with the generic types 925 */ 926 NULL; 927 public static LinkRelationTypes fromCode(String codeString) throws FHIRException { 928 if (codeString == null || "".equals(codeString)) 929 return null; 930 if ("about".equals(codeString)) 931 return ABOUT; 932 if ("acl".equals(codeString)) 933 return ACL; 934 if ("alternate".equals(codeString)) 935 return ALTERNATE; 936 if ("amphtml".equals(codeString)) 937 return AMPHTML; 938 if ("appendix".equals(codeString)) 939 return APPENDIX; 940 if ("apple-touch-icon".equals(codeString)) 941 return APPLETOUCHICON; 942 if ("apple-touch-startup-image".equals(codeString)) 943 return APPLETOUCHSTARTUPIMAGE; 944 if ("archives".equals(codeString)) 945 return ARCHIVES; 946 if ("author".equals(codeString)) 947 return AUTHOR; 948 if ("blocked-by".equals(codeString)) 949 return BLOCKEDBY; 950 if ("bookmark".equals(codeString)) 951 return BOOKMARK; 952 if ("canonical".equals(codeString)) 953 return CANONICAL; 954 if ("chapter".equals(codeString)) 955 return CHAPTER; 956 if ("cite-as".equals(codeString)) 957 return CITEAS; 958 if ("collection".equals(codeString)) 959 return COLLECTION; 960 if ("contents".equals(codeString)) 961 return CONTENTS; 962 if ("convertedFrom".equals(codeString)) 963 return CONVERTEDFROM; 964 if ("copyright".equals(codeString)) 965 return COPYRIGHT; 966 if ("create-form".equals(codeString)) 967 return CREATEFORM; 968 if ("current".equals(codeString)) 969 return CURRENT; 970 if ("describedby".equals(codeString)) 971 return DESCRIBEDBY; 972 if ("describes".equals(codeString)) 973 return DESCRIBES; 974 if ("disclosure".equals(codeString)) 975 return DISCLOSURE; 976 if ("dns-prefetch".equals(codeString)) 977 return DNSPREFETCH; 978 if ("duplicate".equals(codeString)) 979 return DUPLICATE; 980 if ("edit".equals(codeString)) 981 return EDIT; 982 if ("edit-form".equals(codeString)) 983 return EDITFORM; 984 if ("edit-media".equals(codeString)) 985 return EDITMEDIA; 986 if ("enclosure".equals(codeString)) 987 return ENCLOSURE; 988 if ("external".equals(codeString)) 989 return EXTERNAL; 990 if ("first".equals(codeString)) 991 return FIRST; 992 if ("glossary".equals(codeString)) 993 return GLOSSARY; 994 if ("help".equals(codeString)) 995 return HELP; 996 if ("hosts".equals(codeString)) 997 return HOSTS; 998 if ("hub".equals(codeString)) 999 return HUB; 1000 if ("icon".equals(codeString)) 1001 return ICON; 1002 if ("index".equals(codeString)) 1003 return INDEX; 1004 if ("intervalAfter".equals(codeString)) 1005 return INTERVALAFTER; 1006 if ("intervalBefore".equals(codeString)) 1007 return INTERVALBEFORE; 1008 if ("intervalContains".equals(codeString)) 1009 return INTERVALCONTAINS; 1010 if ("intervalDisjoint".equals(codeString)) 1011 return INTERVALDISJOINT; 1012 if ("intervalDuring".equals(codeString)) 1013 return INTERVALDURING; 1014 if ("intervalEquals".equals(codeString)) 1015 return INTERVALEQUALS; 1016 if ("intervalFinishedBy".equals(codeString)) 1017 return INTERVALFINISHEDBY; 1018 if ("intervalFinishes".equals(codeString)) 1019 return INTERVALFINISHES; 1020 if ("intervalIn".equals(codeString)) 1021 return INTERVALIN; 1022 if ("intervalMeets".equals(codeString)) 1023 return INTERVALMEETS; 1024 if ("intervalMetBy".equals(codeString)) 1025 return INTERVALMETBY; 1026 if ("intervalOverlappedBy".equals(codeString)) 1027 return INTERVALOVERLAPPEDBY; 1028 if ("intervalOverlaps".equals(codeString)) 1029 return INTERVALOVERLAPS; 1030 if ("intervalStartedBy".equals(codeString)) 1031 return INTERVALSTARTEDBY; 1032 if ("intervalStarts".equals(codeString)) 1033 return INTERVALSTARTS; 1034 if ("item".equals(codeString)) 1035 return ITEM; 1036 if ("last".equals(codeString)) 1037 return LAST; 1038 if ("latest-version".equals(codeString)) 1039 return LATESTVERSION; 1040 if ("license".equals(codeString)) 1041 return LICENSE; 1042 if ("linkset".equals(codeString)) 1043 return LINKSET; 1044 if ("lrdd".equals(codeString)) 1045 return LRDD; 1046 if ("manifest".equals(codeString)) 1047 return MANIFEST; 1048 if ("mask-icon".equals(codeString)) 1049 return MASKICON; 1050 if ("media-feed".equals(codeString)) 1051 return MEDIAFEED; 1052 if ("memento".equals(codeString)) 1053 return MEMENTO; 1054 if ("micropub".equals(codeString)) 1055 return MICROPUB; 1056 if ("modulepreload".equals(codeString)) 1057 return MODULEPRELOAD; 1058 if ("monitor".equals(codeString)) 1059 return MONITOR; 1060 if ("monitor-group".equals(codeString)) 1061 return MONITORGROUP; 1062 if ("next".equals(codeString)) 1063 return NEXT; 1064 if ("next-archive".equals(codeString)) 1065 return NEXTARCHIVE; 1066 if ("nofollow".equals(codeString)) 1067 return NOFOLLOW; 1068 if ("noopener".equals(codeString)) 1069 return NOOPENER; 1070 if ("noreferrer".equals(codeString)) 1071 return NOREFERRER; 1072 if ("opener".equals(codeString)) 1073 return OPENER; 1074 if ("openid2.local_id".equals(codeString)) 1075 return OPENID2_LOCALID; 1076 if ("openid2.provider".equals(codeString)) 1077 return OPENID2_PROVIDER; 1078 if ("original".equals(codeString)) 1079 return ORIGINAL; 1080 if ("P3Pv1".equals(codeString)) 1081 return P3PV1; 1082 if ("payment".equals(codeString)) 1083 return PAYMENT; 1084 if ("pingback".equals(codeString)) 1085 return PINGBACK; 1086 if ("preconnect".equals(codeString)) 1087 return PRECONNECT; 1088 if ("predecessor-version".equals(codeString)) 1089 return PREDECESSORVERSION; 1090 if ("prefetch".equals(codeString)) 1091 return PREFETCH; 1092 if ("preload".equals(codeString)) 1093 return PRELOAD; 1094 if ("prerender".equals(codeString)) 1095 return PRERENDER; 1096 if ("prev".equals(codeString)) 1097 return PREV; 1098 if ("preview".equals(codeString)) 1099 return PREVIEW; 1100 if ("previous".equals(codeString)) 1101 return PREVIOUS; 1102 if ("prev-archive".equals(codeString)) 1103 return PREVARCHIVE; 1104 if ("privacy-policy".equals(codeString)) 1105 return PRIVACYPOLICY; 1106 if ("profile".equals(codeString)) 1107 return PROFILE; 1108 if ("publication".equals(codeString)) 1109 return PUBLICATION; 1110 if ("related".equals(codeString)) 1111 return RELATED; 1112 if ("restconf".equals(codeString)) 1113 return RESTCONF; 1114 if ("replies".equals(codeString)) 1115 return REPLIES; 1116 if ("ruleinput".equals(codeString)) 1117 return RULEINPUT; 1118 if ("search".equals(codeString)) 1119 return SEARCH; 1120 if ("section".equals(codeString)) 1121 return SECTION; 1122 if ("self".equals(codeString)) 1123 return SELF; 1124 if ("service".equals(codeString)) 1125 return SERVICE; 1126 if ("service-desc".equals(codeString)) 1127 return SERVICEDESC; 1128 if ("service-doc".equals(codeString)) 1129 return SERVICEDOC; 1130 if ("service-meta".equals(codeString)) 1131 return SERVICEMETA; 1132 if ("sponsored".equals(codeString)) 1133 return SPONSORED; 1134 if ("start".equals(codeString)) 1135 return START; 1136 if ("status".equals(codeString)) 1137 return STATUS; 1138 if ("stylesheet".equals(codeString)) 1139 return STYLESHEET; 1140 if ("subsection".equals(codeString)) 1141 return SUBSECTION; 1142 if ("successor-version".equals(codeString)) 1143 return SUCCESSORVERSION; 1144 if ("sunset".equals(codeString)) 1145 return SUNSET; 1146 if ("tag".equals(codeString)) 1147 return TAG; 1148 if ("terms-of-service".equals(codeString)) 1149 return TERMSOFSERVICE; 1150 if ("timegate".equals(codeString)) 1151 return TIMEGATE; 1152 if ("timemap".equals(codeString)) 1153 return TIMEMAP; 1154 if ("type".equals(codeString)) 1155 return TYPE; 1156 if ("ugc".equals(codeString)) 1157 return UGC; 1158 if ("up".equals(codeString)) 1159 return UP; 1160 if ("version-history".equals(codeString)) 1161 return VERSIONHISTORY; 1162 if ("via".equals(codeString)) 1163 return VIA; 1164 if ("webmention".equals(codeString)) 1165 return WEBMENTION; 1166 if ("working-copy".equals(codeString)) 1167 return WORKINGCOPY; 1168 if ("working-copy-of".equals(codeString)) 1169 return WORKINGCOPYOF; 1170 if (Configuration.isAcceptInvalidEnums()) 1171 return null; 1172 else 1173 throw new FHIRException("Unknown LinkRelationTypes code '"+codeString+"'"); 1174 } 1175 public String toCode() { 1176 switch (this) { 1177 case ABOUT: return "about"; 1178 case ACL: return "acl"; 1179 case ALTERNATE: return "alternate"; 1180 case AMPHTML: return "amphtml"; 1181 case APPENDIX: return "appendix"; 1182 case APPLETOUCHICON: return "apple-touch-icon"; 1183 case APPLETOUCHSTARTUPIMAGE: return "apple-touch-startup-image"; 1184 case ARCHIVES: return "archives"; 1185 case AUTHOR: return "author"; 1186 case BLOCKEDBY: return "blocked-by"; 1187 case BOOKMARK: return "bookmark"; 1188 case CANONICAL: return "canonical"; 1189 case CHAPTER: return "chapter"; 1190 case CITEAS: return "cite-as"; 1191 case COLLECTION: return "collection"; 1192 case CONTENTS: return "contents"; 1193 case CONVERTEDFROM: return "convertedFrom"; 1194 case COPYRIGHT: return "copyright"; 1195 case CREATEFORM: return "create-form"; 1196 case CURRENT: return "current"; 1197 case DESCRIBEDBY: return "describedby"; 1198 case DESCRIBES: return "describes"; 1199 case DISCLOSURE: return "disclosure"; 1200 case DNSPREFETCH: return "dns-prefetch"; 1201 case DUPLICATE: return "duplicate"; 1202 case EDIT: return "edit"; 1203 case EDITFORM: return "edit-form"; 1204 case EDITMEDIA: return "edit-media"; 1205 case ENCLOSURE: return "enclosure"; 1206 case EXTERNAL: return "external"; 1207 case FIRST: return "first"; 1208 case GLOSSARY: return "glossary"; 1209 case HELP: return "help"; 1210 case HOSTS: return "hosts"; 1211 case HUB: return "hub"; 1212 case ICON: return "icon"; 1213 case INDEX: return "index"; 1214 case INTERVALAFTER: return "intervalAfter"; 1215 case INTERVALBEFORE: return "intervalBefore"; 1216 case INTERVALCONTAINS: return "intervalContains"; 1217 case INTERVALDISJOINT: return "intervalDisjoint"; 1218 case INTERVALDURING: return "intervalDuring"; 1219 case INTERVALEQUALS: return "intervalEquals"; 1220 case INTERVALFINISHEDBY: return "intervalFinishedBy"; 1221 case INTERVALFINISHES: return "intervalFinishes"; 1222 case INTERVALIN: return "intervalIn"; 1223 case INTERVALMEETS: return "intervalMeets"; 1224 case INTERVALMETBY: return "intervalMetBy"; 1225 case INTERVALOVERLAPPEDBY: return "intervalOverlappedBy"; 1226 case INTERVALOVERLAPS: return "intervalOverlaps"; 1227 case INTERVALSTARTEDBY: return "intervalStartedBy"; 1228 case INTERVALSTARTS: return "intervalStarts"; 1229 case ITEM: return "item"; 1230 case LAST: return "last"; 1231 case LATESTVERSION: return "latest-version"; 1232 case LICENSE: return "license"; 1233 case LINKSET: return "linkset"; 1234 case LRDD: return "lrdd"; 1235 case MANIFEST: return "manifest"; 1236 case MASKICON: return "mask-icon"; 1237 case MEDIAFEED: return "media-feed"; 1238 case MEMENTO: return "memento"; 1239 case MICROPUB: return "micropub"; 1240 case MODULEPRELOAD: return "modulepreload"; 1241 case MONITOR: return "monitor"; 1242 case MONITORGROUP: return "monitor-group"; 1243 case NEXT: return "next"; 1244 case NEXTARCHIVE: return "next-archive"; 1245 case NOFOLLOW: return "nofollow"; 1246 case NOOPENER: return "noopener"; 1247 case NOREFERRER: return "noreferrer"; 1248 case OPENER: return "opener"; 1249 case OPENID2_LOCALID: return "openid2.local_id"; 1250 case OPENID2_PROVIDER: return "openid2.provider"; 1251 case ORIGINAL: return "original"; 1252 case P3PV1: return "P3Pv1"; 1253 case PAYMENT: return "payment"; 1254 case PINGBACK: return "pingback"; 1255 case PRECONNECT: return "preconnect"; 1256 case PREDECESSORVERSION: return "predecessor-version"; 1257 case PREFETCH: return "prefetch"; 1258 case PRELOAD: return "preload"; 1259 case PRERENDER: return "prerender"; 1260 case PREV: return "prev"; 1261 case PREVIEW: return "preview"; 1262 case PREVIOUS: return "previous"; 1263 case PREVARCHIVE: return "prev-archive"; 1264 case PRIVACYPOLICY: return "privacy-policy"; 1265 case PROFILE: return "profile"; 1266 case PUBLICATION: return "publication"; 1267 case RELATED: return "related"; 1268 case RESTCONF: return "restconf"; 1269 case REPLIES: return "replies"; 1270 case RULEINPUT: return "ruleinput"; 1271 case SEARCH: return "search"; 1272 case SECTION: return "section"; 1273 case SELF: return "self"; 1274 case SERVICE: return "service"; 1275 case SERVICEDESC: return "service-desc"; 1276 case SERVICEDOC: return "service-doc"; 1277 case SERVICEMETA: return "service-meta"; 1278 case SPONSORED: return "sponsored"; 1279 case START: return "start"; 1280 case STATUS: return "status"; 1281 case STYLESHEET: return "stylesheet"; 1282 case SUBSECTION: return "subsection"; 1283 case SUCCESSORVERSION: return "successor-version"; 1284 case SUNSET: return "sunset"; 1285 case TAG: return "tag"; 1286 case TERMSOFSERVICE: return "terms-of-service"; 1287 case TIMEGATE: return "timegate"; 1288 case TIMEMAP: return "timemap"; 1289 case TYPE: return "type"; 1290 case UGC: return "ugc"; 1291 case UP: return "up"; 1292 case VERSIONHISTORY: return "version-history"; 1293 case VIA: return "via"; 1294 case WEBMENTION: return "webmention"; 1295 case WORKINGCOPY: return "working-copy"; 1296 case WORKINGCOPYOF: return "working-copy-of"; 1297 case NULL: return null; 1298 default: return "?"; 1299 } 1300 } 1301 public String getSystem() { 1302 switch (this) { 1303 case ABOUT: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1304 case ACL: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1305 case ALTERNATE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1306 case AMPHTML: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1307 case APPENDIX: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1308 case APPLETOUCHICON: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1309 case APPLETOUCHSTARTUPIMAGE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1310 case ARCHIVES: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1311 case AUTHOR: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1312 case BLOCKEDBY: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1313 case BOOKMARK: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1314 case CANONICAL: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1315 case CHAPTER: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1316 case CITEAS: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1317 case COLLECTION: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1318 case CONTENTS: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1319 case CONVERTEDFROM: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1320 case COPYRIGHT: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1321 case CREATEFORM: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1322 case CURRENT: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1323 case DESCRIBEDBY: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1324 case DESCRIBES: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1325 case DISCLOSURE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1326 case DNSPREFETCH: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1327 case DUPLICATE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1328 case EDIT: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1329 case EDITFORM: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1330 case EDITMEDIA: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1331 case ENCLOSURE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1332 case EXTERNAL: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1333 case FIRST: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1334 case GLOSSARY: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1335 case HELP: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1336 case HOSTS: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1337 case HUB: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1338 case ICON: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1339 case INDEX: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1340 case INTERVALAFTER: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1341 case INTERVALBEFORE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1342 case INTERVALCONTAINS: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1343 case INTERVALDISJOINT: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1344 case INTERVALDURING: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1345 case INTERVALEQUALS: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1346 case INTERVALFINISHEDBY: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1347 case INTERVALFINISHES: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1348 case INTERVALIN: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1349 case INTERVALMEETS: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1350 case INTERVALMETBY: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1351 case INTERVALOVERLAPPEDBY: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1352 case INTERVALOVERLAPS: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1353 case INTERVALSTARTEDBY: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1354 case INTERVALSTARTS: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1355 case ITEM: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1356 case LAST: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1357 case LATESTVERSION: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1358 case LICENSE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1359 case LINKSET: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1360 case LRDD: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1361 case MANIFEST: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1362 case MASKICON: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1363 case MEDIAFEED: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1364 case MEMENTO: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1365 case MICROPUB: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1366 case MODULEPRELOAD: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1367 case MONITOR: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1368 case MONITORGROUP: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1369 case NEXT: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1370 case NEXTARCHIVE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1371 case NOFOLLOW: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1372 case NOOPENER: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1373 case NOREFERRER: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1374 case OPENER: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1375 case OPENID2_LOCALID: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1376 case OPENID2_PROVIDER: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1377 case ORIGINAL: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1378 case P3PV1: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1379 case PAYMENT: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1380 case PINGBACK: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1381 case PRECONNECT: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1382 case PREDECESSORVERSION: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1383 case PREFETCH: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1384 case PRELOAD: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1385 case PRERENDER: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1386 case PREV: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1387 case PREVIEW: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1388 case PREVIOUS: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1389 case PREVARCHIVE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1390 case PRIVACYPOLICY: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1391 case PROFILE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1392 case PUBLICATION: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1393 case RELATED: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1394 case RESTCONF: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1395 case REPLIES: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1396 case RULEINPUT: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1397 case SEARCH: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1398 case SECTION: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1399 case SELF: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1400 case SERVICE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1401 case SERVICEDESC: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1402 case SERVICEDOC: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1403 case SERVICEMETA: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1404 case SPONSORED: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1405 case START: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1406 case STATUS: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1407 case STYLESHEET: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1408 case SUBSECTION: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1409 case SUCCESSORVERSION: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1410 case SUNSET: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1411 case TAG: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1412 case TERMSOFSERVICE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1413 case TIMEGATE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1414 case TIMEMAP: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1415 case TYPE: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1416 case UGC: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1417 case UP: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1418 case VERSIONHISTORY: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1419 case VIA: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1420 case WEBMENTION: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1421 case WORKINGCOPY: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1422 case WORKINGCOPYOF: return "http://hl7.org/fhir/CodeSystem/iana-link-relations"; 1423 case NULL: return null; 1424 default: return "?"; 1425 } 1426 } 1427 public String getDefinition() { 1428 switch (this) { 1429 case ABOUT: return "Refers to a resource that is the subject of the link's context."; 1430 case ACL: return "Asserts that the link target provides an access control description for the link context."; 1431 case ALTERNATE: return "Refers to a substitute for this context"; 1432 case AMPHTML: return "Used to reference alternative content that uses the AMP profile of the HTML format."; 1433 case APPENDIX: return "Refers to an appendix."; 1434 case APPLETOUCHICON: return "Refers to an icon for the context. Synonym for icon."; 1435 case APPLETOUCHSTARTUPIMAGE: return "Refers to a launch screen for the context."; 1436 case ARCHIVES: return "Refers to a collection of records, documents, or other\n materials of historical interest."; 1437 case AUTHOR: return "Refers to the context's author."; 1438 case BLOCKEDBY: return "Identifies the entity that blocks access to a resource\n following receipt of a legal demand."; 1439 case BOOKMARK: return "Gives a permanent link to use for bookmarking purposes."; 1440 case CANONICAL: return "Designates the preferred version of a resource (the IRI and its contents)."; 1441 case CHAPTER: return "Refers to a chapter in a collection of resources."; 1442 case CITEAS: return "Indicates that the link target is preferred over the link context for the purpose of permanent citation."; 1443 case COLLECTION: return "The target IRI points to a resource which represents the collection resource for the context IRI."; 1444 case CONTENTS: return "Refers to a table of contents."; 1445 case CONVERTEDFROM: return "The document linked to was later converted to the\n document that contains this link relation. For example, an RFC can\n have a link to the Internet-Draft that became the RFC; in that case,\n the link relation would be \"convertedFrom\"."; 1446 case COPYRIGHT: return "Refers to a copyright statement that applies to the\n link's context."; 1447 case CREATEFORM: return "The target IRI points to a resource where a submission form can be obtained."; 1448 case CURRENT: return "Refers to a resource containing the most recent\n item(s) in a collection of resources."; 1449 case DESCRIBEDBY: return "Refers to a resource providing information about the\n link's context."; 1450 case DESCRIBES: return "The relationship A 'describes' B asserts that\n resource A provides a description of resource B. There are no\n constraints on the format or representation of either A or B,\n neither are there any further constraints on either resource."; 1451 case DISCLOSURE: return "Refers to a list of patent disclosures made with respect to \n material for which 'disclosure' relation is specified."; 1452 case DNSPREFETCH: return "Used to indicate an origin that will be used to fetch required \n resources for the link context, and that the user agent ought to resolve \n as early as possible."; 1453 case DUPLICATE: return "Refers to a resource whose available representations\n are byte-for-byte identical with the corresponding representations of\n the context IRI."; 1454 case EDIT: return "Refers to a resource that can be used to edit the\n link's context."; 1455 case EDITFORM: return "The target IRI points to a resource where a submission form for\n editing associated resource can be obtained."; 1456 case EDITMEDIA: return "Refers to a resource that can be used to edit media\n associated with the link's context."; 1457 case ENCLOSURE: return "Identifies a related resource that is potentially\n large and might require special handling."; 1458 case EXTERNAL: return "Refers to a resource that is not part of the same site as the current context."; 1459 case FIRST: return "An IRI that refers to the furthest preceding resource\n in a series of resources."; 1460 case GLOSSARY: return "Refers to a glossary of terms."; 1461 case HELP: return "Refers to context-sensitive help."; 1462 case HOSTS: return "Refers to a resource hosted by the server indicated by\n the link context."; 1463 case HUB: return "Refers to a hub that enables registration for\n notification of updates to the context."; 1464 case ICON: return "Refers to an icon representing the link's context."; 1465 case INDEX: return "Refers to an index."; 1466 case INTERVALAFTER: return "refers to a resource associated with a time interval that ends before the beginning of the time interval associated with the context resource"; 1467 case INTERVALBEFORE: return "refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource"; 1468 case INTERVALCONTAINS: return "refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource"; 1469 case INTERVALDISJOINT: return "refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource, or ends before the beginning of the time interval associated with the context resource"; 1470 case INTERVALDURING: return "refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource"; 1471 case INTERVALEQUALS: return "refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource"; 1472 case INTERVALFINISHEDBY: return "refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource"; 1473 case INTERVALFINISHES: return "refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource"; 1474 case INTERVALIN: return "refers to a resource associated with a time interval that begins before or is coincident with the beginning of the time interval associated with the context resource, and ends after or is coincident with the end of the time interval associated with the context resource"; 1475 case INTERVALMEETS: return "refers to a resource associated with a time interval whose beginning coincides with the end of the time interval associated with the context resource"; 1476 case INTERVALMETBY: return "refers to a resource associated with a time interval whose end coincides with the beginning of the time interval associated with the context resource"; 1477 case INTERVALOVERLAPPEDBY: return "refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the beginning of the time interval associated with the context resource"; 1478 case INTERVALOVERLAPS: return "refers to a resource associated with a time interval that begins before the end of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource"; 1479 case INTERVALSTARTEDBY: return "refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource"; 1480 case INTERVALSTARTS: return "refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource"; 1481 case ITEM: return "The target IRI points to a resource that is a member of the collection represented by the context IRI."; 1482 case LAST: return "An IRI that refers to the furthest following resource\n in a series of resources."; 1483 case LATESTVERSION: return "Points to a resource containing the latest (e.g.,\n current) version of the context."; 1484 case LICENSE: return "Refers to a license associated with this context."; 1485 case LINKSET: return "The link target of a link with the \"linkset\" relation\n type provides a set of links, including links in which the link\n context of the link participates.\n "; 1486 case LRDD: return "Refers to further information about the link's context,\n expressed as a LRDD (\"Link-based Resource Descriptor Document\")\n resource. See for information about\n processing this relation type in host-meta documents. When used\n elsewhere, it refers to additional links and other metadata.\n Multiple instances indicate additional LRDD resources. LRDD\n resources MUST have an \"application/xrd+xml\" representation, and\n MAY have others."; 1487 case MANIFEST: return "Links to a manifest file for the context."; 1488 case MASKICON: return "Refers to a mask that can be applied to the icon for the context."; 1489 case MEDIAFEED: return "Refers to a feed of personalised media recommendations relevant to the link context."; 1490 case MEMENTO: return "The Target IRI points to a Memento, a fixed resource that will not change state anymore."; 1491 case MICROPUB: return "Links to the context's Micropub endpoint."; 1492 case MODULEPRELOAD: return "Refers to a module that the user agent is to preemptively fetch and store for use in the current context."; 1493 case MONITOR: return "Refers to a resource that can be used to monitor changes in an HTTP resource.\n "; 1494 case MONITORGROUP: return "Refers to a resource that can be used to monitor changes in a specified group of HTTP resources.\n "; 1495 case NEXT: return "Indicates that the link's context is a part of a series, and\n that the next in the series is the link target.\n "; 1496 case NEXTARCHIVE: return "Refers to the immediately following archive resource."; 1497 case NOFOLLOW: return "Indicates that the context?s original author or publisher does not endorse the link target."; 1498 case NOOPENER: return "Indicates that any newly created top-level browsing context which results from following the link will not be an auxiliary browsing context."; 1499 case NOREFERRER: return "Indicates that no referrer information is to be leaked when following the link."; 1500 case OPENER: return "Indicates that any newly created top-level browsing context which results from following the link will be an auxiliary browsing context."; 1501 case OPENID2_LOCALID: return "Refers to an OpenID Authentication server on which the context relies for an assertion that the end user controls an Identifier."; 1502 case OPENID2_PROVIDER: return "Refers to a resource which accepts OpenID Authentication protocol messages for the context."; 1503 case ORIGINAL: return "The Target IRI points to an Original Resource."; 1504 case P3PV1: return "Refers to a P3P privacy policy for the context."; 1505 case PAYMENT: return "Indicates a resource where payment is accepted."; 1506 case PINGBACK: return "Gives the address of the pingback resource for the link context."; 1507 case PRECONNECT: return "Used to indicate an origin that will be used to fetch required \n resources for the link context. Initiating an early connection, which \n includes the DNS lookup, TCP handshake, and optional TLS negotiation, \n allows the user agent to mask the high latency costs of establishing a \n connection."; 1508 case PREDECESSORVERSION: return "Points to a resource containing the predecessor\n version in the version history.\n "; 1509 case PREFETCH: return "The prefetch link relation type is used to identify a resource \n that might be required by the next navigation from the link context, and \n that the user agent ought to fetch, such that the user agent can deliver a \n faster response once the resource is requested in the future."; 1510 case PRELOAD: return "Refers to a resource that should be loaded early in the \n processing of the link's context, without blocking rendering."; 1511 case PRERENDER: return "Used to identify a resource that might be required by the next \n navigation from the link context, and that the user agent ought to fetch \n and execute, such that the user agent can deliver a faster response once \n the resource is requested in the future."; 1512 case PREV: return "Indicates that the link's context is a part of a series, and\n that the previous in the series is the link target.\n "; 1513 case PREVIEW: return "Refers to a resource that provides a preview of the link's context."; 1514 case PREVIOUS: return "Refers to the previous resource in an ordered series\n of resources. Synonym for \"prev\"."; 1515 case PREVARCHIVE: return "Refers to the immediately preceding archive resource."; 1516 case PRIVACYPOLICY: return "Refers to a privacy policy associated with the link's context."; 1517 case PROFILE: return "Identifying that a resource representation conforms\nto a certain profile, without affecting the non-profile semantics\nof the resource representation."; 1518 case PUBLICATION: return "Links to a publication manifest. A manifest represents \n structured information about a publication, such as informative metadata, \n a list of resources, and a default reading order."; 1519 case RELATED: return "Identifies a related resource."; 1520 case RESTCONF: return "Identifies the root of RESTCONF API as configured on this HTTP server.\n The \"restconf\" relation defines the root of the API defined in RFC8040.\n Subsequent revisions of RESTCONF will use alternate relation values to support \n protocol versioning."; 1521 case REPLIES: return "Identifies a resource that is a reply to the context\n of the link.\n "; 1522 case RULEINPUT: return "The resource identified by the link target provides an input value to an \n instance of a rule, where the resource which represents the rule instance is \n identified by the link context.\n "; 1523 case SEARCH: return "Refers to a resource that can be used to search through\n the link's context and related resources."; 1524 case SECTION: return "Refers to a section in a collection of resources."; 1525 case SELF: return "Conveys an identifier for the link's context.\n "; 1526 case SERVICE: return "Indicates a URI that can be used to retrieve a\n service document."; 1527 case SERVICEDESC: return "Identifies service description for the context that\n is primarily intended for consumption by machines."; 1528 case SERVICEDOC: return "Identifies service documentation for the context that\n is primarily intended for human consumption."; 1529 case SERVICEMETA: return "Identifies general metadata for the context that is\n primarily intended for consumption by machines."; 1530 case SPONSORED: return "Refers to a resource that is within a context that is \n sponsored (such as advertising or another compensation agreement)."; 1531 case START: return "Refers to the first resource in a collection of\n resources."; 1532 case STATUS: return "Identifies a resource that represents the context's\n status."; 1533 case STYLESHEET: return "Refers to a stylesheet."; 1534 case SUBSECTION: return "Refers to a resource serving as a subsection in a\n collection of resources."; 1535 case SUCCESSORVERSION: return "Points to a resource containing the successor version\n in the version history.\n "; 1536 case SUNSET: return "Identifies a resource that provides information about\n the context's retirement policy.\n "; 1537 case TAG: return "Gives a tag (identified by the given address) that applies to\n the current document.\n "; 1538 case TERMSOFSERVICE: return "Refers to the terms of service associated with the link's context."; 1539 case TIMEGATE: return "The Target IRI points to a TimeGate for an Original Resource."; 1540 case TIMEMAP: return "The Target IRI points to a TimeMap for an Original Resource."; 1541 case TYPE: return "Refers to a resource identifying the abstract semantic type of which the link's context is considered to be an instance."; 1542 case UGC: return "Refers to a resource that is within a context that is User Generated Content.\n "; 1543 case UP: return "Refers to a parent document in a hierarchy of\n documents.\n "; 1544 case VERSIONHISTORY: return "Points to a resource containing the version history\n for the context.\n "; 1545 case VIA: return "Identifies a resource that is the source of the\n information in the link's context.\n "; 1546 case WEBMENTION: return "Identifies a target URI that supports the Webmention protocol.\n This allows clients that mention a resource in some form of publishing process\n to contact that endpoint and inform it that this resource has been mentioned."; 1547 case WORKINGCOPY: return "Points to a working copy for this resource."; 1548 case WORKINGCOPYOF: return "Points to the versioned resource from which this\n working copy was obtained.\n "; 1549 case NULL: return null; 1550 default: return "?"; 1551 } 1552 } 1553 public String getDisplay() { 1554 switch (this) { 1555 case ABOUT: return "Refers to a resource that is the subject of the link's context."; 1556 case ACL: return "Asserts that the link target provides an access control description for the link context."; 1557 case ALTERNATE: return "Refers to a substitute for this context"; 1558 case AMPHTML: return "Used to reference alternative content that uses the AMP profile of the HTML format."; 1559 case APPENDIX: return "Refers to an appendix."; 1560 case APPLETOUCHICON: return "Refers to an icon for the context. Synonym for icon."; 1561 case APPLETOUCHSTARTUPIMAGE: return "Refers to a launch screen for the context."; 1562 case ARCHIVES: return "Refers to a collection of records, documents, or other\n materials of historical interest."; 1563 case AUTHOR: return "Refers to the context's author."; 1564 case BLOCKEDBY: return "Identifies the entity that blocks access to a resource\n following receipt of a legal demand."; 1565 case BOOKMARK: return "Gives a permanent link to use for bookmarking purposes."; 1566 case CANONICAL: return "Designates the preferred version of a resource (the IRI and its contents)."; 1567 case CHAPTER: return "Refers to a chapter in a collection of resources."; 1568 case CITEAS: return "Indicates that the link target is preferred over the link context for the purpose of permanent citation."; 1569 case COLLECTION: return "The target IRI points to a resource which represents the collection resource for the context IRI."; 1570 case CONTENTS: return "Refers to a table of contents."; 1571 case CONVERTEDFROM: return "The document linked to was later converted to the\n document that contains this link relation. For example, an RFC can\n have a link to the Internet-Draft that became the RFC; in that case,\n the link relation would be \"convertedFrom\"."; 1572 case COPYRIGHT: return "Refers to a copyright statement that applies to the\n link's context."; 1573 case CREATEFORM: return "The target IRI points to a resource where a submission form can be obtained."; 1574 case CURRENT: return "Refers to a resource containing the most recent\n item(s) in a collection of resources."; 1575 case DESCRIBEDBY: return "Refers to a resource providing information about the\n link's context."; 1576 case DESCRIBES: return "The relationship A 'describes' B asserts that\n resource A provides a description of resource B. There are no\n constraints on the format or representation of either A or B,\n neither are there any further constraints on either resource."; 1577 case DISCLOSURE: return "Refers to a list of patent disclosures made with respect to \n material for which 'disclosure' relation is specified."; 1578 case DNSPREFETCH: return "Used to indicate an origin that will be used to fetch required \n resources for the link context, and that the user agent ought to resolve \n as early as possible."; 1579 case DUPLICATE: return "Refers to a resource whose available representations\n are byte-for-byte identical with the corresponding representations of\n the context IRI."; 1580 case EDIT: return "Refers to a resource that can be used to edit the\n link's context."; 1581 case EDITFORM: return "The target IRI points to a resource where a submission form for\n editing associated resource can be obtained."; 1582 case EDITMEDIA: return "Refers to a resource that can be used to edit media\n associated with the link's context."; 1583 case ENCLOSURE: return "Identifies a related resource that is potentially\n large and might require special handling."; 1584 case EXTERNAL: return "Refers to a resource that is not part of the same site as the current context."; 1585 case FIRST: return "An IRI that refers to the furthest preceding resource\n in a series of resources."; 1586 case GLOSSARY: return "Refers to a glossary of terms."; 1587 case HELP: return "Refers to context-sensitive help."; 1588 case HOSTS: return "Refers to a resource hosted by the server indicated by\n the link context."; 1589 case HUB: return "Refers to a hub that enables registration for\n notification of updates to the context."; 1590 case ICON: return "Refers to an icon representing the link's context."; 1591 case INDEX: return "Refers to an index."; 1592 case INTERVALAFTER: return "refers to a resource associated with a time interval that ends before the beginning of the time interval associated with the context resource"; 1593 case INTERVALBEFORE: return "refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource"; 1594 case INTERVALCONTAINS: return "refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource"; 1595 case INTERVALDISJOINT: return "refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource, or ends before the beginning of the time interval associated with the context resource"; 1596 case INTERVALDURING: return "refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource"; 1597 case INTERVALEQUALS: return "refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource"; 1598 case INTERVALFINISHEDBY: return "refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource"; 1599 case INTERVALFINISHES: return "refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource"; 1600 case INTERVALIN: return "refers to a resource associated with a time interval that begins before or is coincident with the beginning of the time interval associated with the context resource, and ends after or is coincident with the end of the time interval associated with the context resource"; 1601 case INTERVALMEETS: return "refers to a resource associated with a time interval whose beginning coincides with the end of the time interval associated with the context resource"; 1602 case INTERVALMETBY: return "refers to a resource associated with a time interval whose end coincides with the beginning of the time interval associated with the context resource"; 1603 case INTERVALOVERLAPPEDBY: return "refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the beginning of the time interval associated with the context resource"; 1604 case INTERVALOVERLAPS: return "refers to a resource associated with a time interval that begins before the end of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource"; 1605 case INTERVALSTARTEDBY: return "refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource"; 1606 case INTERVALSTARTS: return "refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource"; 1607 case ITEM: return "The target IRI points to a resource that is a member of the collection represented by the context IRI."; 1608 case LAST: return "An IRI that refers to the furthest following resource\n in a series of resources."; 1609 case LATESTVERSION: return "Points to a resource containing the latest (e.g.,\n current) version of the context."; 1610 case LICENSE: return "Refers to a license associated with this context."; 1611 case LINKSET: return "The link target of a link with the \"linkset\" relation\n type provides a set of links, including links in which the link\n context of the link participates.\n "; 1612 case LRDD: return "Refers to further information about the link's context,\n expressed as a LRDD (\"Link-based Resource Descriptor Document\")\n resource. See for information about\n processing this relation type in host-meta documents. When used\n elsewhere, it refers to additional links and other metadata.\n Multiple instances indicate additional LRDD resources. LRDD\n resources MUST have an \"application/xrd+xml\" representation, and\n MAY have others."; 1613 case MANIFEST: return "Links to a manifest file for the context."; 1614 case MASKICON: return "Refers to a mask that can be applied to the icon for the context."; 1615 case MEDIAFEED: return "Refers to a feed of personalised media recommendations relevant to the link context."; 1616 case MEMENTO: return "The Target IRI points to a Memento, a fixed resource that will not change state anymore."; 1617 case MICROPUB: return "Links to the context's Micropub endpoint."; 1618 case MODULEPRELOAD: return "Refers to a module that the user agent is to preemptively fetch and store for use in the current context."; 1619 case MONITOR: return "Refers to a resource that can be used to monitor changes in an HTTP resource.\n "; 1620 case MONITORGROUP: return "Refers to a resource that can be used to monitor changes in a specified group of HTTP resources.\n "; 1621 case NEXT: return "Indicates that the link's context is a part of a series, and\n that the next in the series is the link target.\n "; 1622 case NEXTARCHIVE: return "Refers to the immediately following archive resource."; 1623 case NOFOLLOW: return "Indicates that the context?s original author or publisher does not endorse the link target."; 1624 case NOOPENER: return "Indicates that any newly created top-level browsing context which results from following the link will not be an auxiliary browsing context."; 1625 case NOREFERRER: return "Indicates that no referrer information is to be leaked when following the link."; 1626 case OPENER: return "Indicates that any newly created top-level browsing context which results from following the link will be an auxiliary browsing context."; 1627 case OPENID2_LOCALID: return "Refers to an OpenID Authentication server on which the context relies for an assertion that the end user controls an Identifier."; 1628 case OPENID2_PROVIDER: return "Refers to a resource which accepts OpenID Authentication protocol messages for the context."; 1629 case ORIGINAL: return "The Target IRI points to an Original Resource."; 1630 case P3PV1: return "Refers to a P3P privacy policy for the context."; 1631 case PAYMENT: return "Indicates a resource where payment is accepted."; 1632 case PINGBACK: return "Gives the address of the pingback resource for the link context."; 1633 case PRECONNECT: return "Used to indicate an origin that will be used to fetch required \n resources for the link context. Initiating an early connection, which \n includes the DNS lookup, TCP handshake, and optional TLS negotiation, \n allows the user agent to mask the high latency costs of establishing a \n connection."; 1634 case PREDECESSORVERSION: return "Points to a resource containing the predecessor\n version in the version history.\n "; 1635 case PREFETCH: return "The prefetch link relation type is used to identify a resource \n that might be required by the next navigation from the link context, and \n that the user agent ought to fetch, such that the user agent can deliver a \n faster response once the resource is requested in the future."; 1636 case PRELOAD: return "Refers to a resource that should be loaded early in the \n processing of the link's context, without blocking rendering."; 1637 case PRERENDER: return "Used to identify a resource that might be required by the next \n navigation from the link context, and that the user agent ought to fetch \n and execute, such that the user agent can deliver a faster response once \n the resource is requested in the future."; 1638 case PREV: return "Indicates that the link's context is a part of a series, and\n that the previous in the series is the link target.\n "; 1639 case PREVIEW: return "Refers to a resource that provides a preview of the link's context."; 1640 case PREVIOUS: return "Refers to the previous resource in an ordered series\n of resources. Synonym for \"prev\"."; 1641 case PREVARCHIVE: return "Refers to the immediately preceding archive resource."; 1642 case PRIVACYPOLICY: return "Refers to a privacy policy associated with the link's context."; 1643 case PROFILE: return "Identifying that a resource representation conforms\nto a certain profile, without affecting the non-profile semantics\nof the resource representation."; 1644 case PUBLICATION: return "Links to a publication manifest. A manifest represents \n structured information about a publication, such as informative metadata, \n a list of resources, and a default reading order."; 1645 case RELATED: return "Identifies a related resource."; 1646 case RESTCONF: return "Identifies the root of RESTCONF API as configured on this HTTP server.\n The \"restconf\" relation defines the root of the API defined in RFC8040.\n Subsequent revisions of RESTCONF will use alternate relation values to support \n protocol versioning."; 1647 case REPLIES: return "Identifies a resource that is a reply to the context\n of the link.\n "; 1648 case RULEINPUT: return "The resource identified by the link target provides an input value to an \n instance of a rule, where the resource which represents the rule instance is \n identified by the link context.\n "; 1649 case SEARCH: return "Refers to a resource that can be used to search through\n the link's context and related resources."; 1650 case SECTION: return "Refers to a section in a collection of resources."; 1651 case SELF: return "Conveys an identifier for the link's context.\n "; 1652 case SERVICE: return "Indicates a URI that can be used to retrieve a\n service document."; 1653 case SERVICEDESC: return "Identifies service description for the context that\n is primarily intended for consumption by machines."; 1654 case SERVICEDOC: return "Identifies service documentation for the context that\n is primarily intended for human consumption."; 1655 case SERVICEMETA: return "Identifies general metadata for the context that is\n primarily intended for consumption by machines."; 1656 case SPONSORED: return "Refers to a resource that is within a context that is \n sponsored (such as advertising or another compensation agreement)."; 1657 case START: return "Refers to the first resource in a collection of\n resources."; 1658 case STATUS: return "Identifies a resource that represents the context's\n status."; 1659 case STYLESHEET: return "Refers to a stylesheet."; 1660 case SUBSECTION: return "Refers to a resource serving as a subsection in a\n collection of resources."; 1661 case SUCCESSORVERSION: return "Points to a resource containing the successor version\n in the version history.\n "; 1662 case SUNSET: return "Identifies a resource that provides information about\n the context's retirement policy.\n "; 1663 case TAG: return "Gives a tag (identified by the given address) that applies to\n the current document.\n "; 1664 case TERMSOFSERVICE: return "Refers to the terms of service associated with the link's context."; 1665 case TIMEGATE: return "The Target IRI points to a TimeGate for an Original Resource."; 1666 case TIMEMAP: return "The Target IRI points to a TimeMap for an Original Resource."; 1667 case TYPE: return "Refers to a resource identifying the abstract semantic type of which the link's context is considered to be an instance."; 1668 case UGC: return "Refers to a resource that is within a context that is User Generated Content.\n "; 1669 case UP: return "Refers to a parent document in a hierarchy of\n documents.\n "; 1670 case VERSIONHISTORY: return "Points to a resource containing the version history\n for the context.\n "; 1671 case VIA: return "Identifies a resource that is the source of the\n information in the link's context.\n "; 1672 case WEBMENTION: return "Identifies a target URI that supports the Webmention protocol.\n This allows clients that mention a resource in some form of publishing process\n to contact that endpoint and inform it that this resource has been mentioned."; 1673 case WORKINGCOPY: return "Points to a working copy for this resource."; 1674 case WORKINGCOPYOF: return "Points to the versioned resource from which this\n working copy was obtained.\n "; 1675 case NULL: return null; 1676 default: return "?"; 1677 } 1678 } 1679 } 1680 1681 public static class LinkRelationTypesEnumFactory implements EnumFactory<LinkRelationTypes> { 1682 public LinkRelationTypes fromCode(String codeString) throws IllegalArgumentException { 1683 if (codeString == null || "".equals(codeString)) 1684 if (codeString == null || "".equals(codeString)) 1685 return null; 1686 if ("about".equals(codeString)) 1687 return LinkRelationTypes.ABOUT; 1688 if ("acl".equals(codeString)) 1689 return LinkRelationTypes.ACL; 1690 if ("alternate".equals(codeString)) 1691 return LinkRelationTypes.ALTERNATE; 1692 if ("amphtml".equals(codeString)) 1693 return LinkRelationTypes.AMPHTML; 1694 if ("appendix".equals(codeString)) 1695 return LinkRelationTypes.APPENDIX; 1696 if ("apple-touch-icon".equals(codeString)) 1697 return LinkRelationTypes.APPLETOUCHICON; 1698 if ("apple-touch-startup-image".equals(codeString)) 1699 return LinkRelationTypes.APPLETOUCHSTARTUPIMAGE; 1700 if ("archives".equals(codeString)) 1701 return LinkRelationTypes.ARCHIVES; 1702 if ("author".equals(codeString)) 1703 return LinkRelationTypes.AUTHOR; 1704 if ("blocked-by".equals(codeString)) 1705 return LinkRelationTypes.BLOCKEDBY; 1706 if ("bookmark".equals(codeString)) 1707 return LinkRelationTypes.BOOKMARK; 1708 if ("canonical".equals(codeString)) 1709 return LinkRelationTypes.CANONICAL; 1710 if ("chapter".equals(codeString)) 1711 return LinkRelationTypes.CHAPTER; 1712 if ("cite-as".equals(codeString)) 1713 return LinkRelationTypes.CITEAS; 1714 if ("collection".equals(codeString)) 1715 return LinkRelationTypes.COLLECTION; 1716 if ("contents".equals(codeString)) 1717 return LinkRelationTypes.CONTENTS; 1718 if ("convertedFrom".equals(codeString)) 1719 return LinkRelationTypes.CONVERTEDFROM; 1720 if ("copyright".equals(codeString)) 1721 return LinkRelationTypes.COPYRIGHT; 1722 if ("create-form".equals(codeString)) 1723 return LinkRelationTypes.CREATEFORM; 1724 if ("current".equals(codeString)) 1725 return LinkRelationTypes.CURRENT; 1726 if ("describedby".equals(codeString)) 1727 return LinkRelationTypes.DESCRIBEDBY; 1728 if ("describes".equals(codeString)) 1729 return LinkRelationTypes.DESCRIBES; 1730 if ("disclosure".equals(codeString)) 1731 return LinkRelationTypes.DISCLOSURE; 1732 if ("dns-prefetch".equals(codeString)) 1733 return LinkRelationTypes.DNSPREFETCH; 1734 if ("duplicate".equals(codeString)) 1735 return LinkRelationTypes.DUPLICATE; 1736 if ("edit".equals(codeString)) 1737 return LinkRelationTypes.EDIT; 1738 if ("edit-form".equals(codeString)) 1739 return LinkRelationTypes.EDITFORM; 1740 if ("edit-media".equals(codeString)) 1741 return LinkRelationTypes.EDITMEDIA; 1742 if ("enclosure".equals(codeString)) 1743 return LinkRelationTypes.ENCLOSURE; 1744 if ("external".equals(codeString)) 1745 return LinkRelationTypes.EXTERNAL; 1746 if ("first".equals(codeString)) 1747 return LinkRelationTypes.FIRST; 1748 if ("glossary".equals(codeString)) 1749 return LinkRelationTypes.GLOSSARY; 1750 if ("help".equals(codeString)) 1751 return LinkRelationTypes.HELP; 1752 if ("hosts".equals(codeString)) 1753 return LinkRelationTypes.HOSTS; 1754 if ("hub".equals(codeString)) 1755 return LinkRelationTypes.HUB; 1756 if ("icon".equals(codeString)) 1757 return LinkRelationTypes.ICON; 1758 if ("index".equals(codeString)) 1759 return LinkRelationTypes.INDEX; 1760 if ("intervalAfter".equals(codeString)) 1761 return LinkRelationTypes.INTERVALAFTER; 1762 if ("intervalBefore".equals(codeString)) 1763 return LinkRelationTypes.INTERVALBEFORE; 1764 if ("intervalContains".equals(codeString)) 1765 return LinkRelationTypes.INTERVALCONTAINS; 1766 if ("intervalDisjoint".equals(codeString)) 1767 return LinkRelationTypes.INTERVALDISJOINT; 1768 if ("intervalDuring".equals(codeString)) 1769 return LinkRelationTypes.INTERVALDURING; 1770 if ("intervalEquals".equals(codeString)) 1771 return LinkRelationTypes.INTERVALEQUALS; 1772 if ("intervalFinishedBy".equals(codeString)) 1773 return LinkRelationTypes.INTERVALFINISHEDBY; 1774 if ("intervalFinishes".equals(codeString)) 1775 return LinkRelationTypes.INTERVALFINISHES; 1776 if ("intervalIn".equals(codeString)) 1777 return LinkRelationTypes.INTERVALIN; 1778 if ("intervalMeets".equals(codeString)) 1779 return LinkRelationTypes.INTERVALMEETS; 1780 if ("intervalMetBy".equals(codeString)) 1781 return LinkRelationTypes.INTERVALMETBY; 1782 if ("intervalOverlappedBy".equals(codeString)) 1783 return LinkRelationTypes.INTERVALOVERLAPPEDBY; 1784 if ("intervalOverlaps".equals(codeString)) 1785 return LinkRelationTypes.INTERVALOVERLAPS; 1786 if ("intervalStartedBy".equals(codeString)) 1787 return LinkRelationTypes.INTERVALSTARTEDBY; 1788 if ("intervalStarts".equals(codeString)) 1789 return LinkRelationTypes.INTERVALSTARTS; 1790 if ("item".equals(codeString)) 1791 return LinkRelationTypes.ITEM; 1792 if ("last".equals(codeString)) 1793 return LinkRelationTypes.LAST; 1794 if ("latest-version".equals(codeString)) 1795 return LinkRelationTypes.LATESTVERSION; 1796 if ("license".equals(codeString)) 1797 return LinkRelationTypes.LICENSE; 1798 if ("linkset".equals(codeString)) 1799 return LinkRelationTypes.LINKSET; 1800 if ("lrdd".equals(codeString)) 1801 return LinkRelationTypes.LRDD; 1802 if ("manifest".equals(codeString)) 1803 return LinkRelationTypes.MANIFEST; 1804 if ("mask-icon".equals(codeString)) 1805 return LinkRelationTypes.MASKICON; 1806 if ("media-feed".equals(codeString)) 1807 return LinkRelationTypes.MEDIAFEED; 1808 if ("memento".equals(codeString)) 1809 return LinkRelationTypes.MEMENTO; 1810 if ("micropub".equals(codeString)) 1811 return LinkRelationTypes.MICROPUB; 1812 if ("modulepreload".equals(codeString)) 1813 return LinkRelationTypes.MODULEPRELOAD; 1814 if ("monitor".equals(codeString)) 1815 return LinkRelationTypes.MONITOR; 1816 if ("monitor-group".equals(codeString)) 1817 return LinkRelationTypes.MONITORGROUP; 1818 if ("next".equals(codeString)) 1819 return LinkRelationTypes.NEXT; 1820 if ("next-archive".equals(codeString)) 1821 return LinkRelationTypes.NEXTARCHIVE; 1822 if ("nofollow".equals(codeString)) 1823 return LinkRelationTypes.NOFOLLOW; 1824 if ("noopener".equals(codeString)) 1825 return LinkRelationTypes.NOOPENER; 1826 if ("noreferrer".equals(codeString)) 1827 return LinkRelationTypes.NOREFERRER; 1828 if ("opener".equals(codeString)) 1829 return LinkRelationTypes.OPENER; 1830 if ("openid2.local_id".equals(codeString)) 1831 return LinkRelationTypes.OPENID2_LOCALID; 1832 if ("openid2.provider".equals(codeString)) 1833 return LinkRelationTypes.OPENID2_PROVIDER; 1834 if ("original".equals(codeString)) 1835 return LinkRelationTypes.ORIGINAL; 1836 if ("P3Pv1".equals(codeString)) 1837 return LinkRelationTypes.P3PV1; 1838 if ("payment".equals(codeString)) 1839 return LinkRelationTypes.PAYMENT; 1840 if ("pingback".equals(codeString)) 1841 return LinkRelationTypes.PINGBACK; 1842 if ("preconnect".equals(codeString)) 1843 return LinkRelationTypes.PRECONNECT; 1844 if ("predecessor-version".equals(codeString)) 1845 return LinkRelationTypes.PREDECESSORVERSION; 1846 if ("prefetch".equals(codeString)) 1847 return LinkRelationTypes.PREFETCH; 1848 if ("preload".equals(codeString)) 1849 return LinkRelationTypes.PRELOAD; 1850 if ("prerender".equals(codeString)) 1851 return LinkRelationTypes.PRERENDER; 1852 if ("prev".equals(codeString)) 1853 return LinkRelationTypes.PREV; 1854 if ("preview".equals(codeString)) 1855 return LinkRelationTypes.PREVIEW; 1856 if ("previous".equals(codeString)) 1857 return LinkRelationTypes.PREVIOUS; 1858 if ("prev-archive".equals(codeString)) 1859 return LinkRelationTypes.PREVARCHIVE; 1860 if ("privacy-policy".equals(codeString)) 1861 return LinkRelationTypes.PRIVACYPOLICY; 1862 if ("profile".equals(codeString)) 1863 return LinkRelationTypes.PROFILE; 1864 if ("publication".equals(codeString)) 1865 return LinkRelationTypes.PUBLICATION; 1866 if ("related".equals(codeString)) 1867 return LinkRelationTypes.RELATED; 1868 if ("restconf".equals(codeString)) 1869 return LinkRelationTypes.RESTCONF; 1870 if ("replies".equals(codeString)) 1871 return LinkRelationTypes.REPLIES; 1872 if ("ruleinput".equals(codeString)) 1873 return LinkRelationTypes.RULEINPUT; 1874 if ("search".equals(codeString)) 1875 return LinkRelationTypes.SEARCH; 1876 if ("section".equals(codeString)) 1877 return LinkRelationTypes.SECTION; 1878 if ("self".equals(codeString)) 1879 return LinkRelationTypes.SELF; 1880 if ("service".equals(codeString)) 1881 return LinkRelationTypes.SERVICE; 1882 if ("service-desc".equals(codeString)) 1883 return LinkRelationTypes.SERVICEDESC; 1884 if ("service-doc".equals(codeString)) 1885 return LinkRelationTypes.SERVICEDOC; 1886 if ("service-meta".equals(codeString)) 1887 return LinkRelationTypes.SERVICEMETA; 1888 if ("sponsored".equals(codeString)) 1889 return LinkRelationTypes.SPONSORED; 1890 if ("start".equals(codeString)) 1891 return LinkRelationTypes.START; 1892 if ("status".equals(codeString)) 1893 return LinkRelationTypes.STATUS; 1894 if ("stylesheet".equals(codeString)) 1895 return LinkRelationTypes.STYLESHEET; 1896 if ("subsection".equals(codeString)) 1897 return LinkRelationTypes.SUBSECTION; 1898 if ("successor-version".equals(codeString)) 1899 return LinkRelationTypes.SUCCESSORVERSION; 1900 if ("sunset".equals(codeString)) 1901 return LinkRelationTypes.SUNSET; 1902 if ("tag".equals(codeString)) 1903 return LinkRelationTypes.TAG; 1904 if ("terms-of-service".equals(codeString)) 1905 return LinkRelationTypes.TERMSOFSERVICE; 1906 if ("timegate".equals(codeString)) 1907 return LinkRelationTypes.TIMEGATE; 1908 if ("timemap".equals(codeString)) 1909 return LinkRelationTypes.TIMEMAP; 1910 if ("type".equals(codeString)) 1911 return LinkRelationTypes.TYPE; 1912 if ("ugc".equals(codeString)) 1913 return LinkRelationTypes.UGC; 1914 if ("up".equals(codeString)) 1915 return LinkRelationTypes.UP; 1916 if ("version-history".equals(codeString)) 1917 return LinkRelationTypes.VERSIONHISTORY; 1918 if ("via".equals(codeString)) 1919 return LinkRelationTypes.VIA; 1920 if ("webmention".equals(codeString)) 1921 return LinkRelationTypes.WEBMENTION; 1922 if ("working-copy".equals(codeString)) 1923 return LinkRelationTypes.WORKINGCOPY; 1924 if ("working-copy-of".equals(codeString)) 1925 return LinkRelationTypes.WORKINGCOPYOF; 1926 throw new IllegalArgumentException("Unknown LinkRelationTypes code '"+codeString+"'"); 1927 } 1928 public Enumeration<LinkRelationTypes> fromType(PrimitiveType<?> code) throws FHIRException { 1929 if (code == null) 1930 return null; 1931 if (code.isEmpty()) 1932 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.NULL, code); 1933 String codeString = ((PrimitiveType) code).asStringValue(); 1934 if (codeString == null || "".equals(codeString)) 1935 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.NULL, code); 1936 if ("about".equals(codeString)) 1937 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.ABOUT, code); 1938 if ("acl".equals(codeString)) 1939 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.ACL, code); 1940 if ("alternate".equals(codeString)) 1941 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.ALTERNATE, code); 1942 if ("amphtml".equals(codeString)) 1943 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.AMPHTML, code); 1944 if ("appendix".equals(codeString)) 1945 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.APPENDIX, code); 1946 if ("apple-touch-icon".equals(codeString)) 1947 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.APPLETOUCHICON, code); 1948 if ("apple-touch-startup-image".equals(codeString)) 1949 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.APPLETOUCHSTARTUPIMAGE, code); 1950 if ("archives".equals(codeString)) 1951 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.ARCHIVES, code); 1952 if ("author".equals(codeString)) 1953 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.AUTHOR, code); 1954 if ("blocked-by".equals(codeString)) 1955 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.BLOCKEDBY, code); 1956 if ("bookmark".equals(codeString)) 1957 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.BOOKMARK, code); 1958 if ("canonical".equals(codeString)) 1959 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.CANONICAL, code); 1960 if ("chapter".equals(codeString)) 1961 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.CHAPTER, code); 1962 if ("cite-as".equals(codeString)) 1963 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.CITEAS, code); 1964 if ("collection".equals(codeString)) 1965 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.COLLECTION, code); 1966 if ("contents".equals(codeString)) 1967 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.CONTENTS, code); 1968 if ("convertedFrom".equals(codeString)) 1969 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.CONVERTEDFROM, code); 1970 if ("copyright".equals(codeString)) 1971 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.COPYRIGHT, code); 1972 if ("create-form".equals(codeString)) 1973 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.CREATEFORM, code); 1974 if ("current".equals(codeString)) 1975 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.CURRENT, code); 1976 if ("describedby".equals(codeString)) 1977 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.DESCRIBEDBY, code); 1978 if ("describes".equals(codeString)) 1979 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.DESCRIBES, code); 1980 if ("disclosure".equals(codeString)) 1981 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.DISCLOSURE, code); 1982 if ("dns-prefetch".equals(codeString)) 1983 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.DNSPREFETCH, code); 1984 if ("duplicate".equals(codeString)) 1985 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.DUPLICATE, code); 1986 if ("edit".equals(codeString)) 1987 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.EDIT, code); 1988 if ("edit-form".equals(codeString)) 1989 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.EDITFORM, code); 1990 if ("edit-media".equals(codeString)) 1991 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.EDITMEDIA, code); 1992 if ("enclosure".equals(codeString)) 1993 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.ENCLOSURE, code); 1994 if ("external".equals(codeString)) 1995 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.EXTERNAL, code); 1996 if ("first".equals(codeString)) 1997 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.FIRST, code); 1998 if ("glossary".equals(codeString)) 1999 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.GLOSSARY, code); 2000 if ("help".equals(codeString)) 2001 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.HELP, code); 2002 if ("hosts".equals(codeString)) 2003 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.HOSTS, code); 2004 if ("hub".equals(codeString)) 2005 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.HUB, code); 2006 if ("icon".equals(codeString)) 2007 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.ICON, code); 2008 if ("index".equals(codeString)) 2009 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INDEX, code); 2010 if ("intervalAfter".equals(codeString)) 2011 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALAFTER, code); 2012 if ("intervalBefore".equals(codeString)) 2013 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALBEFORE, code); 2014 if ("intervalContains".equals(codeString)) 2015 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALCONTAINS, code); 2016 if ("intervalDisjoint".equals(codeString)) 2017 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALDISJOINT, code); 2018 if ("intervalDuring".equals(codeString)) 2019 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALDURING, code); 2020 if ("intervalEquals".equals(codeString)) 2021 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALEQUALS, code); 2022 if ("intervalFinishedBy".equals(codeString)) 2023 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALFINISHEDBY, code); 2024 if ("intervalFinishes".equals(codeString)) 2025 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALFINISHES, code); 2026 if ("intervalIn".equals(codeString)) 2027 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALIN, code); 2028 if ("intervalMeets".equals(codeString)) 2029 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALMEETS, code); 2030 if ("intervalMetBy".equals(codeString)) 2031 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALMETBY, code); 2032 if ("intervalOverlappedBy".equals(codeString)) 2033 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALOVERLAPPEDBY, code); 2034 if ("intervalOverlaps".equals(codeString)) 2035 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALOVERLAPS, code); 2036 if ("intervalStartedBy".equals(codeString)) 2037 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALSTARTEDBY, code); 2038 if ("intervalStarts".equals(codeString)) 2039 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.INTERVALSTARTS, code); 2040 if ("item".equals(codeString)) 2041 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.ITEM, code); 2042 if ("last".equals(codeString)) 2043 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.LAST, code); 2044 if ("latest-version".equals(codeString)) 2045 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.LATESTVERSION, code); 2046 if ("license".equals(codeString)) 2047 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.LICENSE, code); 2048 if ("linkset".equals(codeString)) 2049 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.LINKSET, code); 2050 if ("lrdd".equals(codeString)) 2051 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.LRDD, code); 2052 if ("manifest".equals(codeString)) 2053 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.MANIFEST, code); 2054 if ("mask-icon".equals(codeString)) 2055 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.MASKICON, code); 2056 if ("media-feed".equals(codeString)) 2057 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.MEDIAFEED, code); 2058 if ("memento".equals(codeString)) 2059 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.MEMENTO, code); 2060 if ("micropub".equals(codeString)) 2061 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.MICROPUB, code); 2062 if ("modulepreload".equals(codeString)) 2063 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.MODULEPRELOAD, code); 2064 if ("monitor".equals(codeString)) 2065 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.MONITOR, code); 2066 if ("monitor-group".equals(codeString)) 2067 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.MONITORGROUP, code); 2068 if ("next".equals(codeString)) 2069 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.NEXT, code); 2070 if ("next-archive".equals(codeString)) 2071 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.NEXTARCHIVE, code); 2072 if ("nofollow".equals(codeString)) 2073 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.NOFOLLOW, code); 2074 if ("noopener".equals(codeString)) 2075 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.NOOPENER, code); 2076 if ("noreferrer".equals(codeString)) 2077 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.NOREFERRER, code); 2078 if ("opener".equals(codeString)) 2079 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.OPENER, code); 2080 if ("openid2.local_id".equals(codeString)) 2081 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.OPENID2_LOCALID, code); 2082 if ("openid2.provider".equals(codeString)) 2083 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.OPENID2_PROVIDER, code); 2084 if ("original".equals(codeString)) 2085 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.ORIGINAL, code); 2086 if ("P3Pv1".equals(codeString)) 2087 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.P3PV1, code); 2088 if ("payment".equals(codeString)) 2089 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PAYMENT, code); 2090 if ("pingback".equals(codeString)) 2091 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PINGBACK, code); 2092 if ("preconnect".equals(codeString)) 2093 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PRECONNECT, code); 2094 if ("predecessor-version".equals(codeString)) 2095 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PREDECESSORVERSION, code); 2096 if ("prefetch".equals(codeString)) 2097 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PREFETCH, code); 2098 if ("preload".equals(codeString)) 2099 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PRELOAD, code); 2100 if ("prerender".equals(codeString)) 2101 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PRERENDER, code); 2102 if ("prev".equals(codeString)) 2103 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PREV, code); 2104 if ("preview".equals(codeString)) 2105 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PREVIEW, code); 2106 if ("previous".equals(codeString)) 2107 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PREVIOUS, code); 2108 if ("prev-archive".equals(codeString)) 2109 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PREVARCHIVE, code); 2110 if ("privacy-policy".equals(codeString)) 2111 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PRIVACYPOLICY, code); 2112 if ("profile".equals(codeString)) 2113 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PROFILE, code); 2114 if ("publication".equals(codeString)) 2115 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.PUBLICATION, code); 2116 if ("related".equals(codeString)) 2117 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.RELATED, code); 2118 if ("restconf".equals(codeString)) 2119 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.RESTCONF, code); 2120 if ("replies".equals(codeString)) 2121 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.REPLIES, code); 2122 if ("ruleinput".equals(codeString)) 2123 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.RULEINPUT, code); 2124 if ("search".equals(codeString)) 2125 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.SEARCH, code); 2126 if ("section".equals(codeString)) 2127 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.SECTION, code); 2128 if ("self".equals(codeString)) 2129 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.SELF, code); 2130 if ("service".equals(codeString)) 2131 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.SERVICE, code); 2132 if ("service-desc".equals(codeString)) 2133 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.SERVICEDESC, code); 2134 if ("service-doc".equals(codeString)) 2135 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.SERVICEDOC, code); 2136 if ("service-meta".equals(codeString)) 2137 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.SERVICEMETA, code); 2138 if ("sponsored".equals(codeString)) 2139 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.SPONSORED, code); 2140 if ("start".equals(codeString)) 2141 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.START, code); 2142 if ("status".equals(codeString)) 2143 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.STATUS, code); 2144 if ("stylesheet".equals(codeString)) 2145 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.STYLESHEET, code); 2146 if ("subsection".equals(codeString)) 2147 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.SUBSECTION, code); 2148 if ("successor-version".equals(codeString)) 2149 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.SUCCESSORVERSION, code); 2150 if ("sunset".equals(codeString)) 2151 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.SUNSET, code); 2152 if ("tag".equals(codeString)) 2153 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.TAG, code); 2154 if ("terms-of-service".equals(codeString)) 2155 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.TERMSOFSERVICE, code); 2156 if ("timegate".equals(codeString)) 2157 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.TIMEGATE, code); 2158 if ("timemap".equals(codeString)) 2159 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.TIMEMAP, code); 2160 if ("type".equals(codeString)) 2161 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.TYPE, code); 2162 if ("ugc".equals(codeString)) 2163 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.UGC, code); 2164 if ("up".equals(codeString)) 2165 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.UP, code); 2166 if ("version-history".equals(codeString)) 2167 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.VERSIONHISTORY, code); 2168 if ("via".equals(codeString)) 2169 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.VIA, code); 2170 if ("webmention".equals(codeString)) 2171 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.WEBMENTION, code); 2172 if ("working-copy".equals(codeString)) 2173 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.WORKINGCOPY, code); 2174 if ("working-copy-of".equals(codeString)) 2175 return new Enumeration<LinkRelationTypes>(this, LinkRelationTypes.WORKINGCOPYOF, code); 2176 throw new FHIRException("Unknown LinkRelationTypes code '"+codeString+"'"); 2177 } 2178 public String toCode(LinkRelationTypes code) { 2179 if (code == LinkRelationTypes.ABOUT) 2180 return "about"; 2181 if (code == LinkRelationTypes.ACL) 2182 return "acl"; 2183 if (code == LinkRelationTypes.ALTERNATE) 2184 return "alternate"; 2185 if (code == LinkRelationTypes.AMPHTML) 2186 return "amphtml"; 2187 if (code == LinkRelationTypes.APPENDIX) 2188 return "appendix"; 2189 if (code == LinkRelationTypes.APPLETOUCHICON) 2190 return "apple-touch-icon"; 2191 if (code == LinkRelationTypes.APPLETOUCHSTARTUPIMAGE) 2192 return "apple-touch-startup-image"; 2193 if (code == LinkRelationTypes.ARCHIVES) 2194 return "archives"; 2195 if (code == LinkRelationTypes.AUTHOR) 2196 return "author"; 2197 if (code == LinkRelationTypes.BLOCKEDBY) 2198 return "blocked-by"; 2199 if (code == LinkRelationTypes.BOOKMARK) 2200 return "bookmark"; 2201 if (code == LinkRelationTypes.CANONICAL) 2202 return "canonical"; 2203 if (code == LinkRelationTypes.CHAPTER) 2204 return "chapter"; 2205 if (code == LinkRelationTypes.CITEAS) 2206 return "cite-as"; 2207 if (code == LinkRelationTypes.COLLECTION) 2208 return "collection"; 2209 if (code == LinkRelationTypes.CONTENTS) 2210 return "contents"; 2211 if (code == LinkRelationTypes.CONVERTEDFROM) 2212 return "convertedFrom"; 2213 if (code == LinkRelationTypes.COPYRIGHT) 2214 return "copyright"; 2215 if (code == LinkRelationTypes.CREATEFORM) 2216 return "create-form"; 2217 if (code == LinkRelationTypes.CURRENT) 2218 return "current"; 2219 if (code == LinkRelationTypes.DESCRIBEDBY) 2220 return "describedby"; 2221 if (code == LinkRelationTypes.DESCRIBES) 2222 return "describes"; 2223 if (code == LinkRelationTypes.DISCLOSURE) 2224 return "disclosure"; 2225 if (code == LinkRelationTypes.DNSPREFETCH) 2226 return "dns-prefetch"; 2227 if (code == LinkRelationTypes.DUPLICATE) 2228 return "duplicate"; 2229 if (code == LinkRelationTypes.EDIT) 2230 return "edit"; 2231 if (code == LinkRelationTypes.EDITFORM) 2232 return "edit-form"; 2233 if (code == LinkRelationTypes.EDITMEDIA) 2234 return "edit-media"; 2235 if (code == LinkRelationTypes.ENCLOSURE) 2236 return "enclosure"; 2237 if (code == LinkRelationTypes.EXTERNAL) 2238 return "external"; 2239 if (code == LinkRelationTypes.FIRST) 2240 return "first"; 2241 if (code == LinkRelationTypes.GLOSSARY) 2242 return "glossary"; 2243 if (code == LinkRelationTypes.HELP) 2244 return "help"; 2245 if (code == LinkRelationTypes.HOSTS) 2246 return "hosts"; 2247 if (code == LinkRelationTypes.HUB) 2248 return "hub"; 2249 if (code == LinkRelationTypes.ICON) 2250 return "icon"; 2251 if (code == LinkRelationTypes.INDEX) 2252 return "index"; 2253 if (code == LinkRelationTypes.INTERVALAFTER) 2254 return "intervalAfter"; 2255 if (code == LinkRelationTypes.INTERVALBEFORE) 2256 return "intervalBefore"; 2257 if (code == LinkRelationTypes.INTERVALCONTAINS) 2258 return "intervalContains"; 2259 if (code == LinkRelationTypes.INTERVALDISJOINT) 2260 return "intervalDisjoint"; 2261 if (code == LinkRelationTypes.INTERVALDURING) 2262 return "intervalDuring"; 2263 if (code == LinkRelationTypes.INTERVALEQUALS) 2264 return "intervalEquals"; 2265 if (code == LinkRelationTypes.INTERVALFINISHEDBY) 2266 return "intervalFinishedBy"; 2267 if (code == LinkRelationTypes.INTERVALFINISHES) 2268 return "intervalFinishes"; 2269 if (code == LinkRelationTypes.INTERVALIN) 2270 return "intervalIn"; 2271 if (code == LinkRelationTypes.INTERVALMEETS) 2272 return "intervalMeets"; 2273 if (code == LinkRelationTypes.INTERVALMETBY) 2274 return "intervalMetBy"; 2275 if (code == LinkRelationTypes.INTERVALOVERLAPPEDBY) 2276 return "intervalOverlappedBy"; 2277 if (code == LinkRelationTypes.INTERVALOVERLAPS) 2278 return "intervalOverlaps"; 2279 if (code == LinkRelationTypes.INTERVALSTARTEDBY) 2280 return "intervalStartedBy"; 2281 if (code == LinkRelationTypes.INTERVALSTARTS) 2282 return "intervalStarts"; 2283 if (code == LinkRelationTypes.ITEM) 2284 return "item"; 2285 if (code == LinkRelationTypes.LAST) 2286 return "last"; 2287 if (code == LinkRelationTypes.LATESTVERSION) 2288 return "latest-version"; 2289 if (code == LinkRelationTypes.LICENSE) 2290 return "license"; 2291 if (code == LinkRelationTypes.LINKSET) 2292 return "linkset"; 2293 if (code == LinkRelationTypes.LRDD) 2294 return "lrdd"; 2295 if (code == LinkRelationTypes.MANIFEST) 2296 return "manifest"; 2297 if (code == LinkRelationTypes.MASKICON) 2298 return "mask-icon"; 2299 if (code == LinkRelationTypes.MEDIAFEED) 2300 return "media-feed"; 2301 if (code == LinkRelationTypes.MEMENTO) 2302 return "memento"; 2303 if (code == LinkRelationTypes.MICROPUB) 2304 return "micropub"; 2305 if (code == LinkRelationTypes.MODULEPRELOAD) 2306 return "modulepreload"; 2307 if (code == LinkRelationTypes.MONITOR) 2308 return "monitor"; 2309 if (code == LinkRelationTypes.MONITORGROUP) 2310 return "monitor-group"; 2311 if (code == LinkRelationTypes.NEXT) 2312 return "next"; 2313 if (code == LinkRelationTypes.NEXTARCHIVE) 2314 return "next-archive"; 2315 if (code == LinkRelationTypes.NOFOLLOW) 2316 return "nofollow"; 2317 if (code == LinkRelationTypes.NOOPENER) 2318 return "noopener"; 2319 if (code == LinkRelationTypes.NOREFERRER) 2320 return "noreferrer"; 2321 if (code == LinkRelationTypes.OPENER) 2322 return "opener"; 2323 if (code == LinkRelationTypes.OPENID2_LOCALID) 2324 return "openid2.local_id"; 2325 if (code == LinkRelationTypes.OPENID2_PROVIDER) 2326 return "openid2.provider"; 2327 if (code == LinkRelationTypes.ORIGINAL) 2328 return "original"; 2329 if (code == LinkRelationTypes.P3PV1) 2330 return "P3Pv1"; 2331 if (code == LinkRelationTypes.PAYMENT) 2332 return "payment"; 2333 if (code == LinkRelationTypes.PINGBACK) 2334 return "pingback"; 2335 if (code == LinkRelationTypes.PRECONNECT) 2336 return "preconnect"; 2337 if (code == LinkRelationTypes.PREDECESSORVERSION) 2338 return "predecessor-version"; 2339 if (code == LinkRelationTypes.PREFETCH) 2340 return "prefetch"; 2341 if (code == LinkRelationTypes.PRELOAD) 2342 return "preload"; 2343 if (code == LinkRelationTypes.PRERENDER) 2344 return "prerender"; 2345 if (code == LinkRelationTypes.PREV) 2346 return "prev"; 2347 if (code == LinkRelationTypes.PREVIEW) 2348 return "preview"; 2349 if (code == LinkRelationTypes.PREVIOUS) 2350 return "previous"; 2351 if (code == LinkRelationTypes.PREVARCHIVE) 2352 return "prev-archive"; 2353 if (code == LinkRelationTypes.PRIVACYPOLICY) 2354 return "privacy-policy"; 2355 if (code == LinkRelationTypes.PROFILE) 2356 return "profile"; 2357 if (code == LinkRelationTypes.PUBLICATION) 2358 return "publication"; 2359 if (code == LinkRelationTypes.RELATED) 2360 return "related"; 2361 if (code == LinkRelationTypes.RESTCONF) 2362 return "restconf"; 2363 if (code == LinkRelationTypes.REPLIES) 2364 return "replies"; 2365 if (code == LinkRelationTypes.RULEINPUT) 2366 return "ruleinput"; 2367 if (code == LinkRelationTypes.SEARCH) 2368 return "search"; 2369 if (code == LinkRelationTypes.SECTION) 2370 return "section"; 2371 if (code == LinkRelationTypes.SELF) 2372 return "self"; 2373 if (code == LinkRelationTypes.SERVICE) 2374 return "service"; 2375 if (code == LinkRelationTypes.SERVICEDESC) 2376 return "service-desc"; 2377 if (code == LinkRelationTypes.SERVICEDOC) 2378 return "service-doc"; 2379 if (code == LinkRelationTypes.SERVICEMETA) 2380 return "service-meta"; 2381 if (code == LinkRelationTypes.SPONSORED) 2382 return "sponsored"; 2383 if (code == LinkRelationTypes.START) 2384 return "start"; 2385 if (code == LinkRelationTypes.STATUS) 2386 return "status"; 2387 if (code == LinkRelationTypes.STYLESHEET) 2388 return "stylesheet"; 2389 if (code == LinkRelationTypes.SUBSECTION) 2390 return "subsection"; 2391 if (code == LinkRelationTypes.SUCCESSORVERSION) 2392 return "successor-version"; 2393 if (code == LinkRelationTypes.SUNSET) 2394 return "sunset"; 2395 if (code == LinkRelationTypes.TAG) 2396 return "tag"; 2397 if (code == LinkRelationTypes.TERMSOFSERVICE) 2398 return "terms-of-service"; 2399 if (code == LinkRelationTypes.TIMEGATE) 2400 return "timegate"; 2401 if (code == LinkRelationTypes.TIMEMAP) 2402 return "timemap"; 2403 if (code == LinkRelationTypes.TYPE) 2404 return "type"; 2405 if (code == LinkRelationTypes.UGC) 2406 return "ugc"; 2407 if (code == LinkRelationTypes.UP) 2408 return "up"; 2409 if (code == LinkRelationTypes.VERSIONHISTORY) 2410 return "version-history"; 2411 if (code == LinkRelationTypes.VIA) 2412 return "via"; 2413 if (code == LinkRelationTypes.WEBMENTION) 2414 return "webmention"; 2415 if (code == LinkRelationTypes.WORKINGCOPY) 2416 return "working-copy"; 2417 if (code == LinkRelationTypes.WORKINGCOPYOF) 2418 return "working-copy-of"; 2419 return "?"; 2420 } 2421 public String toSystem(LinkRelationTypes code) { 2422 return code.getSystem(); 2423 } 2424 } 2425 2426 public enum SearchEntryMode { 2427 /** 2428 * This resource matched the search specification. 2429 */ 2430 MATCH, 2431 /** 2432 * This resource is returned because it is referred to from another resource in the search set. 2433 */ 2434 INCLUDE, 2435 /** 2436 * An OperationOutcome that provides additional information about the processing of a search. 2437 */ 2438 OUTCOME, 2439 /** 2440 * added to help the parsers with the generic types 2441 */ 2442 NULL; 2443 public static SearchEntryMode fromCode(String codeString) throws FHIRException { 2444 if (codeString == null || "".equals(codeString)) 2445 return null; 2446 if ("match".equals(codeString)) 2447 return MATCH; 2448 if ("include".equals(codeString)) 2449 return INCLUDE; 2450 if ("outcome".equals(codeString)) 2451 return OUTCOME; 2452 if (Configuration.isAcceptInvalidEnums()) 2453 return null; 2454 else 2455 throw new FHIRException("Unknown SearchEntryMode code '"+codeString+"'"); 2456 } 2457 public String toCode() { 2458 switch (this) { 2459 case MATCH: return "match"; 2460 case INCLUDE: return "include"; 2461 case OUTCOME: return "outcome"; 2462 case NULL: return null; 2463 default: return "?"; 2464 } 2465 } 2466 public String getSystem() { 2467 switch (this) { 2468 case MATCH: return "http://hl7.org/fhir/search-entry-mode"; 2469 case INCLUDE: return "http://hl7.org/fhir/search-entry-mode"; 2470 case OUTCOME: return "http://hl7.org/fhir/search-entry-mode"; 2471 case NULL: return null; 2472 default: return "?"; 2473 } 2474 } 2475 public String getDefinition() { 2476 switch (this) { 2477 case MATCH: return "This resource matched the search specification."; 2478 case INCLUDE: return "This resource is returned because it is referred to from another resource in the search set."; 2479 case OUTCOME: return "An OperationOutcome that provides additional information about the processing of a search."; 2480 case NULL: return null; 2481 default: return "?"; 2482 } 2483 } 2484 public String getDisplay() { 2485 switch (this) { 2486 case MATCH: return "Match"; 2487 case INCLUDE: return "Include"; 2488 case OUTCOME: return "Outcome"; 2489 case NULL: return null; 2490 default: return "?"; 2491 } 2492 } 2493 } 2494 2495 public static class SearchEntryModeEnumFactory implements EnumFactory<SearchEntryMode> { 2496 public SearchEntryMode fromCode(String codeString) throws IllegalArgumentException { 2497 if (codeString == null || "".equals(codeString)) 2498 if (codeString == null || "".equals(codeString)) 2499 return null; 2500 if ("match".equals(codeString)) 2501 return SearchEntryMode.MATCH; 2502 if ("include".equals(codeString)) 2503 return SearchEntryMode.INCLUDE; 2504 if ("outcome".equals(codeString)) 2505 return SearchEntryMode.OUTCOME; 2506 throw new IllegalArgumentException("Unknown SearchEntryMode code '"+codeString+"'"); 2507 } 2508 public Enumeration<SearchEntryMode> fromType(PrimitiveType<?> code) throws FHIRException { 2509 if (code == null) 2510 return null; 2511 if (code.isEmpty()) 2512 return new Enumeration<SearchEntryMode>(this, SearchEntryMode.NULL, code); 2513 String codeString = ((PrimitiveType) code).asStringValue(); 2514 if (codeString == null || "".equals(codeString)) 2515 return new Enumeration<SearchEntryMode>(this, SearchEntryMode.NULL, code); 2516 if ("match".equals(codeString)) 2517 return new Enumeration<SearchEntryMode>(this, SearchEntryMode.MATCH, code); 2518 if ("include".equals(codeString)) 2519 return new Enumeration<SearchEntryMode>(this, SearchEntryMode.INCLUDE, code); 2520 if ("outcome".equals(codeString)) 2521 return new Enumeration<SearchEntryMode>(this, SearchEntryMode.OUTCOME, code); 2522 throw new FHIRException("Unknown SearchEntryMode code '"+codeString+"'"); 2523 } 2524 public String toCode(SearchEntryMode code) { 2525 if (code == SearchEntryMode.MATCH) 2526 return "match"; 2527 if (code == SearchEntryMode.INCLUDE) 2528 return "include"; 2529 if (code == SearchEntryMode.OUTCOME) 2530 return "outcome"; 2531 return "?"; 2532 } 2533 public String toSystem(SearchEntryMode code) { 2534 return code.getSystem(); 2535 } 2536 } 2537 2538 @Block() 2539 public static class BundleLinkComponent extends BackboneElement implements IBaseBackboneElement { 2540 /** 2541 * A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1). 2542 */ 2543 @Child(name = "relation", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 2544 @Description(shortDefinition="See http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1", formalDefinition="A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1)." ) 2545 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/iana-link-relations") 2546 protected Enumeration<LinkRelationTypes> relation; 2547 2548 /** 2549 * The reference details for the link. 2550 */ 2551 @Child(name = "url", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=true) 2552 @Description(shortDefinition="Reference details for the link", formalDefinition="The reference details for the link." ) 2553 protected UriType url; 2554 2555 private static final long serialVersionUID = -878418349L; 2556 2557 /** 2558 * Constructor 2559 */ 2560 public BundleLinkComponent() { 2561 super(); 2562 } 2563 2564 /** 2565 * Constructor 2566 */ 2567 public BundleLinkComponent(LinkRelationTypes relation, String url) { 2568 super(); 2569 this.setRelation(relation); 2570 this.setUrl(url); 2571 } 2572 2573 /** 2574 * @return {@link #relation} (A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).). This is the underlying object with id, value and extensions. The accessor "getRelation" gives direct access to the value 2575 */ 2576 public Enumeration<LinkRelationTypes> getRelationElement() { 2577 if (this.relation == null) 2578 if (Configuration.errorOnAutoCreate()) 2579 throw new Error("Attempt to auto-create BundleLinkComponent.relation"); 2580 else if (Configuration.doAutoCreate()) 2581 this.relation = new Enumeration<LinkRelationTypes>(new LinkRelationTypesEnumFactory()); // bb 2582 return this.relation; 2583 } 2584 2585 public boolean hasRelationElement() { 2586 return this.relation != null && !this.relation.isEmpty(); 2587 } 2588 2589 public boolean hasRelation() { 2590 return this.relation != null && !this.relation.isEmpty(); 2591 } 2592 2593 /** 2594 * @param value {@link #relation} (A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).). This is the underlying object with id, value and extensions. The accessor "getRelation" gives direct access to the value 2595 */ 2596 public BundleLinkComponent setRelationElement(Enumeration<LinkRelationTypes> value) { 2597 this.relation = value; 2598 return this; 2599 } 2600 2601 /** 2602 * @return A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1). 2603 */ 2604 public LinkRelationTypes getRelation() { 2605 return this.relation == null ? null : this.relation.getValue(); 2606 } 2607 2608 /** 2609 * @param value A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1). 2610 */ 2611 public BundleLinkComponent setRelation(LinkRelationTypes value) { 2612 if (this.relation == null) 2613 this.relation = new Enumeration<LinkRelationTypes>(new LinkRelationTypesEnumFactory()); 2614 this.relation.setValue(value); 2615 return this; 2616 } 2617 2618 /** 2619 * @return {@link #url} (The reference details for the link.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2620 */ 2621 public UriType getUrlElement() { 2622 if (this.url == null) 2623 if (Configuration.errorOnAutoCreate()) 2624 throw new Error("Attempt to auto-create BundleLinkComponent.url"); 2625 else if (Configuration.doAutoCreate()) 2626 this.url = new UriType(); // bb 2627 return this.url; 2628 } 2629 2630 public boolean hasUrlElement() { 2631 return this.url != null && !this.url.isEmpty(); 2632 } 2633 2634 public boolean hasUrl() { 2635 return this.url != null && !this.url.isEmpty(); 2636 } 2637 2638 /** 2639 * @param value {@link #url} (The reference details for the link.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2640 */ 2641 public BundleLinkComponent setUrlElement(UriType value) { 2642 this.url = value; 2643 return this; 2644 } 2645 2646 /** 2647 * @return The reference details for the link. 2648 */ 2649 public String getUrl() { 2650 return this.url == null ? null : this.url.getValue(); 2651 } 2652 2653 /** 2654 * @param value The reference details for the link. 2655 */ 2656 public BundleLinkComponent setUrl(String value) { 2657 if (this.url == null) 2658 this.url = new UriType(); 2659 this.url.setValue(value); 2660 return this; 2661 } 2662 2663 protected void listChildren(List<Property> children) { 2664 super.listChildren(children); 2665 children.add(new Property("relation", "code", "A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).", 0, 1, relation)); 2666 children.add(new Property("url", "uri", "The reference details for the link.", 0, 1, url)); 2667 } 2668 2669 @Override 2670 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2671 switch (_hash) { 2672 case -554436100: /*relation*/ return new Property("relation", "code", "A name which details the functional use for this link - see [http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1](http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1).", 0, 1, relation); 2673 case 116079: /*url*/ return new Property("url", "uri", "The reference details for the link.", 0, 1, url); 2674 default: return super.getNamedProperty(_hash, _name, _checkValid); 2675 } 2676 2677 } 2678 2679 @Override 2680 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2681 switch (hash) { 2682 case -554436100: /*relation*/ return this.relation == null ? new Base[0] : new Base[] {this.relation}; // Enumeration<LinkRelationTypes> 2683 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 2684 default: return super.getProperty(hash, name, checkValid); 2685 } 2686 2687 } 2688 2689 @Override 2690 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2691 switch (hash) { 2692 case -554436100: // relation 2693 value = new LinkRelationTypesEnumFactory().fromType(TypeConvertor.castToCode(value)); 2694 this.relation = (Enumeration) value; // Enumeration<LinkRelationTypes> 2695 return value; 2696 case 116079: // url 2697 this.url = TypeConvertor.castToUri(value); // UriType 2698 return value; 2699 default: return super.setProperty(hash, name, value); 2700 } 2701 2702 } 2703 2704 @Override 2705 public Base setProperty(String name, Base value) throws FHIRException { 2706 if (name.equals("relation")) { 2707 value = new LinkRelationTypesEnumFactory().fromType(TypeConvertor.castToCode(value)); 2708 this.relation = (Enumeration) value; // Enumeration<LinkRelationTypes> 2709 } else if (name.equals("url")) { 2710 this.url = TypeConvertor.castToUri(value); // UriType 2711 } else 2712 return super.setProperty(name, value); 2713 return value; 2714 } 2715 2716 @Override 2717 public void removeChild(String name, Base value) throws FHIRException { 2718 if (name.equals("relation")) { 2719 value = new LinkRelationTypesEnumFactory().fromType(TypeConvertor.castToCode(value)); 2720 this.relation = (Enumeration) value; // Enumeration<LinkRelationTypes> 2721 } else if (name.equals("url")) { 2722 this.url = null; 2723 } else 2724 super.removeChild(name, value); 2725 2726 } 2727 2728 @Override 2729 public Base makeProperty(int hash, String name) throws FHIRException { 2730 switch (hash) { 2731 case -554436100: return getRelationElement(); 2732 case 116079: return getUrlElement(); 2733 default: return super.makeProperty(hash, name); 2734 } 2735 2736 } 2737 2738 @Override 2739 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2740 switch (hash) { 2741 case -554436100: /*relation*/ return new String[] {"code"}; 2742 case 116079: /*url*/ return new String[] {"uri"}; 2743 default: return super.getTypesForProperty(hash, name); 2744 } 2745 2746 } 2747 2748 @Override 2749 public Base addChild(String name) throws FHIRException { 2750 if (name.equals("relation")) { 2751 throw new FHIRException("Cannot call addChild on a singleton property Bundle.link.relation"); 2752 } 2753 else if (name.equals("url")) { 2754 throw new FHIRException("Cannot call addChild on a singleton property Bundle.link.url"); 2755 } 2756 else 2757 return super.addChild(name); 2758 } 2759 2760 public BundleLinkComponent copy() { 2761 BundleLinkComponent dst = new BundleLinkComponent(); 2762 copyValues(dst); 2763 return dst; 2764 } 2765 2766 public void copyValues(BundleLinkComponent dst) { 2767 super.copyValues(dst); 2768 dst.relation = relation == null ? null : relation.copy(); 2769 dst.url = url == null ? null : url.copy(); 2770 } 2771 2772 @Override 2773 public boolean equalsDeep(Base other_) { 2774 if (!super.equalsDeep(other_)) 2775 return false; 2776 if (!(other_ instanceof BundleLinkComponent)) 2777 return false; 2778 BundleLinkComponent o = (BundleLinkComponent) other_; 2779 return compareDeep(relation, o.relation, true) && compareDeep(url, o.url, true); 2780 } 2781 2782 @Override 2783 public boolean equalsShallow(Base other_) { 2784 if (!super.equalsShallow(other_)) 2785 return false; 2786 if (!(other_ instanceof BundleLinkComponent)) 2787 return false; 2788 BundleLinkComponent o = (BundleLinkComponent) other_; 2789 return compareValues(relation, o.relation, true) && compareValues(url, o.url, true); 2790 } 2791 2792 public boolean isEmpty() { 2793 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(relation, url); 2794 } 2795 2796 public String fhirType() { 2797 return "Bundle.link"; 2798 2799 } 2800 2801 } 2802 2803 @Block() 2804 public static class BundleEntryComponent extends BackboneElement implements IBaseBackboneElement { 2805 /** 2806 * A series of links that provide context to this entry. 2807 */ 2808 @Child(name = "link", type = {BundleLinkComponent.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2809 @Description(shortDefinition="Links related to this entry", formalDefinition="A series of links that provide context to this entry." ) 2810 protected List<BundleLinkComponent> link; 2811 2812 /** 2813 * The Absolute URL for the resource. Except for transactions and batches, each entry in a Bundle must have a fullUrl. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. Even when not required, fullUrl MAY be set to a urn:uuid to allow referencing entries in a transaction. The fullUrl can be an arbitrary URI and is not limited to urn:uuid, urn:oid, http, and https. The fullUrl element SHALL have a value except when: 2814* invoking a create 2815* invoking or responding to an operation where the body is not a single identified resource 2816* invoking or returning the results of a search or history operation. 2817 */ 2818 @Child(name = "fullUrl", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) 2819 @Description(shortDefinition="URI for resource (e.g. the absolute URL server address, URI for UUID/OID, etc.)", formalDefinition="The Absolute URL for the resource. Except for transactions and batches, each entry in a Bundle must have a fullUrl. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. Even when not required, fullUrl MAY be set to a urn:uuid to allow referencing entries in a transaction. The fullUrl can be an arbitrary URI and is not limited to urn:uuid, urn:oid, http, and https. The fullUrl element SHALL have a value except when: \n* invoking a create\n* invoking or responding to an operation where the body is not a single identified resource\n* invoking or returning the results of a search or history operation." ) 2820 protected UriType fullUrl; 2821 2822 /** 2823 * The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type. This is allowed to be a Parameters resource if and only if it is referenced by something else within the Bundle that provides context/meaning. 2824 */ 2825 @Child(name = "resource", type = {Resource.class}, order=3, min=0, max=1, modifier=false, summary=true) 2826 @Description(shortDefinition="A resource in the bundle", formalDefinition="The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type. This is allowed to be a Parameters resource if and only if it is referenced by something else within the Bundle that provides context/meaning." ) 2827 protected Resource resource; 2828 2829 /** 2830 * Information about the search process that lead to the creation of this entry. 2831 */ 2832 @Child(name = "search", type = {}, order=4, min=0, max=1, modifier=false, summary=true) 2833 @Description(shortDefinition="Search related information", formalDefinition="Information about the search process that lead to the creation of this entry." ) 2834 protected BundleEntrySearchComponent search; 2835 2836 /** 2837 * Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry. 2838 */ 2839 @Child(name = "request", type = {}, order=5, min=0, max=1, modifier=false, summary=true) 2840 @Description(shortDefinition="Additional execution information (transaction/batch/history)", formalDefinition="Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry." ) 2841 protected BundleEntryRequestComponent request; 2842 2843 /** 2844 * Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history. 2845 */ 2846 @Child(name = "response", type = {}, order=6, min=0, max=1, modifier=false, summary=true) 2847 @Description(shortDefinition="Results of execution (transaction/batch/history)", formalDefinition="Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history." ) 2848 protected BundleEntryResponseComponent response; 2849 2850 private static final long serialVersionUID = 517783054L; 2851 2852 /** 2853 * Constructor 2854 */ 2855 public BundleEntryComponent() { 2856 super(); 2857 } 2858 2859 /** 2860 * @return {@link #link} (A series of links that provide context to this entry.) 2861 */ 2862 public List<BundleLinkComponent> getLink() { 2863 if (this.link == null) 2864 this.link = new ArrayList<BundleLinkComponent>(); 2865 return this.link; 2866 } 2867 2868 /** 2869 * @return Returns a reference to <code>this</code> for easy method chaining 2870 */ 2871 public BundleEntryComponent setLink(List<BundleLinkComponent> theLink) { 2872 this.link = theLink; 2873 return this; 2874 } 2875 2876 public boolean hasLink() { 2877 if (this.link == null) 2878 return false; 2879 for (BundleLinkComponent item : this.link) 2880 if (!item.isEmpty()) 2881 return true; 2882 return false; 2883 } 2884 2885 public BundleLinkComponent addLink() { //3 2886 BundleLinkComponent t = new BundleLinkComponent(); 2887 if (this.link == null) 2888 this.link = new ArrayList<BundleLinkComponent>(); 2889 this.link.add(t); 2890 return t; 2891 } 2892 2893 public BundleEntryComponent addLink(BundleLinkComponent t) { //3 2894 if (t == null) 2895 return this; 2896 if (this.link == null) 2897 this.link = new ArrayList<BundleLinkComponent>(); 2898 this.link.add(t); 2899 return this; 2900 } 2901 2902 /** 2903 * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist {3} 2904 */ 2905 public BundleLinkComponent getLinkFirstRep() { 2906 if (getLink().isEmpty()) { 2907 addLink(); 2908 } 2909 return getLink().get(0); 2910 } 2911 2912 /** 2913 * @return {@link #fullUrl} (The Absolute URL for the resource. Except for transactions and batches, each entry in a Bundle must have a fullUrl. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. Even when not required, fullUrl MAY be set to a urn:uuid to allow referencing entries in a transaction. The fullUrl can be an arbitrary URI and is not limited to urn:uuid, urn:oid, http, and https. The fullUrl element SHALL have a value except when: 2914* invoking a create 2915* invoking or responding to an operation where the body is not a single identified resource 2916* invoking or returning the results of a search or history operation.). This is the underlying object with id, value and extensions. The accessor "getFullUrl" gives direct access to the value 2917 */ 2918 public UriType getFullUrlElement() { 2919 if (this.fullUrl == null) 2920 if (Configuration.errorOnAutoCreate()) 2921 throw new Error("Attempt to auto-create BundleEntryComponent.fullUrl"); 2922 else if (Configuration.doAutoCreate()) 2923 this.fullUrl = new UriType(); // bb 2924 return this.fullUrl; 2925 } 2926 2927 public boolean hasFullUrlElement() { 2928 return this.fullUrl != null && !this.fullUrl.isEmpty(); 2929 } 2930 2931 public boolean hasFullUrl() { 2932 return this.fullUrl != null && !this.fullUrl.isEmpty(); 2933 } 2934 2935 /** 2936 * @param value {@link #fullUrl} (The Absolute URL for the resource. Except for transactions and batches, each entry in a Bundle must have a fullUrl. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. Even when not required, fullUrl MAY be set to a urn:uuid to allow referencing entries in a transaction. The fullUrl can be an arbitrary URI and is not limited to urn:uuid, urn:oid, http, and https. The fullUrl element SHALL have a value except when: 2937* invoking a create 2938* invoking or responding to an operation where the body is not a single identified resource 2939* invoking or returning the results of a search or history operation.). This is the underlying object with id, value and extensions. The accessor "getFullUrl" gives direct access to the value 2940 */ 2941 public BundleEntryComponent setFullUrlElement(UriType value) { 2942 this.fullUrl = value; 2943 return this; 2944 } 2945 2946 /** 2947 * @return The Absolute URL for the resource. Except for transactions and batches, each entry in a Bundle must have a fullUrl. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. Even when not required, fullUrl MAY be set to a urn:uuid to allow referencing entries in a transaction. The fullUrl can be an arbitrary URI and is not limited to urn:uuid, urn:oid, http, and https. The fullUrl element SHALL have a value except when: 2948* invoking a create 2949* invoking or responding to an operation where the body is not a single identified resource 2950* invoking or returning the results of a search or history operation. 2951 */ 2952 public String getFullUrl() { 2953 return this.fullUrl == null ? null : this.fullUrl.getValue(); 2954 } 2955 2956 /** 2957 * @param value The Absolute URL for the resource. Except for transactions and batches, each entry in a Bundle must have a fullUrl. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. Even when not required, fullUrl MAY be set to a urn:uuid to allow referencing entries in a transaction. The fullUrl can be an arbitrary URI and is not limited to urn:uuid, urn:oid, http, and https. The fullUrl element SHALL have a value except when: 2958* invoking a create 2959* invoking or responding to an operation where the body is not a single identified resource 2960* invoking or returning the results of a search or history operation. 2961 */ 2962 public BundleEntryComponent setFullUrl(String value) { 2963 if (Utilities.noString(value)) 2964 this.fullUrl = null; 2965 else { 2966 if (this.fullUrl == null) 2967 this.fullUrl = new UriType(); 2968 this.fullUrl.setValue(value); 2969 } 2970 return this; 2971 } 2972 2973 /** 2974 * @return {@link #resource} (The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type. This is allowed to be a Parameters resource if and only if it is referenced by something else within the Bundle that provides context/meaning.) 2975 */ 2976 public Resource getResource() { 2977 return this.resource; 2978 } 2979 2980 public boolean hasResource() { 2981 return this.resource != null && !this.resource.isEmpty(); 2982 } 2983 2984 /** 2985 * @param value {@link #resource} (The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type. This is allowed to be a Parameters resource if and only if it is referenced by something else within the Bundle that provides context/meaning.) 2986 */ 2987 public BundleEntryComponent setResource(Resource value) { 2988 this.resource = value; 2989 return this; 2990 } 2991 2992 /** 2993 * @return {@link #search} (Information about the search process that lead to the creation of this entry.) 2994 */ 2995 public BundleEntrySearchComponent getSearch() { 2996 if (this.search == null) 2997 if (Configuration.errorOnAutoCreate()) 2998 throw new Error("Attempt to auto-create BundleEntryComponent.search"); 2999 else if (Configuration.doAutoCreate()) 3000 this.search = new BundleEntrySearchComponent(); // cc 3001 return this.search; 3002 } 3003 3004 public boolean hasSearch() { 3005 return this.search != null && !this.search.isEmpty(); 3006 } 3007 3008 /** 3009 * @param value {@link #search} (Information about the search process that lead to the creation of this entry.) 3010 */ 3011 public BundleEntryComponent setSearch(BundleEntrySearchComponent value) { 3012 this.search = value; 3013 return this; 3014 } 3015 3016 /** 3017 * @return {@link #request} (Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.) 3018 */ 3019 public BundleEntryRequestComponent getRequest() { 3020 if (this.request == null) 3021 if (Configuration.errorOnAutoCreate()) 3022 throw new Error("Attempt to auto-create BundleEntryComponent.request"); 3023 else if (Configuration.doAutoCreate()) 3024 this.request = new BundleEntryRequestComponent(); // cc 3025 return this.request; 3026 } 3027 3028 public boolean hasRequest() { 3029 return this.request != null && !this.request.isEmpty(); 3030 } 3031 3032 /** 3033 * @param value {@link #request} (Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.) 3034 */ 3035 public BundleEntryComponent setRequest(BundleEntryRequestComponent value) { 3036 this.request = value; 3037 return this; 3038 } 3039 3040 /** 3041 * @return {@link #response} (Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history.) 3042 */ 3043 public BundleEntryResponseComponent getResponse() { 3044 if (this.response == null) 3045 if (Configuration.errorOnAutoCreate()) 3046 throw new Error("Attempt to auto-create BundleEntryComponent.response"); 3047 else if (Configuration.doAutoCreate()) 3048 this.response = new BundleEntryResponseComponent(); // cc 3049 return this.response; 3050 } 3051 3052 public boolean hasResponse() { 3053 return this.response != null && !this.response.isEmpty(); 3054 } 3055 3056 /** 3057 * @param value {@link #response} (Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history.) 3058 */ 3059 public BundleEntryComponent setResponse(BundleEntryResponseComponent value) { 3060 this.response = value; 3061 return this; 3062 } 3063 3064 protected void listChildren(List<Property> children) { 3065 super.listChildren(children); 3066 children.add(new Property("link", "@Bundle.link", "A series of links that provide context to this entry.", 0, java.lang.Integer.MAX_VALUE, link)); 3067 children.add(new Property("fullUrl", "uri", "The Absolute URL for the resource. Except for transactions and batches, each entry in a Bundle must have a fullUrl. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. Even when not required, fullUrl MAY be set to a urn:uuid to allow referencing entries in a transaction. The fullUrl can be an arbitrary URI and is not limited to urn:uuid, urn:oid, http, and https. The fullUrl element SHALL have a value except when: \n* invoking a create\n* invoking or responding to an operation where the body is not a single identified resource\n* invoking or returning the results of a search or history operation.", 0, 1, fullUrl)); 3068 children.add(new Property("resource", "Resource", "The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type. This is allowed to be a Parameters resource if and only if it is referenced by something else within the Bundle that provides context/meaning.", 0, 1, resource)); 3069 children.add(new Property("search", "", "Information about the search process that lead to the creation of this entry.", 0, 1, search)); 3070 children.add(new Property("request", "", "Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.", 0, 1, request)); 3071 children.add(new Property("response", "", "Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history.", 0, 1, response)); 3072 } 3073 3074 @Override 3075 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3076 switch (_hash) { 3077 case 3321850: /*link*/ return new Property("link", "@Bundle.link", "A series of links that provide context to this entry.", 0, java.lang.Integer.MAX_VALUE, link); 3078 case -511251360: /*fullUrl*/ return new Property("fullUrl", "uri", "The Absolute URL for the resource. Except for transactions and batches, each entry in a Bundle must have a fullUrl. The fullUrl SHALL NOT disagree with the id in the resource - i.e. if the fullUrl is not a urn:uuid, the URL shall be version-independent URL consistent with the Resource.id. The fullUrl is a version independent reference to the resource. Even when not required, fullUrl MAY be set to a urn:uuid to allow referencing entries in a transaction. The fullUrl can be an arbitrary URI and is not limited to urn:uuid, urn:oid, http, and https. The fullUrl element SHALL have a value except when: \n* invoking a create\n* invoking or responding to an operation where the body is not a single identified resource\n* invoking or returning the results of a search or history operation.", 0, 1, fullUrl); 3079 case -341064690: /*resource*/ return new Property("resource", "Resource", "The Resource for the entry. The purpose/meaning of the resource is determined by the Bundle.type. This is allowed to be a Parameters resource if and only if it is referenced by something else within the Bundle that provides context/meaning.", 0, 1, resource); 3080 case -906336856: /*search*/ return new Property("search", "", "Information about the search process that lead to the creation of this entry.", 0, 1, search); 3081 case 1095692943: /*request*/ return new Property("request", "", "Additional information about how this entry should be processed as part of a transaction or batch. For history, it shows how the entry was processed to create the version contained in the entry.", 0, 1, request); 3082 case -340323263: /*response*/ return new Property("response", "", "Indicates the results of processing the corresponding 'request' entry in the batch or transaction being responded to or what the results of an operation where when returning history.", 0, 1, response); 3083 default: return super.getNamedProperty(_hash, _name, _checkValid); 3084 } 3085 3086 } 3087 3088 @Override 3089 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3090 switch (hash) { 3091 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // BundleLinkComponent 3092 case -511251360: /*fullUrl*/ return this.fullUrl == null ? new Base[0] : new Base[] {this.fullUrl}; // UriType 3093 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Resource 3094 case -906336856: /*search*/ return this.search == null ? new Base[0] : new Base[] {this.search}; // BundleEntrySearchComponent 3095 case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // BundleEntryRequestComponent 3096 case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // BundleEntryResponseComponent 3097 default: return super.getProperty(hash, name, checkValid); 3098 } 3099 3100 } 3101 3102 @Override 3103 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3104 switch (hash) { 3105 case 3321850: // link 3106 this.getLink().add((BundleLinkComponent) value); // BundleLinkComponent 3107 return value; 3108 case -511251360: // fullUrl 3109 this.fullUrl = TypeConvertor.castToUri(value); // UriType 3110 return value; 3111 case -341064690: // resource 3112 this.resource = TypeConvertor.castToResource(value); // Resource 3113 return value; 3114 case -906336856: // search 3115 this.search = (BundleEntrySearchComponent) value; // BundleEntrySearchComponent 3116 return value; 3117 case 1095692943: // request 3118 this.request = (BundleEntryRequestComponent) value; // BundleEntryRequestComponent 3119 return value; 3120 case -340323263: // response 3121 this.response = (BundleEntryResponseComponent) value; // BundleEntryResponseComponent 3122 return value; 3123 default: return super.setProperty(hash, name, value); 3124 } 3125 3126 } 3127 3128 @Override 3129 public Base setProperty(String name, Base value) throws FHIRException { 3130 if (name.equals("link")) { 3131 this.getLink().add((BundleLinkComponent) value); 3132 } else if (name.equals("fullUrl")) { 3133 this.fullUrl = TypeConvertor.castToUri(value); // UriType 3134 } else if (name.equals("resource")) { 3135 this.resource = TypeConvertor.castToResource(value); // Resource 3136 } else if (name.equals("search")) { 3137 this.search = (BundleEntrySearchComponent) value; // BundleEntrySearchComponent 3138 } else if (name.equals("request")) { 3139 this.request = (BundleEntryRequestComponent) value; // BundleEntryRequestComponent 3140 } else if (name.equals("response")) { 3141 this.response = (BundleEntryResponseComponent) value; // BundleEntryResponseComponent 3142 } else 3143 return super.setProperty(name, value); 3144 return value; 3145 } 3146 3147 @Override 3148 public void removeChild(String name, Base value) throws FHIRException { 3149 if (name.equals("link")) { 3150 this.getLink().remove((BundleLinkComponent) value); 3151 } else if (name.equals("fullUrl")) { 3152 this.fullUrl = null; 3153 } else if (name.equals("resource")) { 3154 this.resource = null; 3155 } else if (name.equals("search")) { 3156 this.search = (BundleEntrySearchComponent) value; // BundleEntrySearchComponent 3157 } else if (name.equals("request")) { 3158 this.request = (BundleEntryRequestComponent) value; // BundleEntryRequestComponent 3159 } else if (name.equals("response")) { 3160 this.response = (BundleEntryResponseComponent) value; // BundleEntryResponseComponent 3161 } else 3162 super.removeChild(name, value); 3163 3164 } 3165 3166 @Override 3167 public Base makeProperty(int hash, String name) throws FHIRException { 3168 switch (hash) { 3169 case 3321850: return addLink(); 3170 case -511251360: return getFullUrlElement(); 3171 case -341064690: throw new FHIRException("Cannot make property resource as it is not a complex type"); // Resource 3172 case -906336856: return getSearch(); 3173 case 1095692943: return getRequest(); 3174 case -340323263: return getResponse(); 3175 default: return super.makeProperty(hash, name); 3176 } 3177 3178 } 3179 3180 @Override 3181 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3182 switch (hash) { 3183 case 3321850: /*link*/ return new String[] {"@Bundle.link"}; 3184 case -511251360: /*fullUrl*/ return new String[] {"uri"}; 3185 case -341064690: /*resource*/ return new String[] {"Resource"}; 3186 case -906336856: /*search*/ return new String[] {}; 3187 case 1095692943: /*request*/ return new String[] {}; 3188 case -340323263: /*response*/ return new String[] {}; 3189 default: return super.getTypesForProperty(hash, name); 3190 } 3191 3192 } 3193 3194 @Override 3195 public Base addChild(String name) throws FHIRException { 3196 if (name.equals("link")) { 3197 return addLink(); 3198 } 3199 else if (name.equals("fullUrl")) { 3200 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.fullUrl"); 3201 } 3202 else if (name.equals("resource")) { 3203 throw new FHIRException("Cannot call addChild on an abstract type Bundle.entry.resource"); 3204 } 3205 else if (name.equals("search")) { 3206 this.search = new BundleEntrySearchComponent(); 3207 return this.search; 3208 } 3209 else if (name.equals("request")) { 3210 this.request = new BundleEntryRequestComponent(); 3211 return this.request; 3212 } 3213 else if (name.equals("response")) { 3214 this.response = new BundleEntryResponseComponent(); 3215 return this.response; 3216 } 3217 else 3218 return super.addChild(name); 3219 } 3220 3221 public BundleEntryComponent copy() { 3222 BundleEntryComponent dst = new BundleEntryComponent(); 3223 copyValues(dst); 3224 return dst; 3225 } 3226 3227 public void copyValues(BundleEntryComponent dst) { 3228 super.copyValues(dst); 3229 if (link != null) { 3230 dst.link = new ArrayList<BundleLinkComponent>(); 3231 for (BundleLinkComponent i : link) 3232 dst.link.add(i.copy()); 3233 }; 3234 dst.fullUrl = fullUrl == null ? null : fullUrl.copy(); 3235 dst.resource = resource == null ? null : resource.copy(); 3236 dst.search = search == null ? null : search.copy(); 3237 dst.request = request == null ? null : request.copy(); 3238 dst.response = response == null ? null : response.copy(); 3239 } 3240 3241 @Override 3242 public boolean equalsDeep(Base other_) { 3243 if (!super.equalsDeep(other_)) 3244 return false; 3245 if (!(other_ instanceof BundleEntryComponent)) 3246 return false; 3247 BundleEntryComponent o = (BundleEntryComponent) other_; 3248 return compareDeep(link, o.link, true) && compareDeep(fullUrl, o.fullUrl, true) && compareDeep(resource, o.resource, true) 3249 && compareDeep(search, o.search, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) 3250 ; 3251 } 3252 3253 @Override 3254 public boolean equalsShallow(Base other_) { 3255 if (!super.equalsShallow(other_)) 3256 return false; 3257 if (!(other_ instanceof BundleEntryComponent)) 3258 return false; 3259 BundleEntryComponent o = (BundleEntryComponent) other_; 3260 return compareValues(fullUrl, o.fullUrl, true); 3261 } 3262 3263 public boolean isEmpty() { 3264 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, fullUrl, resource 3265 , search, request, response); 3266 } 3267 3268 public String fhirType() { 3269 return "Bundle.entry"; 3270 3271 } 3272 3273// added from java-adornments.txt: 3274/** 3275 * Returns the {@link #getLink() link} which matches a given {@link BundleLinkComponent#getRelation() relation}. 3276 * If no link is found which matches the given relation, returns <code>null</code>. If more than one 3277 * link is found which matches the given relation, returns the first matching BundleLinkComponent. 3278 * 3279 * @param theRelation 3280 * The relation, such as \"next\", or \"self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}. 3281 * @return Returns a matching BundleLinkComponent, or <code>null</code> 3282 * @see IBaseBundle#LINK_NEXT 3283 * @see IBaseBundle#LINK_PREV 3284 * @see IBaseBundle#LINK_SELF 3285 */ 3286 public BundleLinkComponent getLink(String theRelation) { 3287 org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty"); 3288 for (BundleLinkComponent next : getLink()) { 3289 if (theRelation.equals(next.getRelation().toCode())) { 3290 return next; 3291 } 3292 } 3293 return null; 3294 } 3295 3296 /** 3297 * Returns the {@link #getLink() link} which matches a given {@link BundleLinkComponent#getRelation() relation}. 3298 * If no link is found which matches the given relation, creates a new BundleLinkComponent with the 3299 * given relation and adds it to this Bundle. If more than one 3300 * link is found which matches the given relation, returns the first matching BundleLinkComponent. 3301 * 3302 * @param theRelation 3303 * The relation, such as \"next\", or \"self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}. 3304 * @return Returns a matching BundleLinkComponent, or <code>null</code> 3305 * @see IBaseBundle#LINK_NEXT 3306 * @see IBaseBundle#LINK_PREV 3307 * @see IBaseBundle#LINK_SELF 3308 */ 3309 public BundleLinkComponent getLinkOrCreate(String theRelation) { 3310 org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty"); 3311 for (BundleLinkComponent next : getLink()) { 3312 if (theRelation.equals(next.getRelation().toCode())) { 3313 return next; 3314 } 3315 } 3316 BundleLinkComponent retVal = new BundleLinkComponent(); 3317 retVal.setRelation(LinkRelationTypes.fromCode(theRelation)); 3318 getLink().add(retVal); 3319 return retVal; 3320 } 3321// end addition 3322 } 3323 3324 @Block() 3325 public static class BundleEntrySearchComponent extends BackboneElement implements IBaseBackboneElement { 3326 /** 3327 * Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process. 3328 */ 3329 @Child(name = "mode", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=true) 3330 @Description(shortDefinition="match | include - why this is in the result set", formalDefinition="Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process." ) 3331 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-entry-mode") 3332 protected Enumeration<SearchEntryMode> mode; 3333 3334 /** 3335 * When searching, the server's search ranking score for the entry. 3336 */ 3337 @Child(name = "score", type = {DecimalType.class}, order=2, min=0, max=1, modifier=false, summary=true) 3338 @Description(shortDefinition="Search ranking (between 0 and 1)", formalDefinition="When searching, the server's search ranking score for the entry." ) 3339 protected DecimalType score; 3340 3341 private static final long serialVersionUID = 837739866L; 3342 3343 /** 3344 * Constructor 3345 */ 3346 public BundleEntrySearchComponent() { 3347 super(); 3348 } 3349 3350 /** 3351 * @return {@link #mode} (Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 3352 */ 3353 public Enumeration<SearchEntryMode> getModeElement() { 3354 if (this.mode == null) 3355 if (Configuration.errorOnAutoCreate()) 3356 throw new Error("Attempt to auto-create BundleEntrySearchComponent.mode"); 3357 else if (Configuration.doAutoCreate()) 3358 this.mode = new Enumeration<SearchEntryMode>(new SearchEntryModeEnumFactory()); // bb 3359 return this.mode; 3360 } 3361 3362 public boolean hasModeElement() { 3363 return this.mode != null && !this.mode.isEmpty(); 3364 } 3365 3366 public boolean hasMode() { 3367 return this.mode != null && !this.mode.isEmpty(); 3368 } 3369 3370 /** 3371 * @param value {@link #mode} (Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.). This is the underlying object with id, value and extensions. The accessor "getMode" gives direct access to the value 3372 */ 3373 public BundleEntrySearchComponent setModeElement(Enumeration<SearchEntryMode> value) { 3374 this.mode = value; 3375 return this; 3376 } 3377 3378 /** 3379 * @return Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process. 3380 */ 3381 public SearchEntryMode getMode() { 3382 return this.mode == null ? null : this.mode.getValue(); 3383 } 3384 3385 /** 3386 * @param value Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process. 3387 */ 3388 public BundleEntrySearchComponent setMode(SearchEntryMode value) { 3389 if (value == null) 3390 this.mode = null; 3391 else { 3392 if (this.mode == null) 3393 this.mode = new Enumeration<SearchEntryMode>(new SearchEntryModeEnumFactory()); 3394 this.mode.setValue(value); 3395 } 3396 return this; 3397 } 3398 3399 /** 3400 * @return {@link #score} (When searching, the server's search ranking score for the entry.). This is the underlying object with id, value and extensions. The accessor "getScore" gives direct access to the value 3401 */ 3402 public DecimalType getScoreElement() { 3403 if (this.score == null) 3404 if (Configuration.errorOnAutoCreate()) 3405 throw new Error("Attempt to auto-create BundleEntrySearchComponent.score"); 3406 else if (Configuration.doAutoCreate()) 3407 this.score = new DecimalType(); // bb 3408 return this.score; 3409 } 3410 3411 public boolean hasScoreElement() { 3412 return this.score != null && !this.score.isEmpty(); 3413 } 3414 3415 public boolean hasScore() { 3416 return this.score != null && !this.score.isEmpty(); 3417 } 3418 3419 /** 3420 * @param value {@link #score} (When searching, the server's search ranking score for the entry.). This is the underlying object with id, value and extensions. The accessor "getScore" gives direct access to the value 3421 */ 3422 public BundleEntrySearchComponent setScoreElement(DecimalType value) { 3423 this.score = value; 3424 return this; 3425 } 3426 3427 /** 3428 * @return When searching, the server's search ranking score for the entry. 3429 */ 3430 public BigDecimal getScore() { 3431 return this.score == null ? null : this.score.getValue(); 3432 } 3433 3434 /** 3435 * @param value When searching, the server's search ranking score for the entry. 3436 */ 3437 public BundleEntrySearchComponent setScore(BigDecimal value) { 3438 if (value == null) 3439 this.score = null; 3440 else { 3441 if (this.score == null) 3442 this.score = new DecimalType(); 3443 this.score.setValue(value); 3444 } 3445 return this; 3446 } 3447 3448 /** 3449 * @param value When searching, the server's search ranking score for the entry. 3450 */ 3451 public BundleEntrySearchComponent setScore(long value) { 3452 this.score = new DecimalType(); 3453 this.score.setValue(value); 3454 return this; 3455 } 3456 3457 /** 3458 * @param value When searching, the server's search ranking score for the entry. 3459 */ 3460 public BundleEntrySearchComponent setScore(double value) { 3461 this.score = new DecimalType(); 3462 this.score.setValue(value); 3463 return this; 3464 } 3465 3466 protected void listChildren(List<Property> children) { 3467 super.listChildren(children); 3468 children.add(new Property("mode", "code", "Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.", 0, 1, mode)); 3469 children.add(new Property("score", "decimal", "When searching, the server's search ranking score for the entry.", 0, 1, score)); 3470 } 3471 3472 @Override 3473 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3474 switch (_hash) { 3475 case 3357091: /*mode*/ return new Property("mode", "code", "Why this entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.", 0, 1, mode); 3476 case 109264530: /*score*/ return new Property("score", "decimal", "When searching, the server's search ranking score for the entry.", 0, 1, score); 3477 default: return super.getNamedProperty(_hash, _name, _checkValid); 3478 } 3479 3480 } 3481 3482 @Override 3483 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3484 switch (hash) { 3485 case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<SearchEntryMode> 3486 case 109264530: /*score*/ return this.score == null ? new Base[0] : new Base[] {this.score}; // DecimalType 3487 default: return super.getProperty(hash, name, checkValid); 3488 } 3489 3490 } 3491 3492 @Override 3493 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3494 switch (hash) { 3495 case 3357091: // mode 3496 value = new SearchEntryModeEnumFactory().fromType(TypeConvertor.castToCode(value)); 3497 this.mode = (Enumeration) value; // Enumeration<SearchEntryMode> 3498 return value; 3499 case 109264530: // score 3500 this.score = TypeConvertor.castToDecimal(value); // DecimalType 3501 return value; 3502 default: return super.setProperty(hash, name, value); 3503 } 3504 3505 } 3506 3507 @Override 3508 public Base setProperty(String name, Base value) throws FHIRException { 3509 if (name.equals("mode")) { 3510 value = new SearchEntryModeEnumFactory().fromType(TypeConvertor.castToCode(value)); 3511 this.mode = (Enumeration) value; // Enumeration<SearchEntryMode> 3512 } else if (name.equals("score")) { 3513 this.score = TypeConvertor.castToDecimal(value); // DecimalType 3514 } else 3515 return super.setProperty(name, value); 3516 return value; 3517 } 3518 3519 @Override 3520 public void removeChild(String name, Base value) throws FHIRException { 3521 if (name.equals("mode")) { 3522 value = new SearchEntryModeEnumFactory().fromType(TypeConvertor.castToCode(value)); 3523 this.mode = (Enumeration) value; // Enumeration<SearchEntryMode> 3524 } else if (name.equals("score")) { 3525 this.score = null; 3526 } else 3527 super.removeChild(name, value); 3528 3529 } 3530 3531 @Override 3532 public Base makeProperty(int hash, String name) throws FHIRException { 3533 switch (hash) { 3534 case 3357091: return getModeElement(); 3535 case 109264530: return getScoreElement(); 3536 default: return super.makeProperty(hash, name); 3537 } 3538 3539 } 3540 3541 @Override 3542 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3543 switch (hash) { 3544 case 3357091: /*mode*/ return new String[] {"code"}; 3545 case 109264530: /*score*/ return new String[] {"decimal"}; 3546 default: return super.getTypesForProperty(hash, name); 3547 } 3548 3549 } 3550 3551 @Override 3552 public Base addChild(String name) throws FHIRException { 3553 if (name.equals("mode")) { 3554 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.search.mode"); 3555 } 3556 else if (name.equals("score")) { 3557 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.search.score"); 3558 } 3559 else 3560 return super.addChild(name); 3561 } 3562 3563 public BundleEntrySearchComponent copy() { 3564 BundleEntrySearchComponent dst = new BundleEntrySearchComponent(); 3565 copyValues(dst); 3566 return dst; 3567 } 3568 3569 public void copyValues(BundleEntrySearchComponent dst) { 3570 super.copyValues(dst); 3571 dst.mode = mode == null ? null : mode.copy(); 3572 dst.score = score == null ? null : score.copy(); 3573 } 3574 3575 @Override 3576 public boolean equalsDeep(Base other_) { 3577 if (!super.equalsDeep(other_)) 3578 return false; 3579 if (!(other_ instanceof BundleEntrySearchComponent)) 3580 return false; 3581 BundleEntrySearchComponent o = (BundleEntrySearchComponent) other_; 3582 return compareDeep(mode, o.mode, true) && compareDeep(score, o.score, true); 3583 } 3584 3585 @Override 3586 public boolean equalsShallow(Base other_) { 3587 if (!super.equalsShallow(other_)) 3588 return false; 3589 if (!(other_ instanceof BundleEntrySearchComponent)) 3590 return false; 3591 BundleEntrySearchComponent o = (BundleEntrySearchComponent) other_; 3592 return compareValues(mode, o.mode, true) && compareValues(score, o.score, true); 3593 } 3594 3595 public boolean isEmpty() { 3596 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, score); 3597 } 3598 3599 public String fhirType() { 3600 return "Bundle.entry.search"; 3601 3602 } 3603 3604 } 3605 3606 @Block() 3607 public static class BundleEntryRequestComponent extends BackboneElement implements IBaseBackboneElement { 3608 /** 3609 * In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred. 3610 */ 3611 @Child(name = "method", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 3612 @Description(shortDefinition="GET | HEAD | POST | PUT | DELETE | PATCH", formalDefinition="In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred." ) 3613 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/http-verb") 3614 protected Enumeration<HTTPVerb> method; 3615 3616 /** 3617 * The URL for this entry, relative to the root (the address to which the request is posted). 3618 */ 3619 @Child(name = "url", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=true) 3620 @Description(shortDefinition="URL for HTTP equivalent of this entry", formalDefinition="The URL for this entry, relative to the root (the address to which the request is posted)." ) 3621 protected UriType url; 3622 3623 /** 3624 * If the ETag values match, return a 304 Not Modified status. See the API documentation for ["Conditional Read"](http.html#cread). 3625 */ 3626 @Child(name = "ifNoneMatch", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 3627 @Description(shortDefinition="For managing cache validation", formalDefinition="If the ETag values match, return a 304 Not Modified status. See the API documentation for [\"Conditional Read\"](http.html#cread)." ) 3628 protected StringType ifNoneMatch; 3629 3630 /** 3631 * Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread). 3632 */ 3633 @Child(name = "ifModifiedSince", type = {InstantType.class}, order=4, min=0, max=1, modifier=false, summary=true) 3634 @Description(shortDefinition="For managing cache currency", formalDefinition="Only perform the operation if the last updated date matches. See the API documentation for [\"Conditional Read\"](http.html#cread)." ) 3635 protected InstantType ifModifiedSince; 3636 3637 /** 3638 * Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency). 3639 */ 3640 @Child(name = "ifMatch", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 3641 @Description(shortDefinition="For managing update contention", formalDefinition="Only perform the operation if the Etag value matches. For more information, see the API section [\"Managing Resource Contention\"](http.html#concurrency)." ) 3642 protected StringType ifMatch; 3643 3644 /** 3645 * Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?"). 3646 */ 3647 @Child(name = "ifNoneExist", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) 3648 @Description(shortDefinition="For conditional creates", formalDefinition="Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\"Conditional Create\"](http.html#ccreate). This is just the query portion of the URL - what follows the \"?\" (not including the \"?\")." ) 3649 protected StringType ifNoneExist; 3650 3651 private static final long serialVersionUID = -1349769744L; 3652 3653 /** 3654 * Constructor 3655 */ 3656 public BundleEntryRequestComponent() { 3657 super(); 3658 } 3659 3660 /** 3661 * Constructor 3662 */ 3663 public BundleEntryRequestComponent(HTTPVerb method, String url) { 3664 super(); 3665 this.setMethod(method); 3666 this.setUrl(url); 3667 } 3668 3669 /** 3670 * @return {@link #method} (In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value 3671 */ 3672 public Enumeration<HTTPVerb> getMethodElement() { 3673 if (this.method == null) 3674 if (Configuration.errorOnAutoCreate()) 3675 throw new Error("Attempt to auto-create BundleEntryRequestComponent.method"); 3676 else if (Configuration.doAutoCreate()) 3677 this.method = new Enumeration<HTTPVerb>(new HTTPVerbEnumFactory()); // bb 3678 return this.method; 3679 } 3680 3681 public boolean hasMethodElement() { 3682 return this.method != null && !this.method.isEmpty(); 3683 } 3684 3685 public boolean hasMethod() { 3686 return this.method != null && !this.method.isEmpty(); 3687 } 3688 3689 /** 3690 * @param value {@link #method} (In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred.). This is the underlying object with id, value and extensions. The accessor "getMethod" gives direct access to the value 3691 */ 3692 public BundleEntryRequestComponent setMethodElement(Enumeration<HTTPVerb> value) { 3693 this.method = value; 3694 return this; 3695 } 3696 3697 /** 3698 * @return In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred. 3699 */ 3700 public HTTPVerb getMethod() { 3701 return this.method == null ? null : this.method.getValue(); 3702 } 3703 3704 /** 3705 * @param value In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred. 3706 */ 3707 public BundleEntryRequestComponent setMethod(HTTPVerb value) { 3708 if (this.method == null) 3709 this.method = new Enumeration<HTTPVerb>(new HTTPVerbEnumFactory()); 3710 this.method.setValue(value); 3711 return this; 3712 } 3713 3714 /** 3715 * @return {@link #url} (The URL for this entry, relative to the root (the address to which the request is posted).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 3716 */ 3717 public UriType getUrlElement() { 3718 if (this.url == null) 3719 if (Configuration.errorOnAutoCreate()) 3720 throw new Error("Attempt to auto-create BundleEntryRequestComponent.url"); 3721 else if (Configuration.doAutoCreate()) 3722 this.url = new UriType(); // bb 3723 return this.url; 3724 } 3725 3726 public boolean hasUrlElement() { 3727 return this.url != null && !this.url.isEmpty(); 3728 } 3729 3730 public boolean hasUrl() { 3731 return this.url != null && !this.url.isEmpty(); 3732 } 3733 3734 /** 3735 * @param value {@link #url} (The URL for this entry, relative to the root (the address to which the request is posted).). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 3736 */ 3737 public BundleEntryRequestComponent setUrlElement(UriType value) { 3738 this.url = value; 3739 return this; 3740 } 3741 3742 /** 3743 * @return The URL for this entry, relative to the root (the address to which the request is posted). 3744 */ 3745 public String getUrl() { 3746 return this.url == null ? null : this.url.getValue(); 3747 } 3748 3749 /** 3750 * @param value The URL for this entry, relative to the root (the address to which the request is posted). 3751 */ 3752 public BundleEntryRequestComponent setUrl(String value) { 3753 if (this.url == null) 3754 this.url = new UriType(); 3755 this.url.setValue(value); 3756 return this; 3757 } 3758 3759 /** 3760 * @return {@link #ifNoneMatch} (If the ETag values match, return a 304 Not Modified status. See the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfNoneMatch" gives direct access to the value 3761 */ 3762 public StringType getIfNoneMatchElement() { 3763 if (this.ifNoneMatch == null) 3764 if (Configuration.errorOnAutoCreate()) 3765 throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifNoneMatch"); 3766 else if (Configuration.doAutoCreate()) 3767 this.ifNoneMatch = new StringType(); // bb 3768 return this.ifNoneMatch; 3769 } 3770 3771 public boolean hasIfNoneMatchElement() { 3772 return this.ifNoneMatch != null && !this.ifNoneMatch.isEmpty(); 3773 } 3774 3775 public boolean hasIfNoneMatch() { 3776 return this.ifNoneMatch != null && !this.ifNoneMatch.isEmpty(); 3777 } 3778 3779 /** 3780 * @param value {@link #ifNoneMatch} (If the ETag values match, return a 304 Not Modified status. See the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfNoneMatch" gives direct access to the value 3781 */ 3782 public BundleEntryRequestComponent setIfNoneMatchElement(StringType value) { 3783 this.ifNoneMatch = value; 3784 return this; 3785 } 3786 3787 /** 3788 * @return If the ETag values match, return a 304 Not Modified status. See the API documentation for ["Conditional Read"](http.html#cread). 3789 */ 3790 public String getIfNoneMatch() { 3791 return this.ifNoneMatch == null ? null : this.ifNoneMatch.getValue(); 3792 } 3793 3794 /** 3795 * @param value If the ETag values match, return a 304 Not Modified status. See the API documentation for ["Conditional Read"](http.html#cread). 3796 */ 3797 public BundleEntryRequestComponent setIfNoneMatch(String value) { 3798 if (Utilities.noString(value)) 3799 this.ifNoneMatch = null; 3800 else { 3801 if (this.ifNoneMatch == null) 3802 this.ifNoneMatch = new StringType(); 3803 this.ifNoneMatch.setValue(value); 3804 } 3805 return this; 3806 } 3807 3808 /** 3809 * @return {@link #ifModifiedSince} (Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfModifiedSince" gives direct access to the value 3810 */ 3811 public InstantType getIfModifiedSinceElement() { 3812 if (this.ifModifiedSince == null) 3813 if (Configuration.errorOnAutoCreate()) 3814 throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifModifiedSince"); 3815 else if (Configuration.doAutoCreate()) 3816 this.ifModifiedSince = new InstantType(); // bb 3817 return this.ifModifiedSince; 3818 } 3819 3820 public boolean hasIfModifiedSinceElement() { 3821 return this.ifModifiedSince != null && !this.ifModifiedSince.isEmpty(); 3822 } 3823 3824 public boolean hasIfModifiedSince() { 3825 return this.ifModifiedSince != null && !this.ifModifiedSince.isEmpty(); 3826 } 3827 3828 /** 3829 * @param value {@link #ifModifiedSince} (Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread).). This is the underlying object with id, value and extensions. The accessor "getIfModifiedSince" gives direct access to the value 3830 */ 3831 public BundleEntryRequestComponent setIfModifiedSinceElement(InstantType value) { 3832 this.ifModifiedSince = value; 3833 return this; 3834 } 3835 3836 /** 3837 * @return Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread). 3838 */ 3839 public Date getIfModifiedSince() { 3840 return this.ifModifiedSince == null ? null : this.ifModifiedSince.getValue(); 3841 } 3842 3843 /** 3844 * @param value Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread). 3845 */ 3846 public BundleEntryRequestComponent setIfModifiedSince(Date value) { 3847 if (value == null) 3848 this.ifModifiedSince = null; 3849 else { 3850 if (this.ifModifiedSince == null) 3851 this.ifModifiedSince = new InstantType(); 3852 this.ifModifiedSince.setValue(value); 3853 } 3854 return this; 3855 } 3856 3857 /** 3858 * @return {@link #ifMatch} (Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).). This is the underlying object with id, value and extensions. The accessor "getIfMatch" gives direct access to the value 3859 */ 3860 public StringType getIfMatchElement() { 3861 if (this.ifMatch == null) 3862 if (Configuration.errorOnAutoCreate()) 3863 throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifMatch"); 3864 else if (Configuration.doAutoCreate()) 3865 this.ifMatch = new StringType(); // bb 3866 return this.ifMatch; 3867 } 3868 3869 public boolean hasIfMatchElement() { 3870 return this.ifMatch != null && !this.ifMatch.isEmpty(); 3871 } 3872 3873 public boolean hasIfMatch() { 3874 return this.ifMatch != null && !this.ifMatch.isEmpty(); 3875 } 3876 3877 /** 3878 * @param value {@link #ifMatch} (Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency).). This is the underlying object with id, value and extensions. The accessor "getIfMatch" gives direct access to the value 3879 */ 3880 public BundleEntryRequestComponent setIfMatchElement(StringType value) { 3881 this.ifMatch = value; 3882 return this; 3883 } 3884 3885 /** 3886 * @return Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency). 3887 */ 3888 public String getIfMatch() { 3889 return this.ifMatch == null ? null : this.ifMatch.getValue(); 3890 } 3891 3892 /** 3893 * @param value Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency). 3894 */ 3895 public BundleEntryRequestComponent setIfMatch(String value) { 3896 if (Utilities.noString(value)) 3897 this.ifMatch = null; 3898 else { 3899 if (this.ifMatch == null) 3900 this.ifMatch = new StringType(); 3901 this.ifMatch.setValue(value); 3902 } 3903 return this; 3904 } 3905 3906 /** 3907 * @return {@link #ifNoneExist} (Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?").). This is the underlying object with id, value and extensions. The accessor "getIfNoneExist" gives direct access to the value 3908 */ 3909 public StringType getIfNoneExistElement() { 3910 if (this.ifNoneExist == null) 3911 if (Configuration.errorOnAutoCreate()) 3912 throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifNoneExist"); 3913 else if (Configuration.doAutoCreate()) 3914 this.ifNoneExist = new StringType(); // bb 3915 return this.ifNoneExist; 3916 } 3917 3918 public boolean hasIfNoneExistElement() { 3919 return this.ifNoneExist != null && !this.ifNoneExist.isEmpty(); 3920 } 3921 3922 public boolean hasIfNoneExist() { 3923 return this.ifNoneExist != null && !this.ifNoneExist.isEmpty(); 3924 } 3925 3926 /** 3927 * @param value {@link #ifNoneExist} (Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?").). This is the underlying object with id, value and extensions. The accessor "getIfNoneExist" gives direct access to the value 3928 */ 3929 public BundleEntryRequestComponent setIfNoneExistElement(StringType value) { 3930 this.ifNoneExist = value; 3931 return this; 3932 } 3933 3934 /** 3935 * @return Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?"). 3936 */ 3937 public String getIfNoneExist() { 3938 return this.ifNoneExist == null ? null : this.ifNoneExist.getValue(); 3939 } 3940 3941 /** 3942 * @param value Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for ["Conditional Create"](http.html#ccreate). This is just the query portion of the URL - what follows the "?" (not including the "?"). 3943 */ 3944 public BundleEntryRequestComponent setIfNoneExist(String value) { 3945 if (Utilities.noString(value)) 3946 this.ifNoneExist = null; 3947 else { 3948 if (this.ifNoneExist == null) 3949 this.ifNoneExist = new StringType(); 3950 this.ifNoneExist.setValue(value); 3951 } 3952 return this; 3953 } 3954 3955 protected void listChildren(List<Property> children) { 3956 super.listChildren(children); 3957 children.add(new Property("method", "code", "In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred.", 0, 1, method)); 3958 children.add(new Property("url", "uri", "The URL for this entry, relative to the root (the address to which the request is posted).", 0, 1, url)); 3959 children.add(new Property("ifNoneMatch", "string", "If the ETag values match, return a 304 Not Modified status. See the API documentation for [\"Conditional Read\"](http.html#cread).", 0, 1, ifNoneMatch)); 3960 children.add(new Property("ifModifiedSince", "instant", "Only perform the operation if the last updated date matches. See the API documentation for [\"Conditional Read\"](http.html#cread).", 0, 1, ifModifiedSince)); 3961 children.add(new Property("ifMatch", "string", "Only perform the operation if the Etag value matches. For more information, see the API section [\"Managing Resource Contention\"](http.html#concurrency).", 0, 1, ifMatch)); 3962 children.add(new Property("ifNoneExist", "string", "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\"Conditional Create\"](http.html#ccreate). This is just the query portion of the URL - what follows the \"?\" (not including the \"?\").", 0, 1, ifNoneExist)); 3963 } 3964 3965 @Override 3966 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3967 switch (_hash) { 3968 case -1077554975: /*method*/ return new Property("method", "code", "In a transaction or batch, this is the HTTP action to be executed for this entry. In a history bundle, this indicates the HTTP action that occurred.", 0, 1, method); 3969 case 116079: /*url*/ return new Property("url", "uri", "The URL for this entry, relative to the root (the address to which the request is posted).", 0, 1, url); 3970 case 171868368: /*ifNoneMatch*/ return new Property("ifNoneMatch", "string", "If the ETag values match, return a 304 Not Modified status. See the API documentation for [\"Conditional Read\"](http.html#cread).", 0, 1, ifNoneMatch); 3971 case -2061602860: /*ifModifiedSince*/ return new Property("ifModifiedSince", "instant", "Only perform the operation if the last updated date matches. See the API documentation for [\"Conditional Read\"](http.html#cread).", 0, 1, ifModifiedSince); 3972 case 1692894888: /*ifMatch*/ return new Property("ifMatch", "string", "Only perform the operation if the Etag value matches. For more information, see the API section [\"Managing Resource Contention\"](http.html#concurrency).", 0, 1, ifMatch); 3973 case 165155330: /*ifNoneExist*/ return new Property("ifNoneExist", "string", "Instruct the server not to perform the create if a specified resource already exists. For further information, see the API documentation for [\"Conditional Create\"](http.html#ccreate). This is just the query portion of the URL - what follows the \"?\" (not including the \"?\").", 0, 1, ifNoneExist); 3974 default: return super.getNamedProperty(_hash, _name, _checkValid); 3975 } 3976 3977 } 3978 3979 @Override 3980 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3981 switch (hash) { 3982 case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // Enumeration<HTTPVerb> 3983 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 3984 case 171868368: /*ifNoneMatch*/ return this.ifNoneMatch == null ? new Base[0] : new Base[] {this.ifNoneMatch}; // StringType 3985 case -2061602860: /*ifModifiedSince*/ return this.ifModifiedSince == null ? new Base[0] : new Base[] {this.ifModifiedSince}; // InstantType 3986 case 1692894888: /*ifMatch*/ return this.ifMatch == null ? new Base[0] : new Base[] {this.ifMatch}; // StringType 3987 case 165155330: /*ifNoneExist*/ return this.ifNoneExist == null ? new Base[0] : new Base[] {this.ifNoneExist}; // StringType 3988 default: return super.getProperty(hash, name, checkValid); 3989 } 3990 3991 } 3992 3993 @Override 3994 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3995 switch (hash) { 3996 case -1077554975: // method 3997 value = new HTTPVerbEnumFactory().fromType(TypeConvertor.castToCode(value)); 3998 this.method = (Enumeration) value; // Enumeration<HTTPVerb> 3999 return value; 4000 case 116079: // url 4001 this.url = TypeConvertor.castToUri(value); // UriType 4002 return value; 4003 case 171868368: // ifNoneMatch 4004 this.ifNoneMatch = TypeConvertor.castToString(value); // StringType 4005 return value; 4006 case -2061602860: // ifModifiedSince 4007 this.ifModifiedSince = TypeConvertor.castToInstant(value); // InstantType 4008 return value; 4009 case 1692894888: // ifMatch 4010 this.ifMatch = TypeConvertor.castToString(value); // StringType 4011 return value; 4012 case 165155330: // ifNoneExist 4013 this.ifNoneExist = TypeConvertor.castToString(value); // StringType 4014 return value; 4015 default: return super.setProperty(hash, name, value); 4016 } 4017 4018 } 4019 4020 @Override 4021 public Base setProperty(String name, Base value) throws FHIRException { 4022 if (name.equals("method")) { 4023 value = new HTTPVerbEnumFactory().fromType(TypeConvertor.castToCode(value)); 4024 this.method = (Enumeration) value; // Enumeration<HTTPVerb> 4025 } else if (name.equals("url")) { 4026 this.url = TypeConvertor.castToUri(value); // UriType 4027 } else if (name.equals("ifNoneMatch")) { 4028 this.ifNoneMatch = TypeConvertor.castToString(value); // StringType 4029 } else if (name.equals("ifModifiedSince")) { 4030 this.ifModifiedSince = TypeConvertor.castToInstant(value); // InstantType 4031 } else if (name.equals("ifMatch")) { 4032 this.ifMatch = TypeConvertor.castToString(value); // StringType 4033 } else if (name.equals("ifNoneExist")) { 4034 this.ifNoneExist = TypeConvertor.castToString(value); // StringType 4035 } else 4036 return super.setProperty(name, value); 4037 return value; 4038 } 4039 4040 @Override 4041 public void removeChild(String name, Base value) throws FHIRException { 4042 if (name.equals("method")) { 4043 value = new HTTPVerbEnumFactory().fromType(TypeConvertor.castToCode(value)); 4044 this.method = (Enumeration) value; // Enumeration<HTTPVerb> 4045 } else if (name.equals("url")) { 4046 this.url = null; 4047 } else if (name.equals("ifNoneMatch")) { 4048 this.ifNoneMatch = null; 4049 } else if (name.equals("ifModifiedSince")) { 4050 this.ifModifiedSince = null; 4051 } else if (name.equals("ifMatch")) { 4052 this.ifMatch = null; 4053 } else if (name.equals("ifNoneExist")) { 4054 this.ifNoneExist = null; 4055 } else 4056 super.removeChild(name, value); 4057 4058 } 4059 4060 @Override 4061 public Base makeProperty(int hash, String name) throws FHIRException { 4062 switch (hash) { 4063 case -1077554975: return getMethodElement(); 4064 case 116079: return getUrlElement(); 4065 case 171868368: return getIfNoneMatchElement(); 4066 case -2061602860: return getIfModifiedSinceElement(); 4067 case 1692894888: return getIfMatchElement(); 4068 case 165155330: return getIfNoneExistElement(); 4069 default: return super.makeProperty(hash, name); 4070 } 4071 4072 } 4073 4074 @Override 4075 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4076 switch (hash) { 4077 case -1077554975: /*method*/ return new String[] {"code"}; 4078 case 116079: /*url*/ return new String[] {"uri"}; 4079 case 171868368: /*ifNoneMatch*/ return new String[] {"string"}; 4080 case -2061602860: /*ifModifiedSince*/ return new String[] {"instant"}; 4081 case 1692894888: /*ifMatch*/ return new String[] {"string"}; 4082 case 165155330: /*ifNoneExist*/ return new String[] {"string"}; 4083 default: return super.getTypesForProperty(hash, name); 4084 } 4085 4086 } 4087 4088 @Override 4089 public Base addChild(String name) throws FHIRException { 4090 if (name.equals("method")) { 4091 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.request.method"); 4092 } 4093 else if (name.equals("url")) { 4094 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.request.url"); 4095 } 4096 else if (name.equals("ifNoneMatch")) { 4097 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.request.ifNoneMatch"); 4098 } 4099 else if (name.equals("ifModifiedSince")) { 4100 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.request.ifModifiedSince"); 4101 } 4102 else if (name.equals("ifMatch")) { 4103 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.request.ifMatch"); 4104 } 4105 else if (name.equals("ifNoneExist")) { 4106 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.request.ifNoneExist"); 4107 } 4108 else 4109 return super.addChild(name); 4110 } 4111 4112 public BundleEntryRequestComponent copy() { 4113 BundleEntryRequestComponent dst = new BundleEntryRequestComponent(); 4114 copyValues(dst); 4115 return dst; 4116 } 4117 4118 public void copyValues(BundleEntryRequestComponent dst) { 4119 super.copyValues(dst); 4120 dst.method = method == null ? null : method.copy(); 4121 dst.url = url == null ? null : url.copy(); 4122 dst.ifNoneMatch = ifNoneMatch == null ? null : ifNoneMatch.copy(); 4123 dst.ifModifiedSince = ifModifiedSince == null ? null : ifModifiedSince.copy(); 4124 dst.ifMatch = ifMatch == null ? null : ifMatch.copy(); 4125 dst.ifNoneExist = ifNoneExist == null ? null : ifNoneExist.copy(); 4126 } 4127 4128 @Override 4129 public boolean equalsDeep(Base other_) { 4130 if (!super.equalsDeep(other_)) 4131 return false; 4132 if (!(other_ instanceof BundleEntryRequestComponent)) 4133 return false; 4134 BundleEntryRequestComponent o = (BundleEntryRequestComponent) other_; 4135 return compareDeep(method, o.method, true) && compareDeep(url, o.url, true) && compareDeep(ifNoneMatch, o.ifNoneMatch, true) 4136 && compareDeep(ifModifiedSince, o.ifModifiedSince, true) && compareDeep(ifMatch, o.ifMatch, true) 4137 && compareDeep(ifNoneExist, o.ifNoneExist, true); 4138 } 4139 4140 @Override 4141 public boolean equalsShallow(Base other_) { 4142 if (!super.equalsShallow(other_)) 4143 return false; 4144 if (!(other_ instanceof BundleEntryRequestComponent)) 4145 return false; 4146 BundleEntryRequestComponent o = (BundleEntryRequestComponent) other_; 4147 return compareValues(method, o.method, true) && compareValues(url, o.url, true) && compareValues(ifNoneMatch, o.ifNoneMatch, true) 4148 && compareValues(ifModifiedSince, o.ifModifiedSince, true) && compareValues(ifMatch, o.ifMatch, true) 4149 && compareValues(ifNoneExist, o.ifNoneExist, true); 4150 } 4151 4152 public boolean isEmpty() { 4153 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(method, url, ifNoneMatch 4154 , ifModifiedSince, ifMatch, ifNoneExist); 4155 } 4156 4157 public String fhirType() { 4158 return "Bundle.entry.request"; 4159 4160 } 4161 4162 } 4163 4164 @Block() 4165 public static class BundleEntryResponseComponent extends BackboneElement implements IBaseBackboneElement { 4166 /** 4167 * The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code. 4168 */ 4169 @Child(name = "status", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) 4170 @Description(shortDefinition="Status response code (text optional)", formalDefinition="The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code." ) 4171 protected StringType status; 4172 4173 /** 4174 * The location header created by processing this operation, populated if the operation returns a location. 4175 */ 4176 @Child(name = "location", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) 4177 @Description(shortDefinition="The location (if the operation returns a location)", formalDefinition="The location header created by processing this operation, populated if the operation returns a location." ) 4178 protected UriType location; 4179 4180 /** 4181 * The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)). 4182 */ 4183 @Child(name = "etag", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 4184 @Description(shortDefinition="The Etag for the resource (if relevant)", formalDefinition="The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency))." ) 4185 protected StringType etag; 4186 4187 /** 4188 * The date/time that the resource was modified on the server. 4189 */ 4190 @Child(name = "lastModified", type = {InstantType.class}, order=4, min=0, max=1, modifier=false, summary=true) 4191 @Description(shortDefinition="Server's date time modified", formalDefinition="The date/time that the resource was modified on the server." ) 4192 protected InstantType lastModified; 4193 4194 /** 4195 * An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction. 4196 */ 4197 @Child(name = "outcome", type = {Resource.class}, order=5, min=0, max=1, modifier=false, summary=true) 4198 @Description(shortDefinition="OperationOutcome with hints and warnings (for batch/transaction)", formalDefinition="An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction." ) 4199 protected Resource outcome; 4200 4201 private static final long serialVersionUID = 923278008L; 4202 4203 /** 4204 * Constructor 4205 */ 4206 public BundleEntryResponseComponent() { 4207 super(); 4208 } 4209 4210 /** 4211 * Constructor 4212 */ 4213 public BundleEntryResponseComponent(String status) { 4214 super(); 4215 this.setStatus(status); 4216 } 4217 4218 /** 4219 * @return {@link #status} (The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 4220 */ 4221 public StringType getStatusElement() { 4222 if (this.status == null) 4223 if (Configuration.errorOnAutoCreate()) 4224 throw new Error("Attempt to auto-create BundleEntryResponseComponent.status"); 4225 else if (Configuration.doAutoCreate()) 4226 this.status = new StringType(); // bb 4227 return this.status; 4228 } 4229 4230 public boolean hasStatusElement() { 4231 return this.status != null && !this.status.isEmpty(); 4232 } 4233 4234 public boolean hasStatus() { 4235 return this.status != null && !this.status.isEmpty(); 4236 } 4237 4238 /** 4239 * @param value {@link #status} (The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 4240 */ 4241 public BundleEntryResponseComponent setStatusElement(StringType value) { 4242 this.status = value; 4243 return this; 4244 } 4245 4246 /** 4247 * @return The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code. 4248 */ 4249 public String getStatus() { 4250 return this.status == null ? null : this.status.getValue(); 4251 } 4252 4253 /** 4254 * @param value The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code. 4255 */ 4256 public BundleEntryResponseComponent setStatus(String value) { 4257 if (this.status == null) 4258 this.status = new StringType(); 4259 this.status.setValue(value); 4260 return this; 4261 } 4262 4263 /** 4264 * @return {@link #location} (The location header created by processing this operation, populated if the operation returns a location.). This is the underlying object with id, value and extensions. The accessor "getLocation" gives direct access to the value 4265 */ 4266 public UriType getLocationElement() { 4267 if (this.location == null) 4268 if (Configuration.errorOnAutoCreate()) 4269 throw new Error("Attempt to auto-create BundleEntryResponseComponent.location"); 4270 else if (Configuration.doAutoCreate()) 4271 this.location = new UriType(); // bb 4272 return this.location; 4273 } 4274 4275 public boolean hasLocationElement() { 4276 return this.location != null && !this.location.isEmpty(); 4277 } 4278 4279 public boolean hasLocation() { 4280 return this.location != null && !this.location.isEmpty(); 4281 } 4282 4283 /** 4284 * @param value {@link #location} (The location header created by processing this operation, populated if the operation returns a location.). This is the underlying object with id, value and extensions. The accessor "getLocation" gives direct access to the value 4285 */ 4286 public BundleEntryResponseComponent setLocationElement(UriType value) { 4287 this.location = value; 4288 return this; 4289 } 4290 4291 /** 4292 * @return The location header created by processing this operation, populated if the operation returns a location. 4293 */ 4294 public String getLocation() { 4295 return this.location == null ? null : this.location.getValue(); 4296 } 4297 4298 /** 4299 * @param value The location header created by processing this operation, populated if the operation returns a location. 4300 */ 4301 public BundleEntryResponseComponent setLocation(String value) { 4302 if (Utilities.noString(value)) 4303 this.location = null; 4304 else { 4305 if (this.location == null) 4306 this.location = new UriType(); 4307 this.location.setValue(value); 4308 } 4309 return this; 4310 } 4311 4312 /** 4313 * @return {@link #etag} (The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).). This is the underlying object with id, value and extensions. The accessor "getEtag" gives direct access to the value 4314 */ 4315 public StringType getEtagElement() { 4316 if (this.etag == null) 4317 if (Configuration.errorOnAutoCreate()) 4318 throw new Error("Attempt to auto-create BundleEntryResponseComponent.etag"); 4319 else if (Configuration.doAutoCreate()) 4320 this.etag = new StringType(); // bb 4321 return this.etag; 4322 } 4323 4324 public boolean hasEtagElement() { 4325 return this.etag != null && !this.etag.isEmpty(); 4326 } 4327 4328 public boolean hasEtag() { 4329 return this.etag != null && !this.etag.isEmpty(); 4330 } 4331 4332 /** 4333 * @param value {@link #etag} (The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).). This is the underlying object with id, value and extensions. The accessor "getEtag" gives direct access to the value 4334 */ 4335 public BundleEntryResponseComponent setEtagElement(StringType value) { 4336 this.etag = value; 4337 return this; 4338 } 4339 4340 /** 4341 * @return The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)). 4342 */ 4343 public String getEtag() { 4344 return this.etag == null ? null : this.etag.getValue(); 4345 } 4346 4347 /** 4348 * @param value The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)). 4349 */ 4350 public BundleEntryResponseComponent setEtag(String value) { 4351 if (Utilities.noString(value)) 4352 this.etag = null; 4353 else { 4354 if (this.etag == null) 4355 this.etag = new StringType(); 4356 this.etag.setValue(value); 4357 } 4358 return this; 4359 } 4360 4361 /** 4362 * @return {@link #lastModified} (The date/time that the resource was modified on the server.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value 4363 */ 4364 public InstantType getLastModifiedElement() { 4365 if (this.lastModified == null) 4366 if (Configuration.errorOnAutoCreate()) 4367 throw new Error("Attempt to auto-create BundleEntryResponseComponent.lastModified"); 4368 else if (Configuration.doAutoCreate()) 4369 this.lastModified = new InstantType(); // bb 4370 return this.lastModified; 4371 } 4372 4373 public boolean hasLastModifiedElement() { 4374 return this.lastModified != null && !this.lastModified.isEmpty(); 4375 } 4376 4377 public boolean hasLastModified() { 4378 return this.lastModified != null && !this.lastModified.isEmpty(); 4379 } 4380 4381 /** 4382 * @param value {@link #lastModified} (The date/time that the resource was modified on the server.). This is the underlying object with id, value and extensions. The accessor "getLastModified" gives direct access to the value 4383 */ 4384 public BundleEntryResponseComponent setLastModifiedElement(InstantType value) { 4385 this.lastModified = value; 4386 return this; 4387 } 4388 4389 /** 4390 * @return The date/time that the resource was modified on the server. 4391 */ 4392 public Date getLastModified() { 4393 return this.lastModified == null ? null : this.lastModified.getValue(); 4394 } 4395 4396 /** 4397 * @param value The date/time that the resource was modified on the server. 4398 */ 4399 public BundleEntryResponseComponent setLastModified(Date value) { 4400 if (value == null) 4401 this.lastModified = null; 4402 else { 4403 if (this.lastModified == null) 4404 this.lastModified = new InstantType(); 4405 this.lastModified.setValue(value); 4406 } 4407 return this; 4408 } 4409 4410 /** 4411 * @return {@link #outcome} (An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.) 4412 */ 4413 public Resource getOutcome() { 4414 return this.outcome; 4415 } 4416 4417 public boolean hasOutcome() { 4418 return this.outcome != null && !this.outcome.isEmpty(); 4419 } 4420 4421 /** 4422 * @param value {@link #outcome} (An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.) 4423 */ 4424 public BundleEntryResponseComponent setOutcome(Resource value) { 4425 this.outcome = value; 4426 return this; 4427 } 4428 4429 protected void listChildren(List<Property> children) { 4430 super.listChildren(children); 4431 children.add(new Property("status", "string", "The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code.", 0, 1, status)); 4432 children.add(new Property("location", "uri", "The location header created by processing this operation, populated if the operation returns a location.", 0, 1, location)); 4433 children.add(new Property("etag", "string", "The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).", 0, 1, etag)); 4434 children.add(new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, 1, lastModified)); 4435 children.add(new Property("outcome", "Resource", "An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.", 0, 1, outcome)); 4436 } 4437 4438 @Override 4439 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4440 switch (_hash) { 4441 case -892481550: /*status*/ return new Property("status", "string", "The status code returned by processing this entry. The status SHALL start with a 3 digit HTTP code (e.g. 404) and may contain the standard HTTP description associated with the status code.", 0, 1, status); 4442 case 1901043637: /*location*/ return new Property("location", "uri", "The location header created by processing this operation, populated if the operation returns a location.", 0, 1, location); 4443 case 3123477: /*etag*/ return new Property("etag", "string", "The Etag for the resource, if the operation for the entry produced a versioned resource (see [Resource Metadata and Versioning](http.html#versioning) and [Managing Resource Contention](http.html#concurrency)).", 0, 1, etag); 4444 case 1959003007: /*lastModified*/ return new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, 1, lastModified); 4445 case -1106507950: /*outcome*/ return new Property("outcome", "Resource", "An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.", 0, 1, outcome); 4446 default: return super.getNamedProperty(_hash, _name, _checkValid); 4447 } 4448 4449 } 4450 4451 @Override 4452 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4453 switch (hash) { 4454 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // StringType 4455 case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // UriType 4456 case 3123477: /*etag*/ return this.etag == null ? new Base[0] : new Base[] {this.etag}; // StringType 4457 case 1959003007: /*lastModified*/ return this.lastModified == null ? new Base[0] : new Base[] {this.lastModified}; // InstantType 4458 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Resource 4459 default: return super.getProperty(hash, name, checkValid); 4460 } 4461 4462 } 4463 4464 @Override 4465 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4466 switch (hash) { 4467 case -892481550: // status 4468 this.status = TypeConvertor.castToString(value); // StringType 4469 return value; 4470 case 1901043637: // location 4471 this.location = TypeConvertor.castToUri(value); // UriType 4472 return value; 4473 case 3123477: // etag 4474 this.etag = TypeConvertor.castToString(value); // StringType 4475 return value; 4476 case 1959003007: // lastModified 4477 this.lastModified = TypeConvertor.castToInstant(value); // InstantType 4478 return value; 4479 case -1106507950: // outcome 4480 this.outcome = TypeConvertor.castToResource(value); // Resource 4481 return value; 4482 default: return super.setProperty(hash, name, value); 4483 } 4484 4485 } 4486 4487 @Override 4488 public Base setProperty(String name, Base value) throws FHIRException { 4489 if (name.equals("status")) { 4490 this.status = TypeConvertor.castToString(value); // StringType 4491 } else if (name.equals("location")) { 4492 this.location = TypeConvertor.castToUri(value); // UriType 4493 } else if (name.equals("etag")) { 4494 this.etag = TypeConvertor.castToString(value); // StringType 4495 } else if (name.equals("lastModified")) { 4496 this.lastModified = TypeConvertor.castToInstant(value); // InstantType 4497 } else if (name.equals("outcome")) { 4498 this.outcome = TypeConvertor.castToResource(value); // Resource 4499 } else 4500 return super.setProperty(name, value); 4501 return value; 4502 } 4503 4504 @Override 4505 public void removeChild(String name, Base value) throws FHIRException { 4506 if (name.equals("status")) { 4507 this.status = null; 4508 } else if (name.equals("location")) { 4509 this.location = null; 4510 } else if (name.equals("etag")) { 4511 this.etag = null; 4512 } else if (name.equals("lastModified")) { 4513 this.lastModified = null; 4514 } else if (name.equals("outcome")) { 4515 this.outcome = null; 4516 } else 4517 super.removeChild(name, value); 4518 4519 } 4520 4521 @Override 4522 public Base makeProperty(int hash, String name) throws FHIRException { 4523 switch (hash) { 4524 case -892481550: return getStatusElement(); 4525 case 1901043637: return getLocationElement(); 4526 case 3123477: return getEtagElement(); 4527 case 1959003007: return getLastModifiedElement(); 4528 case -1106507950: throw new FHIRException("Cannot make property outcome as it is not a complex type"); // Resource 4529 default: return super.makeProperty(hash, name); 4530 } 4531 4532 } 4533 4534 @Override 4535 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4536 switch (hash) { 4537 case -892481550: /*status*/ return new String[] {"string"}; 4538 case 1901043637: /*location*/ return new String[] {"uri"}; 4539 case 3123477: /*etag*/ return new String[] {"string"}; 4540 case 1959003007: /*lastModified*/ return new String[] {"instant"}; 4541 case -1106507950: /*outcome*/ return new String[] {"Resource"}; 4542 default: return super.getTypesForProperty(hash, name); 4543 } 4544 4545 } 4546 4547 @Override 4548 public Base addChild(String name) throws FHIRException { 4549 if (name.equals("status")) { 4550 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.response.status"); 4551 } 4552 else if (name.equals("location")) { 4553 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.response.location"); 4554 } 4555 else if (name.equals("etag")) { 4556 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.response.etag"); 4557 } 4558 else if (name.equals("lastModified")) { 4559 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.response.lastModified"); 4560 } 4561 else if (name.equals("outcome")) { 4562 throw new FHIRException("Cannot call addChild on an abstract type Bundle.entry.response.outcome"); 4563 } 4564 else 4565 return super.addChild(name); 4566 } 4567 4568 public BundleEntryResponseComponent copy() { 4569 BundleEntryResponseComponent dst = new BundleEntryResponseComponent(); 4570 copyValues(dst); 4571 return dst; 4572 } 4573 4574 public void copyValues(BundleEntryResponseComponent dst) { 4575 super.copyValues(dst); 4576 dst.status = status == null ? null : status.copy(); 4577 dst.location = location == null ? null : location.copy(); 4578 dst.etag = etag == null ? null : etag.copy(); 4579 dst.lastModified = lastModified == null ? null : lastModified.copy(); 4580 dst.outcome = outcome == null ? null : outcome.copy(); 4581 } 4582 4583 @Override 4584 public boolean equalsDeep(Base other_) { 4585 if (!super.equalsDeep(other_)) 4586 return false; 4587 if (!(other_ instanceof BundleEntryResponseComponent)) 4588 return false; 4589 BundleEntryResponseComponent o = (BundleEntryResponseComponent) other_; 4590 return compareDeep(status, o.status, true) && compareDeep(location, o.location, true) && compareDeep(etag, o.etag, true) 4591 && compareDeep(lastModified, o.lastModified, true) && compareDeep(outcome, o.outcome, true); 4592 } 4593 4594 @Override 4595 public boolean equalsShallow(Base other_) { 4596 if (!super.equalsShallow(other_)) 4597 return false; 4598 if (!(other_ instanceof BundleEntryResponseComponent)) 4599 return false; 4600 BundleEntryResponseComponent o = (BundleEntryResponseComponent) other_; 4601 return compareValues(status, o.status, true) && compareValues(location, o.location, true) && compareValues(etag, o.etag, true) 4602 && compareValues(lastModified, o.lastModified, true); 4603 } 4604 4605 public boolean isEmpty() { 4606 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(status, location, etag, lastModified 4607 , outcome); 4608 } 4609 4610 public String fhirType() { 4611 return "Bundle.entry.response"; 4612 4613 } 4614 4615 } 4616 4617 /** 4618 * A persistent identifier for the bundle that won't change as a bundle is copied from server to server. 4619 */ 4620 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) 4621 @Description(shortDefinition="Persistent identifier for the bundle", formalDefinition="A persistent identifier for the bundle that won't change as a bundle is copied from server to server." ) 4622 protected Identifier identifier; 4623 4624 /** 4625 * Indicates the purpose of this bundle - how it is intended to be used. 4626 */ 4627 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 4628 @Description(shortDefinition="document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection | subscription-notification", formalDefinition="Indicates the purpose of this bundle - how it is intended to be used." ) 4629 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/bundle-type") 4630 protected Enumeration<BundleType> type; 4631 4632 /** 4633 * The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle. 4634 */ 4635 @Child(name = "timestamp", type = {InstantType.class}, order=2, min=0, max=1, modifier=false, summary=true) 4636 @Description(shortDefinition="When the bundle was assembled", formalDefinition="The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle." ) 4637 protected InstantType timestamp; 4638 4639 /** 4640 * If a set of search matches, this is the (potentially estimated) total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle. 4641 */ 4642 @Child(name = "total", type = {UnsignedIntType.class}, order=3, min=0, max=1, modifier=false, summary=true) 4643 @Description(shortDefinition="If search, the total number of matches", formalDefinition="If a set of search matches, this is the (potentially estimated) total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle." ) 4644 protected UnsignedIntType total; 4645 4646 /** 4647 * A series of links that provide context to this bundle. 4648 */ 4649 @Child(name = "link", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4650 @Description(shortDefinition="Links related to this Bundle", formalDefinition="A series of links that provide context to this bundle." ) 4651 protected List<BundleLinkComponent> link; 4652 4653 /** 4654 * An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only). 4655 */ 4656 @Child(name = "entry", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4657 @Description(shortDefinition="Entry in the bundle - will have a resource or information", formalDefinition="An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only)." ) 4658 protected List<BundleEntryComponent> entry; 4659 4660 /** 4661 * Digital Signature - base64 encoded. XML-DSig or a JWS. 4662 */ 4663 @Child(name = "signature", type = {Signature.class}, order=6, min=0, max=1, modifier=false, summary=true) 4664 @Description(shortDefinition="Digital Signature", formalDefinition="Digital Signature - base64 encoded. XML-DSig or a JWS." ) 4665 protected Signature signature; 4666 4667 /** 4668 * Captures issues and warnings that relate to the construction of the Bundle and the content within it. 4669 */ 4670 @Child(name = "issues", type = {Resource.class}, order=7, min=0, max=1, modifier=false, summary=true) 4671 @Description(shortDefinition="Issues with the Bundle", formalDefinition="Captures issues and warnings that relate to the construction of the Bundle and the content within it." ) 4672 protected Resource issues; 4673 4674 private static final long serialVersionUID = -843739668L; 4675 4676 /** 4677 * Constructor 4678 */ 4679 public Bundle() { 4680 super(); 4681 } 4682 4683 /** 4684 * Constructor 4685 */ 4686 public Bundle(BundleType type) { 4687 super(); 4688 this.setType(type); 4689 } 4690 4691 /** 4692 * @return {@link #identifier} (A persistent identifier for the bundle that won't change as a bundle is copied from server to server.) 4693 */ 4694 public Identifier getIdentifier() { 4695 if (this.identifier == null) 4696 if (Configuration.errorOnAutoCreate()) 4697 throw new Error("Attempt to auto-create Bundle.identifier"); 4698 else if (Configuration.doAutoCreate()) 4699 this.identifier = new Identifier(); // cc 4700 return this.identifier; 4701 } 4702 4703 public boolean hasIdentifier() { 4704 return this.identifier != null && !this.identifier.isEmpty(); 4705 } 4706 4707 /** 4708 * @param value {@link #identifier} (A persistent identifier for the bundle that won't change as a bundle is copied from server to server.) 4709 */ 4710 public Bundle setIdentifier(Identifier value) { 4711 this.identifier = value; 4712 return this; 4713 } 4714 4715 /** 4716 * @return {@link #type} (Indicates the purpose of this bundle - how it is intended to be used.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 4717 */ 4718 public Enumeration<BundleType> getTypeElement() { 4719 if (this.type == null) 4720 if (Configuration.errorOnAutoCreate()) 4721 throw new Error("Attempt to auto-create Bundle.type"); 4722 else if (Configuration.doAutoCreate()) 4723 this.type = new Enumeration<BundleType>(new BundleTypeEnumFactory()); // bb 4724 return this.type; 4725 } 4726 4727 public boolean hasTypeElement() { 4728 return this.type != null && !this.type.isEmpty(); 4729 } 4730 4731 public boolean hasType() { 4732 return this.type != null && !this.type.isEmpty(); 4733 } 4734 4735 /** 4736 * @param value {@link #type} (Indicates the purpose of this bundle - how it is intended to be used.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 4737 */ 4738 public Bundle setTypeElement(Enumeration<BundleType> value) { 4739 this.type = value; 4740 return this; 4741 } 4742 4743 /** 4744 * @return Indicates the purpose of this bundle - how it is intended to be used. 4745 */ 4746 public BundleType getType() { 4747 return this.type == null ? null : this.type.getValue(); 4748 } 4749 4750 /** 4751 * @param value Indicates the purpose of this bundle - how it is intended to be used. 4752 */ 4753 public Bundle setType(BundleType value) { 4754 if (this.type == null) 4755 this.type = new Enumeration<BundleType>(new BundleTypeEnumFactory()); 4756 this.type.setValue(value); 4757 return this; 4758 } 4759 4760 /** 4761 * @return {@link #timestamp} (The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value 4762 */ 4763 public InstantType getTimestampElement() { 4764 if (this.timestamp == null) 4765 if (Configuration.errorOnAutoCreate()) 4766 throw new Error("Attempt to auto-create Bundle.timestamp"); 4767 else if (Configuration.doAutoCreate()) 4768 this.timestamp = new InstantType(); // bb 4769 return this.timestamp; 4770 } 4771 4772 public boolean hasTimestampElement() { 4773 return this.timestamp != null && !this.timestamp.isEmpty(); 4774 } 4775 4776 public boolean hasTimestamp() { 4777 return this.timestamp != null && !this.timestamp.isEmpty(); 4778 } 4779 4780 /** 4781 * @param value {@link #timestamp} (The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value 4782 */ 4783 public Bundle setTimestampElement(InstantType value) { 4784 this.timestamp = value; 4785 return this; 4786 } 4787 4788 /** 4789 * @return The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle. 4790 */ 4791 public Date getTimestamp() { 4792 return this.timestamp == null ? null : this.timestamp.getValue(); 4793 } 4794 4795 /** 4796 * @param value The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle. 4797 */ 4798 public Bundle setTimestamp(Date value) { 4799 if (value == null) 4800 this.timestamp = null; 4801 else { 4802 if (this.timestamp == null) 4803 this.timestamp = new InstantType(); 4804 this.timestamp.setValue(value); 4805 } 4806 return this; 4807 } 4808 4809 /** 4810 * @return {@link #total} (If a set of search matches, this is the (potentially estimated) total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value 4811 */ 4812 public UnsignedIntType getTotalElement() { 4813 if (this.total == null) 4814 if (Configuration.errorOnAutoCreate()) 4815 throw new Error("Attempt to auto-create Bundle.total"); 4816 else if (Configuration.doAutoCreate()) 4817 this.total = new UnsignedIntType(); // bb 4818 return this.total; 4819 } 4820 4821 public boolean hasTotalElement() { 4822 return this.total != null && !this.total.isEmpty(); 4823 } 4824 4825 public boolean hasTotal() { 4826 return this.total != null && !this.total.isEmpty(); 4827 } 4828 4829 /** 4830 * @param value {@link #total} (If a set of search matches, this is the (potentially estimated) total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value 4831 */ 4832 public Bundle setTotalElement(UnsignedIntType value) { 4833 this.total = value; 4834 return this; 4835 } 4836 4837 /** 4838 * @return If a set of search matches, this is the (potentially estimated) total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle. 4839 */ 4840 public int getTotal() { 4841 return this.total == null || this.total.isEmpty() ? 0 : this.total.getValue(); 4842 } 4843 4844 /** 4845 * @param value If a set of search matches, this is the (potentially estimated) total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle. 4846 */ 4847 public Bundle setTotal(int value) { 4848 if (this.total == null) 4849 this.total = new UnsignedIntType(); 4850 this.total.setValue(value); 4851 return this; 4852 } 4853 4854 /** 4855 * @return {@link #link} (A series of links that provide context to this bundle.) 4856 */ 4857 public List<BundleLinkComponent> getLink() { 4858 if (this.link == null) 4859 this.link = new ArrayList<BundleLinkComponent>(); 4860 return this.link; 4861 } 4862 4863 /** 4864 * @return Returns a reference to <code>this</code> for easy method chaining 4865 */ 4866 public Bundle setLink(List<BundleLinkComponent> theLink) { 4867 this.link = theLink; 4868 return this; 4869 } 4870 4871 public boolean hasLink() { 4872 if (this.link == null) 4873 return false; 4874 for (BundleLinkComponent item : this.link) 4875 if (!item.isEmpty()) 4876 return true; 4877 return false; 4878 } 4879 4880 public BundleLinkComponent addLink() { //3 4881 BundleLinkComponent t = new BundleLinkComponent(); 4882 if (this.link == null) 4883 this.link = new ArrayList<BundleLinkComponent>(); 4884 this.link.add(t); 4885 return t; 4886 } 4887 4888 public Bundle addLink(BundleLinkComponent t) { //3 4889 if (t == null) 4890 return this; 4891 if (this.link == null) 4892 this.link = new ArrayList<BundleLinkComponent>(); 4893 this.link.add(t); 4894 return this; 4895 } 4896 4897 /** 4898 * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist {3} 4899 */ 4900 public BundleLinkComponent getLinkFirstRep() { 4901 if (getLink().isEmpty()) { 4902 addLink(); 4903 } 4904 return getLink().get(0); 4905 } 4906 4907 /** 4908 * @return {@link #entry} (An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).) 4909 */ 4910 public List<BundleEntryComponent> getEntry() { 4911 if (this.entry == null) 4912 this.entry = new ArrayList<BundleEntryComponent>(); 4913 return this.entry; 4914 } 4915 4916 /** 4917 * @return Returns a reference to <code>this</code> for easy method chaining 4918 */ 4919 public Bundle setEntry(List<BundleEntryComponent> theEntry) { 4920 this.entry = theEntry; 4921 return this; 4922 } 4923 4924 public boolean hasEntry() { 4925 if (this.entry == null) 4926 return false; 4927 for (BundleEntryComponent item : this.entry) 4928 if (!item.isEmpty()) 4929 return true; 4930 return false; 4931 } 4932 4933 public BundleEntryComponent addEntry() { //3 4934 BundleEntryComponent t = new BundleEntryComponent(); 4935 if (this.entry == null) 4936 this.entry = new ArrayList<BundleEntryComponent>(); 4937 this.entry.add(t); 4938 return t; 4939 } 4940 4941 public Bundle addEntry(BundleEntryComponent t) { //3 4942 if (t == null) 4943 return this; 4944 if (this.entry == null) 4945 this.entry = new ArrayList<BundleEntryComponent>(); 4946 this.entry.add(t); 4947 return this; 4948 } 4949 4950 /** 4951 * @return The first repetition of repeating field {@link #entry}, creating it if it does not already exist {3} 4952 */ 4953 public BundleEntryComponent getEntryFirstRep() { 4954 if (getEntry().isEmpty()) { 4955 addEntry(); 4956 } 4957 return getEntry().get(0); 4958 } 4959 4960 /** 4961 * @return {@link #signature} (Digital Signature - base64 encoded. XML-DSig or a JWS.) 4962 */ 4963 public Signature getSignature() { 4964 if (this.signature == null) 4965 if (Configuration.errorOnAutoCreate()) 4966 throw new Error("Attempt to auto-create Bundle.signature"); 4967 else if (Configuration.doAutoCreate()) 4968 this.signature = new Signature(); // cc 4969 return this.signature; 4970 } 4971 4972 public boolean hasSignature() { 4973 return this.signature != null && !this.signature.isEmpty(); 4974 } 4975 4976 /** 4977 * @param value {@link #signature} (Digital Signature - base64 encoded. XML-DSig or a JWS.) 4978 */ 4979 public Bundle setSignature(Signature value) { 4980 this.signature = value; 4981 return this; 4982 } 4983 4984 /** 4985 * @return {@link #issues} (Captures issues and warnings that relate to the construction of the Bundle and the content within it.) 4986 */ 4987 public Resource getIssues() { 4988 return this.issues; 4989 } 4990 4991 public boolean hasIssues() { 4992 return this.issues != null && !this.issues.isEmpty(); 4993 } 4994 4995 /** 4996 * @param value {@link #issues} (Captures issues and warnings that relate to the construction of the Bundle and the content within it.) 4997 */ 4998 public Bundle setIssues(Resource value) { 4999 this.issues = value; 5000 return this; 5001 } 5002 5003 protected void listChildren(List<Property> children) { 5004 super.listChildren(children); 5005 children.add(new Property("identifier", "Identifier", "A persistent identifier for the bundle that won't change as a bundle is copied from server to server.", 0, 1, identifier)); 5006 children.add(new Property("type", "code", "Indicates the purpose of this bundle - how it is intended to be used.", 0, 1, type)); 5007 children.add(new Property("timestamp", "instant", "The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.", 0, 1, timestamp)); 5008 children.add(new Property("total", "unsignedInt", "If a set of search matches, this is the (potentially estimated) total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.", 0, 1, total)); 5009 children.add(new Property("link", "", "A series of links that provide context to this bundle.", 0, java.lang.Integer.MAX_VALUE, link)); 5010 children.add(new Property("entry", "", "An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).", 0, java.lang.Integer.MAX_VALUE, entry)); 5011 children.add(new Property("signature", "Signature", "Digital Signature - base64 encoded. XML-DSig or a JWS.", 0, 1, signature)); 5012 children.add(new Property("issues", "Resource", "Captures issues and warnings that relate to the construction of the Bundle and the content within it.", 0, 1, issues)); 5013 } 5014 5015 @Override 5016 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5017 switch (_hash) { 5018 case -1618432855: /*identifier*/ return new Property("identifier", "Identifier", "A persistent identifier for the bundle that won't change as a bundle is copied from server to server.", 0, 1, identifier); 5019 case 3575610: /*type*/ return new Property("type", "code", "Indicates the purpose of this bundle - how it is intended to be used.", 0, 1, type); 5020 case 55126294: /*timestamp*/ return new Property("timestamp", "instant", "The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.", 0, 1, timestamp); 5021 case 110549828: /*total*/ return new Property("total", "unsignedInt", "If a set of search matches, this is the (potentially estimated) total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.", 0, 1, total); 5022 case 3321850: /*link*/ return new Property("link", "", "A series of links that provide context to this bundle.", 0, java.lang.Integer.MAX_VALUE, link); 5023 case 96667762: /*entry*/ return new Property("entry", "", "An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).", 0, java.lang.Integer.MAX_VALUE, entry); 5024 case 1073584312: /*signature*/ return new Property("signature", "Signature", "Digital Signature - base64 encoded. XML-DSig or a JWS.", 0, 1, signature); 5025 case -1179159878: /*issues*/ return new Property("issues", "Resource", "Captures issues and warnings that relate to the construction of the Bundle and the content within it.", 0, 1, issues); 5026 default: return super.getNamedProperty(_hash, _name, _checkValid); 5027 } 5028 5029 } 5030 5031 @Override 5032 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5033 switch (hash) { 5034 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 5035 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<BundleType> 5036 case 55126294: /*timestamp*/ return this.timestamp == null ? new Base[0] : new Base[] {this.timestamp}; // InstantType 5037 case 110549828: /*total*/ return this.total == null ? new Base[0] : new Base[] {this.total}; // UnsignedIntType 5038 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // BundleLinkComponent 5039 case 96667762: /*entry*/ return this.entry == null ? new Base[0] : this.entry.toArray(new Base[this.entry.size()]); // BundleEntryComponent 5040 case 1073584312: /*signature*/ return this.signature == null ? new Base[0] : new Base[] {this.signature}; // Signature 5041 case -1179159878: /*issues*/ return this.issues == null ? new Base[0] : new Base[] {this.issues}; // Resource 5042 default: return super.getProperty(hash, name, checkValid); 5043 } 5044 5045 } 5046 5047 @Override 5048 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5049 switch (hash) { 5050 case -1618432855: // identifier 5051 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 5052 return value; 5053 case 3575610: // type 5054 value = new BundleTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 5055 this.type = (Enumeration) value; // Enumeration<BundleType> 5056 return value; 5057 case 55126294: // timestamp 5058 this.timestamp = TypeConvertor.castToInstant(value); // InstantType 5059 return value; 5060 case 110549828: // total 5061 this.total = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType 5062 return value; 5063 case 3321850: // link 5064 this.getLink().add((BundleLinkComponent) value); // BundleLinkComponent 5065 return value; 5066 case 96667762: // entry 5067 this.getEntry().add((BundleEntryComponent) value); // BundleEntryComponent 5068 return value; 5069 case 1073584312: // signature 5070 this.signature = TypeConvertor.castToSignature(value); // Signature 5071 return value; 5072 case -1179159878: // issues 5073 this.issues = TypeConvertor.castToResource(value); // Resource 5074 return value; 5075 default: return super.setProperty(hash, name, value); 5076 } 5077 5078 } 5079 5080 @Override 5081 public Base setProperty(String name, Base value) throws FHIRException { 5082 if (name.equals("identifier")) { 5083 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 5084 } else if (name.equals("type")) { 5085 value = new BundleTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 5086 this.type = (Enumeration) value; // Enumeration<BundleType> 5087 } else if (name.equals("timestamp")) { 5088 this.timestamp = TypeConvertor.castToInstant(value); // InstantType 5089 } else if (name.equals("total")) { 5090 this.total = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType 5091 } else if (name.equals("link")) { 5092 this.getLink().add((BundleLinkComponent) value); 5093 } else if (name.equals("entry")) { 5094 this.getEntry().add((BundleEntryComponent) value); 5095 } else if (name.equals("signature")) { 5096 this.signature = TypeConvertor.castToSignature(value); // Signature 5097 } else if (name.equals("issues")) { 5098 this.issues = TypeConvertor.castToResource(value); // Resource 5099 } else 5100 return super.setProperty(name, value); 5101 return value; 5102 } 5103 5104 @Override 5105 public void removeChild(String name, Base value) throws FHIRException { 5106 if (name.equals("identifier")) { 5107 this.identifier = null; 5108 } else if (name.equals("type")) { 5109 value = new BundleTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 5110 this.type = (Enumeration) value; // Enumeration<BundleType> 5111 } else if (name.equals("timestamp")) { 5112 this.timestamp = null; 5113 } else if (name.equals("total")) { 5114 this.total = null; 5115 } else if (name.equals("link")) { 5116 this.getLink().remove((BundleLinkComponent) value); 5117 } else if (name.equals("entry")) { 5118 this.getEntry().remove((BundleEntryComponent) value); 5119 } else if (name.equals("signature")) { 5120 this.signature = null; 5121 } else if (name.equals("issues")) { 5122 this.issues = null; 5123 } else 5124 super.removeChild(name, value); 5125 5126 } 5127 5128 @Override 5129 public Base makeProperty(int hash, String name) throws FHIRException { 5130 switch (hash) { 5131 case -1618432855: return getIdentifier(); 5132 case 3575610: return getTypeElement(); 5133 case 55126294: return getTimestampElement(); 5134 case 110549828: return getTotalElement(); 5135 case 3321850: return addLink(); 5136 case 96667762: return addEntry(); 5137 case 1073584312: return getSignature(); 5138 case -1179159878: throw new FHIRException("Cannot make property issues as it is not a complex type"); // Resource 5139 default: return super.makeProperty(hash, name); 5140 } 5141 5142 } 5143 5144 @Override 5145 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5146 switch (hash) { 5147 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 5148 case 3575610: /*type*/ return new String[] {"code"}; 5149 case 55126294: /*timestamp*/ return new String[] {"instant"}; 5150 case 110549828: /*total*/ return new String[] {"unsignedInt"}; 5151 case 3321850: /*link*/ return new String[] {}; 5152 case 96667762: /*entry*/ return new String[] {}; 5153 case 1073584312: /*signature*/ return new String[] {"Signature"}; 5154 case -1179159878: /*issues*/ return new String[] {"Resource"}; 5155 default: return super.getTypesForProperty(hash, name); 5156 } 5157 5158 } 5159 5160 @Override 5161 public Base addChild(String name) throws FHIRException { 5162 if (name.equals("identifier")) { 5163 this.identifier = new Identifier(); 5164 return this.identifier; 5165 } 5166 else if (name.equals("type")) { 5167 throw new FHIRException("Cannot call addChild on a singleton property Bundle.type"); 5168 } 5169 else if (name.equals("timestamp")) { 5170 throw new FHIRException("Cannot call addChild on a singleton property Bundle.timestamp"); 5171 } 5172 else if (name.equals("total")) { 5173 throw new FHIRException("Cannot call addChild on a singleton property Bundle.total"); 5174 } 5175 else if (name.equals("link")) { 5176 return addLink(); 5177 } 5178 else if (name.equals("entry")) { 5179 return addEntry(); 5180 } 5181 else if (name.equals("signature")) { 5182 this.signature = new Signature(); 5183 return this.signature; 5184 } 5185 else if (name.equals("issues")) { 5186 throw new FHIRException("Cannot call addChild on an abstract type Bundle.issues"); 5187 } 5188 else 5189 return super.addChild(name); 5190 } 5191 5192 public String fhirType() { 5193 return "Bundle"; 5194 5195 } 5196 5197 public Bundle copy() { 5198 Bundle dst = new Bundle(); 5199 copyValues(dst); 5200 return dst; 5201 } 5202 5203 public void copyValues(Bundle dst) { 5204 super.copyValues(dst); 5205 dst.identifier = identifier == null ? null : identifier.copy(); 5206 dst.type = type == null ? null : type.copy(); 5207 dst.timestamp = timestamp == null ? null : timestamp.copy(); 5208 dst.total = total == null ? null : total.copy(); 5209 if (link != null) { 5210 dst.link = new ArrayList<BundleLinkComponent>(); 5211 for (BundleLinkComponent i : link) 5212 dst.link.add(i.copy()); 5213 }; 5214 if (entry != null) { 5215 dst.entry = new ArrayList<BundleEntryComponent>(); 5216 for (BundleEntryComponent i : entry) 5217 dst.entry.add(i.copy()); 5218 }; 5219 dst.signature = signature == null ? null : signature.copy(); 5220 dst.issues = issues == null ? null : issues.copy(); 5221 } 5222 5223 protected Bundle typedCopy() { 5224 return copy(); 5225 } 5226 5227 @Override 5228 public boolean equalsDeep(Base other_) { 5229 if (!super.equalsDeep(other_)) 5230 return false; 5231 if (!(other_ instanceof Bundle)) 5232 return false; 5233 Bundle o = (Bundle) other_; 5234 return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(timestamp, o.timestamp, true) 5235 && compareDeep(total, o.total, true) && compareDeep(link, o.link, true) && compareDeep(entry, o.entry, true) 5236 && compareDeep(signature, o.signature, true) && compareDeep(issues, o.issues, true); 5237 } 5238 5239 @Override 5240 public boolean equalsShallow(Base other_) { 5241 if (!super.equalsShallow(other_)) 5242 return false; 5243 if (!(other_ instanceof Bundle)) 5244 return false; 5245 Bundle o = (Bundle) other_; 5246 return compareValues(type, o.type, true) && compareValues(timestamp, o.timestamp, true) && compareValues(total, o.total, true) 5247 ; 5248 } 5249 5250 public boolean isEmpty() { 5251 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, timestamp 5252 , total, link, entry, signature, issues); 5253 } 5254 5255 @Override 5256 public ResourceType getResourceType() { 5257 return ResourceType.Bundle; 5258 } 5259 5260 /** 5261 * Search parameter: <b>composition</b> 5262 * <p> 5263 * Description: <b>The first resource in the bundle, if the bundle type is "document" - this is a composition, and this parameter provides access to search its contents</b><br> 5264 * Type: <b>reference</b><br> 5265 * Path: <b>Bundle.entry[0].resource as Composition</b><br> 5266 * </p> 5267 */ 5268 @SearchParamDefinition(name="composition", path="Bundle.entry[0].resource as Composition", description="The first resource in the bundle, if the bundle type is \"document\" - this is a composition, and this parameter provides access to search its contents", type="reference", target={Composition.class } ) 5269 public static final String SP_COMPOSITION = "composition"; 5270 /** 5271 * <b>Fluent Client</b> search parameter constant for <b>composition</b> 5272 * <p> 5273 * Description: <b>The first resource in the bundle, if the bundle type is "document" - this is a composition, and this parameter provides access to search its contents</b><br> 5274 * Type: <b>reference</b><br> 5275 * Path: <b>Bundle.entry[0].resource as Composition</b><br> 5276 * </p> 5277 */ 5278 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSITION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPOSITION); 5279 5280/** 5281 * Constant for fluent queries to be used to add include statements. Specifies 5282 * the path value of "<b>Bundle:composition</b>". 5283 */ 5284 public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSITION = new ca.uhn.fhir.model.api.Include("Bundle:composition").toLocked(); 5285 5286 /** 5287 * Search parameter: <b>identifier</b> 5288 * <p> 5289 * Description: <b>Persistent identifier for the bundle</b><br> 5290 * Type: <b>token</b><br> 5291 * Path: <b>Bundle.identifier</b><br> 5292 * </p> 5293 */ 5294 @SearchParamDefinition(name="identifier", path="Bundle.identifier", description="Persistent identifier for the bundle", type="token" ) 5295 public static final String SP_IDENTIFIER = "identifier"; 5296 /** 5297 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 5298 * <p> 5299 * Description: <b>Persistent identifier for the bundle</b><br> 5300 * Type: <b>token</b><br> 5301 * Path: <b>Bundle.identifier</b><br> 5302 * </p> 5303 */ 5304 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 5305 5306 /** 5307 * Search parameter: <b>message</b> 5308 * <p> 5309 * Description: <b>The first resource in the bundle, if the bundle type is "message" - this is a message header, and this parameter provides access to search its contents</b><br> 5310 * Type: <b>reference</b><br> 5311 * Path: <b>Bundle.entry[0].resource as MessageHeader</b><br> 5312 * </p> 5313 */ 5314 @SearchParamDefinition(name="message", path="Bundle.entry[0].resource as MessageHeader", description="The first resource in the bundle, if the bundle type is \"message\" - this is a message header, and this parameter provides access to search its contents", type="reference", target={MessageHeader.class } ) 5315 public static final String SP_MESSAGE = "message"; 5316 /** 5317 * <b>Fluent Client</b> search parameter constant for <b>message</b> 5318 * <p> 5319 * Description: <b>The first resource in the bundle, if the bundle type is "message" - this is a message header, and this parameter provides access to search its contents</b><br> 5320 * Type: <b>reference</b><br> 5321 * Path: <b>Bundle.entry[0].resource as MessageHeader</b><br> 5322 * </p> 5323 */ 5324 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MESSAGE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MESSAGE); 5325 5326/** 5327 * Constant for fluent queries to be used to add include statements. Specifies 5328 * the path value of "<b>Bundle:message</b>". 5329 */ 5330 public static final ca.uhn.fhir.model.api.Include INCLUDE_MESSAGE = new ca.uhn.fhir.model.api.Include("Bundle:message").toLocked(); 5331 5332 /** 5333 * Search parameter: <b>timestamp</b> 5334 * <p> 5335 * Description: <b>When the bundle was assembled</b><br> 5336 * Type: <b>date</b><br> 5337 * Path: <b>Bundle.timestamp</b><br> 5338 * </p> 5339 */ 5340 @SearchParamDefinition(name="timestamp", path="Bundle.timestamp", description="When the bundle was assembled", type="date" ) 5341 public static final String SP_TIMESTAMP = "timestamp"; 5342 /** 5343 * <b>Fluent Client</b> search parameter constant for <b>timestamp</b> 5344 * <p> 5345 * Description: <b>When the bundle was assembled</b><br> 5346 * Type: <b>date</b><br> 5347 * Path: <b>Bundle.timestamp</b><br> 5348 * </p> 5349 */ 5350 public static final ca.uhn.fhir.rest.gclient.DateClientParam TIMESTAMP = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_TIMESTAMP); 5351 5352 /** 5353 * Search parameter: <b>type</b> 5354 * <p> 5355 * Description: <b>document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection | subscription-notification</b><br> 5356 * Type: <b>token</b><br> 5357 * Path: <b>Bundle.type</b><br> 5358 * </p> 5359 */ 5360 @SearchParamDefinition(name="type", path="Bundle.type", description="document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection | subscription-notification", type="token" ) 5361 public static final String SP_TYPE = "type"; 5362 /** 5363 * <b>Fluent Client</b> search parameter constant for <b>type</b> 5364 * <p> 5365 * Description: <b>document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection | subscription-notification</b><br> 5366 * Type: <b>token</b><br> 5367 * Path: <b>Bundle.type</b><br> 5368 * </p> 5369 */ 5370 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 5371 5372 /** 5373 * Search parameter: <b>example-constraint</b> 5374 * <p> 5375 * Description: <b>Search Composition Bundle</b><br> 5376 * Type: <b>reference</b><br> 5377 * Path: <b>Bundle.entry[0].resource</b><br> 5378 * </p> 5379 */ 5380 @SearchParamDefinition(name="example-constraint", path="Bundle.entry[0].resource", description="Search Composition Bundle", type="reference", target={Composition.class } ) 5381 public static final String SP_EXAMPLE_CONSTRAINT = "example-constraint"; 5382 /** 5383 * <b>Fluent Client</b> search parameter constant for <b>example-constraint</b> 5384 * <p> 5385 * Description: <b>Search Composition Bundle</b><br> 5386 * Type: <b>reference</b><br> 5387 * Path: <b>Bundle.entry[0].resource</b><br> 5388 * </p> 5389 */ 5390 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam EXAMPLE_CONSTRAINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_EXAMPLE_CONSTRAINT); 5391 5392/** 5393 * Constant for fluent queries to be used to add include statements. Specifies 5394 * the path value of "<b>Bundle:example-constraint</b>". 5395 */ 5396 public static final ca.uhn.fhir.model.api.Include INCLUDE_EXAMPLE_CONSTRAINT = new ca.uhn.fhir.model.api.Include("Bundle:example-constraint").toLocked(); 5397 5398// Manual code (from Configuration.txt): 5399/** 5400 * Returns the {@link #getLink() link} which matches a given {@link BundleLinkComponent#getRelation() relation}. 5401 * If no link is found which matches the given relation, returns <code>null</code>. If more than one 5402 * link is found which matches the given relation, returns the first matching BundleLinkComponent. 5403 * 5404 * @param theRelation 5405 * The relation, such as \"next\", or \"self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}. 5406 * @return Returns a matching BundleLinkComponent, or <code>null</code> 5407 * @see IBaseBundle#LINK_NEXT 5408 * @see IBaseBundle#LINK_PREV 5409 * @see IBaseBundle#LINK_SELF 5410 */ 5411 public BundleLinkComponent getLink(String theRelation) { 5412 org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty"); 5413 for (BundleLinkComponent next : getLink()) { 5414 if (theRelation.equals(next.getRelation().toCode())) { 5415 return next; 5416 } 5417 } 5418 return null; 5419 } 5420 5421 /** 5422 * Returns the {@link #getLink() link} which matches a given {@link BundleLinkComponent#getRelation() relation}. 5423 * If no link is found which matches the given relation, creates a new BundleLinkComponent with the 5424 * given relation and adds it to this Bundle. If more than one 5425 * link is found which matches the given relation, returns the first matching BundleLinkComponent. 5426 * 5427 * @param theRelation 5428 * The relation, such as \"next\", or \"self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}. 5429 * @return Returns a matching BundleLinkComponent, or <code>null</code> 5430 * @see IBaseBundle#LINK_NEXT 5431 * @see IBaseBundle#LINK_PREV 5432 * @see IBaseBundle#LINK_SELF 5433 */ 5434 public BundleLinkComponent getLinkOrCreate(String theRelation) { 5435 org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty"); 5436 for (BundleLinkComponent next : getLink()) { 5437 if (theRelation.equals(next.getRelation().toCode())) { 5438 return next; 5439 } 5440 } 5441 BundleLinkComponent retVal = new BundleLinkComponent(); 5442 retVal.setRelation(LinkRelationTypes.fromCode(theRelation)); 5443 getLink().add(retVal); 5444 return retVal; 5445 } 5446// end addition 5447 5448} 5449