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 Base makeProperty(int hash, String name) throws FHIRException { 2718 switch (hash) { 2719 case -554436100: return getRelationElement(); 2720 case 116079: return getUrlElement(); 2721 default: return super.makeProperty(hash, name); 2722 } 2723 2724 } 2725 2726 @Override 2727 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2728 switch (hash) { 2729 case -554436100: /*relation*/ return new String[] {"code"}; 2730 case 116079: /*url*/ return new String[] {"uri"}; 2731 default: return super.getTypesForProperty(hash, name); 2732 } 2733 2734 } 2735 2736 @Override 2737 public Base addChild(String name) throws FHIRException { 2738 if (name.equals("relation")) { 2739 throw new FHIRException("Cannot call addChild on a singleton property Bundle.link.relation"); 2740 } 2741 else if (name.equals("url")) { 2742 throw new FHIRException("Cannot call addChild on a singleton property Bundle.link.url"); 2743 } 2744 else 2745 return super.addChild(name); 2746 } 2747 2748 public BundleLinkComponent copy() { 2749 BundleLinkComponent dst = new BundleLinkComponent(); 2750 copyValues(dst); 2751 return dst; 2752 } 2753 2754 public void copyValues(BundleLinkComponent dst) { 2755 super.copyValues(dst); 2756 dst.relation = relation == null ? null : relation.copy(); 2757 dst.url = url == null ? null : url.copy(); 2758 } 2759 2760 @Override 2761 public boolean equalsDeep(Base other_) { 2762 if (!super.equalsDeep(other_)) 2763 return false; 2764 if (!(other_ instanceof BundleLinkComponent)) 2765 return false; 2766 BundleLinkComponent o = (BundleLinkComponent) other_; 2767 return compareDeep(relation, o.relation, true) && compareDeep(url, o.url, true); 2768 } 2769 2770 @Override 2771 public boolean equalsShallow(Base other_) { 2772 if (!super.equalsShallow(other_)) 2773 return false; 2774 if (!(other_ instanceof BundleLinkComponent)) 2775 return false; 2776 BundleLinkComponent o = (BundleLinkComponent) other_; 2777 return compareValues(relation, o.relation, true) && compareValues(url, o.url, true); 2778 } 2779 2780 public boolean isEmpty() { 2781 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(relation, url); 2782 } 2783 2784 public String fhirType() { 2785 return "Bundle.link"; 2786 2787 } 2788 2789 } 2790 2791 @Block() 2792 public static class BundleEntryComponent extends BackboneElement implements IBaseBackboneElement { 2793 /** 2794 * A series of links that provide context to this entry. 2795 */ 2796 @Child(name = "link", type = {BundleLinkComponent.class}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2797 @Description(shortDefinition="Links related to this entry", formalDefinition="A series of links that provide context to this entry." ) 2798 protected List<BundleLinkComponent> link; 2799 2800 /** 2801 * 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: 2802* invoking a create 2803* invoking or responding to an operation where the body is not a single identified resource 2804* invoking or returning the results of a search or history operation. 2805 */ 2806 @Child(name = "fullUrl", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) 2807 @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." ) 2808 protected UriType fullUrl; 2809 2810 /** 2811 * 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. 2812 */ 2813 @Child(name = "resource", type = {Resource.class}, order=3, min=0, max=1, modifier=false, summary=true) 2814 @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." ) 2815 protected Resource resource; 2816 2817 /** 2818 * Information about the search process that lead to the creation of this entry. 2819 */ 2820 @Child(name = "search", type = {}, order=4, min=0, max=1, modifier=false, summary=true) 2821 @Description(shortDefinition="Search related information", formalDefinition="Information about the search process that lead to the creation of this entry." ) 2822 protected BundleEntrySearchComponent search; 2823 2824 /** 2825 * 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. 2826 */ 2827 @Child(name = "request", type = {}, order=5, min=0, max=1, modifier=false, summary=true) 2828 @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." ) 2829 protected BundleEntryRequestComponent request; 2830 2831 /** 2832 * 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. 2833 */ 2834 @Child(name = "response", type = {}, order=6, min=0, max=1, modifier=false, summary=true) 2835 @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." ) 2836 protected BundleEntryResponseComponent response; 2837 2838 private static final long serialVersionUID = 517783054L; 2839 2840 /** 2841 * Constructor 2842 */ 2843 public BundleEntryComponent() { 2844 super(); 2845 } 2846 2847 /** 2848 * @return {@link #link} (A series of links that provide context to this entry.) 2849 */ 2850 public List<BundleLinkComponent> getLink() { 2851 if (this.link == null) 2852 this.link = new ArrayList<BundleLinkComponent>(); 2853 return this.link; 2854 } 2855 2856 /** 2857 * @return Returns a reference to <code>this</code> for easy method chaining 2858 */ 2859 public BundleEntryComponent setLink(List<BundleLinkComponent> theLink) { 2860 this.link = theLink; 2861 return this; 2862 } 2863 2864 public boolean hasLink() { 2865 if (this.link == null) 2866 return false; 2867 for (BundleLinkComponent item : this.link) 2868 if (!item.isEmpty()) 2869 return true; 2870 return false; 2871 } 2872 2873 public BundleLinkComponent addLink() { //3 2874 BundleLinkComponent t = new BundleLinkComponent(); 2875 if (this.link == null) 2876 this.link = new ArrayList<BundleLinkComponent>(); 2877 this.link.add(t); 2878 return t; 2879 } 2880 2881 public BundleEntryComponent addLink(BundleLinkComponent t) { //3 2882 if (t == null) 2883 return this; 2884 if (this.link == null) 2885 this.link = new ArrayList<BundleLinkComponent>(); 2886 this.link.add(t); 2887 return this; 2888 } 2889 2890 /** 2891 * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist {3} 2892 */ 2893 public BundleLinkComponent getLinkFirstRep() { 2894 if (getLink().isEmpty()) { 2895 addLink(); 2896 } 2897 return getLink().get(0); 2898 } 2899 2900 /** 2901 * @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: 2902* invoking a create 2903* invoking or responding to an operation where the body is not a single identified resource 2904* 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 2905 */ 2906 public UriType getFullUrlElement() { 2907 if (this.fullUrl == null) 2908 if (Configuration.errorOnAutoCreate()) 2909 throw new Error("Attempt to auto-create BundleEntryComponent.fullUrl"); 2910 else if (Configuration.doAutoCreate()) 2911 this.fullUrl = new UriType(); // bb 2912 return this.fullUrl; 2913 } 2914 2915 public boolean hasFullUrlElement() { 2916 return this.fullUrl != null && !this.fullUrl.isEmpty(); 2917 } 2918 2919 public boolean hasFullUrl() { 2920 return this.fullUrl != null && !this.fullUrl.isEmpty(); 2921 } 2922 2923 /** 2924 * @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: 2925* invoking a create 2926* invoking or responding to an operation where the body is not a single identified resource 2927* 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 2928 */ 2929 public BundleEntryComponent setFullUrlElement(UriType value) { 2930 this.fullUrl = value; 2931 return this; 2932 } 2933 2934 /** 2935 * @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: 2936* invoking a create 2937* invoking or responding to an operation where the body is not a single identified resource 2938* invoking or returning the results of a search or history operation. 2939 */ 2940 public String getFullUrl() { 2941 return this.fullUrl == null ? null : this.fullUrl.getValue(); 2942 } 2943 2944 /** 2945 * @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: 2946* invoking a create 2947* invoking or responding to an operation where the body is not a single identified resource 2948* invoking or returning the results of a search or history operation. 2949 */ 2950 public BundleEntryComponent setFullUrl(String value) { 2951 if (Utilities.noString(value)) 2952 this.fullUrl = null; 2953 else { 2954 if (this.fullUrl == null) 2955 this.fullUrl = new UriType(); 2956 this.fullUrl.setValue(value); 2957 } 2958 return this; 2959 } 2960 2961 /** 2962 * @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.) 2963 */ 2964 public Resource getResource() { 2965 return this.resource; 2966 } 2967 2968 public boolean hasResource() { 2969 return this.resource != null && !this.resource.isEmpty(); 2970 } 2971 2972 /** 2973 * @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.) 2974 */ 2975 public BundleEntryComponent setResource(Resource value) { 2976 this.resource = value; 2977 return this; 2978 } 2979 2980 /** 2981 * @return {@link #search} (Information about the search process that lead to the creation of this entry.) 2982 */ 2983 public BundleEntrySearchComponent getSearch() { 2984 if (this.search == null) 2985 if (Configuration.errorOnAutoCreate()) 2986 throw new Error("Attempt to auto-create BundleEntryComponent.search"); 2987 else if (Configuration.doAutoCreate()) 2988 this.search = new BundleEntrySearchComponent(); // cc 2989 return this.search; 2990 } 2991 2992 public boolean hasSearch() { 2993 return this.search != null && !this.search.isEmpty(); 2994 } 2995 2996 /** 2997 * @param value {@link #search} (Information about the search process that lead to the creation of this entry.) 2998 */ 2999 public BundleEntryComponent setSearch(BundleEntrySearchComponent value) { 3000 this.search = value; 3001 return this; 3002 } 3003 3004 /** 3005 * @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.) 3006 */ 3007 public BundleEntryRequestComponent getRequest() { 3008 if (this.request == null) 3009 if (Configuration.errorOnAutoCreate()) 3010 throw new Error("Attempt to auto-create BundleEntryComponent.request"); 3011 else if (Configuration.doAutoCreate()) 3012 this.request = new BundleEntryRequestComponent(); // cc 3013 return this.request; 3014 } 3015 3016 public boolean hasRequest() { 3017 return this.request != null && !this.request.isEmpty(); 3018 } 3019 3020 /** 3021 * @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.) 3022 */ 3023 public BundleEntryComponent setRequest(BundleEntryRequestComponent value) { 3024 this.request = value; 3025 return this; 3026 } 3027 3028 /** 3029 * @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.) 3030 */ 3031 public BundleEntryResponseComponent getResponse() { 3032 if (this.response == null) 3033 if (Configuration.errorOnAutoCreate()) 3034 throw new Error("Attempt to auto-create BundleEntryComponent.response"); 3035 else if (Configuration.doAutoCreate()) 3036 this.response = new BundleEntryResponseComponent(); // cc 3037 return this.response; 3038 } 3039 3040 public boolean hasResponse() { 3041 return this.response != null && !this.response.isEmpty(); 3042 } 3043 3044 /** 3045 * @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.) 3046 */ 3047 public BundleEntryComponent setResponse(BundleEntryResponseComponent value) { 3048 this.response = value; 3049 return this; 3050 } 3051 3052 protected void listChildren(List<Property> children) { 3053 super.listChildren(children); 3054 children.add(new Property("link", "@Bundle.link", "A series of links that provide context to this entry.", 0, java.lang.Integer.MAX_VALUE, link)); 3055 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)); 3056 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)); 3057 children.add(new Property("search", "", "Information about the search process that lead to the creation of this entry.", 0, 1, search)); 3058 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)); 3059 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)); 3060 } 3061 3062 @Override 3063 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3064 switch (_hash) { 3065 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); 3066 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); 3067 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); 3068 case -906336856: /*search*/ return new Property("search", "", "Information about the search process that lead to the creation of this entry.", 0, 1, search); 3069 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); 3070 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); 3071 default: return super.getNamedProperty(_hash, _name, _checkValid); 3072 } 3073 3074 } 3075 3076 @Override 3077 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3078 switch (hash) { 3079 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // BundleLinkComponent 3080 case -511251360: /*fullUrl*/ return this.fullUrl == null ? new Base[0] : new Base[] {this.fullUrl}; // UriType 3081 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Resource 3082 case -906336856: /*search*/ return this.search == null ? new Base[0] : new Base[] {this.search}; // BundleEntrySearchComponent 3083 case 1095692943: /*request*/ return this.request == null ? new Base[0] : new Base[] {this.request}; // BundleEntryRequestComponent 3084 case -340323263: /*response*/ return this.response == null ? new Base[0] : new Base[] {this.response}; // BundleEntryResponseComponent 3085 default: return super.getProperty(hash, name, checkValid); 3086 } 3087 3088 } 3089 3090 @Override 3091 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3092 switch (hash) { 3093 case 3321850: // link 3094 this.getLink().add((BundleLinkComponent) value); // BundleLinkComponent 3095 return value; 3096 case -511251360: // fullUrl 3097 this.fullUrl = TypeConvertor.castToUri(value); // UriType 3098 return value; 3099 case -341064690: // resource 3100 this.resource = TypeConvertor.castToResource(value); // Resource 3101 return value; 3102 case -906336856: // search 3103 this.search = (BundleEntrySearchComponent) value; // BundleEntrySearchComponent 3104 return value; 3105 case 1095692943: // request 3106 this.request = (BundleEntryRequestComponent) value; // BundleEntryRequestComponent 3107 return value; 3108 case -340323263: // response 3109 this.response = (BundleEntryResponseComponent) value; // BundleEntryResponseComponent 3110 return value; 3111 default: return super.setProperty(hash, name, value); 3112 } 3113 3114 } 3115 3116 @Override 3117 public Base setProperty(String name, Base value) throws FHIRException { 3118 if (name.equals("link")) { 3119 this.getLink().add((BundleLinkComponent) value); 3120 } else if (name.equals("fullUrl")) { 3121 this.fullUrl = TypeConvertor.castToUri(value); // UriType 3122 } else if (name.equals("resource")) { 3123 this.resource = TypeConvertor.castToResource(value); // Resource 3124 } else if (name.equals("search")) { 3125 this.search = (BundleEntrySearchComponent) value; // BundleEntrySearchComponent 3126 } else if (name.equals("request")) { 3127 this.request = (BundleEntryRequestComponent) value; // BundleEntryRequestComponent 3128 } else if (name.equals("response")) { 3129 this.response = (BundleEntryResponseComponent) value; // BundleEntryResponseComponent 3130 } else 3131 return super.setProperty(name, value); 3132 return value; 3133 } 3134 3135 @Override 3136 public Base makeProperty(int hash, String name) throws FHIRException { 3137 switch (hash) { 3138 case 3321850: return addLink(); 3139 case -511251360: return getFullUrlElement(); 3140 case -341064690: throw new FHIRException("Cannot make property resource as it is not a complex type"); // Resource 3141 case -906336856: return getSearch(); 3142 case 1095692943: return getRequest(); 3143 case -340323263: return getResponse(); 3144 default: return super.makeProperty(hash, name); 3145 } 3146 3147 } 3148 3149 @Override 3150 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3151 switch (hash) { 3152 case 3321850: /*link*/ return new String[] {"@Bundle.link"}; 3153 case -511251360: /*fullUrl*/ return new String[] {"uri"}; 3154 case -341064690: /*resource*/ return new String[] {"Resource"}; 3155 case -906336856: /*search*/ return new String[] {}; 3156 case 1095692943: /*request*/ return new String[] {}; 3157 case -340323263: /*response*/ return new String[] {}; 3158 default: return super.getTypesForProperty(hash, name); 3159 } 3160 3161 } 3162 3163 @Override 3164 public Base addChild(String name) throws FHIRException { 3165 if (name.equals("link")) { 3166 return addLink(); 3167 } 3168 else if (name.equals("fullUrl")) { 3169 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.fullUrl"); 3170 } 3171 else if (name.equals("resource")) { 3172 throw new FHIRException("Cannot call addChild on an abstract type Bundle.entry.resource"); 3173 } 3174 else if (name.equals("search")) { 3175 this.search = new BundleEntrySearchComponent(); 3176 return this.search; 3177 } 3178 else if (name.equals("request")) { 3179 this.request = new BundleEntryRequestComponent(); 3180 return this.request; 3181 } 3182 else if (name.equals("response")) { 3183 this.response = new BundleEntryResponseComponent(); 3184 return this.response; 3185 } 3186 else 3187 return super.addChild(name); 3188 } 3189 3190 public BundleEntryComponent copy() { 3191 BundleEntryComponent dst = new BundleEntryComponent(); 3192 copyValues(dst); 3193 return dst; 3194 } 3195 3196 public void copyValues(BundleEntryComponent dst) { 3197 super.copyValues(dst); 3198 if (link != null) { 3199 dst.link = new ArrayList<BundleLinkComponent>(); 3200 for (BundleLinkComponent i : link) 3201 dst.link.add(i.copy()); 3202 }; 3203 dst.fullUrl = fullUrl == null ? null : fullUrl.copy(); 3204 dst.resource = resource == null ? null : resource.copy(); 3205 dst.search = search == null ? null : search.copy(); 3206 dst.request = request == null ? null : request.copy(); 3207 dst.response = response == null ? null : response.copy(); 3208 } 3209 3210 @Override 3211 public boolean equalsDeep(Base other_) { 3212 if (!super.equalsDeep(other_)) 3213 return false; 3214 if (!(other_ instanceof BundleEntryComponent)) 3215 return false; 3216 BundleEntryComponent o = (BundleEntryComponent) other_; 3217 return compareDeep(link, o.link, true) && compareDeep(fullUrl, o.fullUrl, true) && compareDeep(resource, o.resource, true) 3218 && compareDeep(search, o.search, true) && compareDeep(request, o.request, true) && compareDeep(response, o.response, true) 3219 ; 3220 } 3221 3222 @Override 3223 public boolean equalsShallow(Base other_) { 3224 if (!super.equalsShallow(other_)) 3225 return false; 3226 if (!(other_ instanceof BundleEntryComponent)) 3227 return false; 3228 BundleEntryComponent o = (BundleEntryComponent) other_; 3229 return compareValues(fullUrl, o.fullUrl, true); 3230 } 3231 3232 public boolean isEmpty() { 3233 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(link, fullUrl, resource 3234 , search, request, response); 3235 } 3236 3237 public String fhirType() { 3238 return "Bundle.entry"; 3239 3240 } 3241 3242// added from java-adornments.txt: 3243/** 3244 * Returns the {@link #getLink() link} which matches a given {@link BundleLinkComponent#getRelation() relation}. 3245 * If no link is found which matches the given relation, returns <code>null</code>. If more than one 3246 * link is found which matches the given relation, returns the first matching BundleLinkComponent. 3247 * 3248 * @param theRelation 3249 * The relation, such as \"next\", or \"self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}. 3250 * @return Returns a matching BundleLinkComponent, or <code>null</code> 3251 * @see IBaseBundle#LINK_NEXT 3252 * @see IBaseBundle#LINK_PREV 3253 * @see IBaseBundle#LINK_SELF 3254 */ 3255 public BundleLinkComponent getLink(String theRelation) { 3256 org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty"); 3257 for (BundleLinkComponent next : getLink()) { 3258 if (theRelation.equals(next.getRelation().toCode())) { 3259 return next; 3260 } 3261 } 3262 return null; 3263 } 3264 3265 /** 3266 * Returns the {@link #getLink() link} which matches a given {@link BundleLinkComponent#getRelation() relation}. 3267 * If no link is found which matches the given relation, creates a new BundleLinkComponent with the 3268 * given relation and adds it to this Bundle. If more than one 3269 * link is found which matches the given relation, returns the first matching BundleLinkComponent. 3270 * 3271 * @param theRelation 3272 * The relation, such as \"next\", or \"self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}. 3273 * @return Returns a matching BundleLinkComponent, or <code>null</code> 3274 * @see IBaseBundle#LINK_NEXT 3275 * @see IBaseBundle#LINK_PREV 3276 * @see IBaseBundle#LINK_SELF 3277 */ 3278 public BundleLinkComponent getLinkOrCreate(String theRelation) { 3279 org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty"); 3280 for (BundleLinkComponent next : getLink()) { 3281 if (theRelation.equals(next.getRelation().toCode())) { 3282 return next; 3283 } 3284 } 3285 BundleLinkComponent retVal = new BundleLinkComponent(); 3286 retVal.setRelation(LinkRelationTypes.fromCode(theRelation)); 3287 getLink().add(retVal); 3288 return retVal; 3289 } 3290// end addition 3291 } 3292 3293 @Block() 3294 public static class BundleEntrySearchComponent extends BackboneElement implements IBaseBackboneElement { 3295 /** 3296 * 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. 3297 */ 3298 @Child(name = "mode", type = {CodeType.class}, order=1, min=0, max=1, modifier=false, summary=true) 3299 @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." ) 3300 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/search-entry-mode") 3301 protected Enumeration<SearchEntryMode> mode; 3302 3303 /** 3304 * When searching, the server's search ranking score for the entry. 3305 */ 3306 @Child(name = "score", type = {DecimalType.class}, order=2, min=0, max=1, modifier=false, summary=true) 3307 @Description(shortDefinition="Search ranking (between 0 and 1)", formalDefinition="When searching, the server's search ranking score for the entry." ) 3308 protected DecimalType score; 3309 3310 private static final long serialVersionUID = 837739866L; 3311 3312 /** 3313 * Constructor 3314 */ 3315 public BundleEntrySearchComponent() { 3316 super(); 3317 } 3318 3319 /** 3320 * @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 3321 */ 3322 public Enumeration<SearchEntryMode> getModeElement() { 3323 if (this.mode == null) 3324 if (Configuration.errorOnAutoCreate()) 3325 throw new Error("Attempt to auto-create BundleEntrySearchComponent.mode"); 3326 else if (Configuration.doAutoCreate()) 3327 this.mode = new Enumeration<SearchEntryMode>(new SearchEntryModeEnumFactory()); // bb 3328 return this.mode; 3329 } 3330 3331 public boolean hasModeElement() { 3332 return this.mode != null && !this.mode.isEmpty(); 3333 } 3334 3335 public boolean hasMode() { 3336 return this.mode != null && !this.mode.isEmpty(); 3337 } 3338 3339 /** 3340 * @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 3341 */ 3342 public BundleEntrySearchComponent setModeElement(Enumeration<SearchEntryMode> value) { 3343 this.mode = value; 3344 return this; 3345 } 3346 3347 /** 3348 * @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. 3349 */ 3350 public SearchEntryMode getMode() { 3351 return this.mode == null ? null : this.mode.getValue(); 3352 } 3353 3354 /** 3355 * @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. 3356 */ 3357 public BundleEntrySearchComponent setMode(SearchEntryMode value) { 3358 if (value == null) 3359 this.mode = null; 3360 else { 3361 if (this.mode == null) 3362 this.mode = new Enumeration<SearchEntryMode>(new SearchEntryModeEnumFactory()); 3363 this.mode.setValue(value); 3364 } 3365 return this; 3366 } 3367 3368 /** 3369 * @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 3370 */ 3371 public DecimalType getScoreElement() { 3372 if (this.score == null) 3373 if (Configuration.errorOnAutoCreate()) 3374 throw new Error("Attempt to auto-create BundleEntrySearchComponent.score"); 3375 else if (Configuration.doAutoCreate()) 3376 this.score = new DecimalType(); // bb 3377 return this.score; 3378 } 3379 3380 public boolean hasScoreElement() { 3381 return this.score != null && !this.score.isEmpty(); 3382 } 3383 3384 public boolean hasScore() { 3385 return this.score != null && !this.score.isEmpty(); 3386 } 3387 3388 /** 3389 * @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 3390 */ 3391 public BundleEntrySearchComponent setScoreElement(DecimalType value) { 3392 this.score = value; 3393 return this; 3394 } 3395 3396 /** 3397 * @return When searching, the server's search ranking score for the entry. 3398 */ 3399 public BigDecimal getScore() { 3400 return this.score == null ? null : this.score.getValue(); 3401 } 3402 3403 /** 3404 * @param value When searching, the server's search ranking score for the entry. 3405 */ 3406 public BundleEntrySearchComponent setScore(BigDecimal value) { 3407 if (value == null) 3408 this.score = null; 3409 else { 3410 if (this.score == null) 3411 this.score = new DecimalType(); 3412 this.score.setValue(value); 3413 } 3414 return this; 3415 } 3416 3417 /** 3418 * @param value When searching, the server's search ranking score for the entry. 3419 */ 3420 public BundleEntrySearchComponent setScore(long value) { 3421 this.score = new DecimalType(); 3422 this.score.setValue(value); 3423 return this; 3424 } 3425 3426 /** 3427 * @param value When searching, the server's search ranking score for the entry. 3428 */ 3429 public BundleEntrySearchComponent setScore(double value) { 3430 this.score = new DecimalType(); 3431 this.score.setValue(value); 3432 return this; 3433 } 3434 3435 protected void listChildren(List<Property> children) { 3436 super.listChildren(children); 3437 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)); 3438 children.add(new Property("score", "decimal", "When searching, the server's search ranking score for the entry.", 0, 1, score)); 3439 } 3440 3441 @Override 3442 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3443 switch (_hash) { 3444 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); 3445 case 109264530: /*score*/ return new Property("score", "decimal", "When searching, the server's search ranking score for the entry.", 0, 1, score); 3446 default: return super.getNamedProperty(_hash, _name, _checkValid); 3447 } 3448 3449 } 3450 3451 @Override 3452 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3453 switch (hash) { 3454 case 3357091: /*mode*/ return this.mode == null ? new Base[0] : new Base[] {this.mode}; // Enumeration<SearchEntryMode> 3455 case 109264530: /*score*/ return this.score == null ? new Base[0] : new Base[] {this.score}; // DecimalType 3456 default: return super.getProperty(hash, name, checkValid); 3457 } 3458 3459 } 3460 3461 @Override 3462 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3463 switch (hash) { 3464 case 3357091: // mode 3465 value = new SearchEntryModeEnumFactory().fromType(TypeConvertor.castToCode(value)); 3466 this.mode = (Enumeration) value; // Enumeration<SearchEntryMode> 3467 return value; 3468 case 109264530: // score 3469 this.score = TypeConvertor.castToDecimal(value); // DecimalType 3470 return value; 3471 default: return super.setProperty(hash, name, value); 3472 } 3473 3474 } 3475 3476 @Override 3477 public Base setProperty(String name, Base value) throws FHIRException { 3478 if (name.equals("mode")) { 3479 value = new SearchEntryModeEnumFactory().fromType(TypeConvertor.castToCode(value)); 3480 this.mode = (Enumeration) value; // Enumeration<SearchEntryMode> 3481 } else if (name.equals("score")) { 3482 this.score = TypeConvertor.castToDecimal(value); // DecimalType 3483 } else 3484 return super.setProperty(name, value); 3485 return value; 3486 } 3487 3488 @Override 3489 public Base makeProperty(int hash, String name) throws FHIRException { 3490 switch (hash) { 3491 case 3357091: return getModeElement(); 3492 case 109264530: return getScoreElement(); 3493 default: return super.makeProperty(hash, name); 3494 } 3495 3496 } 3497 3498 @Override 3499 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3500 switch (hash) { 3501 case 3357091: /*mode*/ return new String[] {"code"}; 3502 case 109264530: /*score*/ return new String[] {"decimal"}; 3503 default: return super.getTypesForProperty(hash, name); 3504 } 3505 3506 } 3507 3508 @Override 3509 public Base addChild(String name) throws FHIRException { 3510 if (name.equals("mode")) { 3511 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.search.mode"); 3512 } 3513 else if (name.equals("score")) { 3514 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.search.score"); 3515 } 3516 else 3517 return super.addChild(name); 3518 } 3519 3520 public BundleEntrySearchComponent copy() { 3521 BundleEntrySearchComponent dst = new BundleEntrySearchComponent(); 3522 copyValues(dst); 3523 return dst; 3524 } 3525 3526 public void copyValues(BundleEntrySearchComponent dst) { 3527 super.copyValues(dst); 3528 dst.mode = mode == null ? null : mode.copy(); 3529 dst.score = score == null ? null : score.copy(); 3530 } 3531 3532 @Override 3533 public boolean equalsDeep(Base other_) { 3534 if (!super.equalsDeep(other_)) 3535 return false; 3536 if (!(other_ instanceof BundleEntrySearchComponent)) 3537 return false; 3538 BundleEntrySearchComponent o = (BundleEntrySearchComponent) other_; 3539 return compareDeep(mode, o.mode, true) && compareDeep(score, o.score, true); 3540 } 3541 3542 @Override 3543 public boolean equalsShallow(Base other_) { 3544 if (!super.equalsShallow(other_)) 3545 return false; 3546 if (!(other_ instanceof BundleEntrySearchComponent)) 3547 return false; 3548 BundleEntrySearchComponent o = (BundleEntrySearchComponent) other_; 3549 return compareValues(mode, o.mode, true) && compareValues(score, o.score, true); 3550 } 3551 3552 public boolean isEmpty() { 3553 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(mode, score); 3554 } 3555 3556 public String fhirType() { 3557 return "Bundle.entry.search"; 3558 3559 } 3560 3561 } 3562 3563 @Block() 3564 public static class BundleEntryRequestComponent extends BackboneElement implements IBaseBackboneElement { 3565 /** 3566 * 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. 3567 */ 3568 @Child(name = "method", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 3569 @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." ) 3570 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/http-verb") 3571 protected Enumeration<HTTPVerb> method; 3572 3573 /** 3574 * The URL for this entry, relative to the root (the address to which the request is posted). 3575 */ 3576 @Child(name = "url", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=true) 3577 @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)." ) 3578 protected UriType url; 3579 3580 /** 3581 * If the ETag values match, return a 304 Not Modified status. See the API documentation for ["Conditional Read"](http.html#cread). 3582 */ 3583 @Child(name = "ifNoneMatch", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 3584 @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)." ) 3585 protected StringType ifNoneMatch; 3586 3587 /** 3588 * Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread). 3589 */ 3590 @Child(name = "ifModifiedSince", type = {InstantType.class}, order=4, min=0, max=1, modifier=false, summary=true) 3591 @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)." ) 3592 protected InstantType ifModifiedSince; 3593 3594 /** 3595 * Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency). 3596 */ 3597 @Child(name = "ifMatch", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 3598 @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)." ) 3599 protected StringType ifMatch; 3600 3601 /** 3602 * 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 "?"). 3603 */ 3604 @Child(name = "ifNoneExist", type = {StringType.class}, order=6, min=0, max=1, modifier=false, summary=true) 3605 @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 \"?\")." ) 3606 protected StringType ifNoneExist; 3607 3608 private static final long serialVersionUID = -1349769744L; 3609 3610 /** 3611 * Constructor 3612 */ 3613 public BundleEntryRequestComponent() { 3614 super(); 3615 } 3616 3617 /** 3618 * Constructor 3619 */ 3620 public BundleEntryRequestComponent(HTTPVerb method, String url) { 3621 super(); 3622 this.setMethod(method); 3623 this.setUrl(url); 3624 } 3625 3626 /** 3627 * @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 3628 */ 3629 public Enumeration<HTTPVerb> getMethodElement() { 3630 if (this.method == null) 3631 if (Configuration.errorOnAutoCreate()) 3632 throw new Error("Attempt to auto-create BundleEntryRequestComponent.method"); 3633 else if (Configuration.doAutoCreate()) 3634 this.method = new Enumeration<HTTPVerb>(new HTTPVerbEnumFactory()); // bb 3635 return this.method; 3636 } 3637 3638 public boolean hasMethodElement() { 3639 return this.method != null && !this.method.isEmpty(); 3640 } 3641 3642 public boolean hasMethod() { 3643 return this.method != null && !this.method.isEmpty(); 3644 } 3645 3646 /** 3647 * @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 3648 */ 3649 public BundleEntryRequestComponent setMethodElement(Enumeration<HTTPVerb> value) { 3650 this.method = value; 3651 return this; 3652 } 3653 3654 /** 3655 * @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. 3656 */ 3657 public HTTPVerb getMethod() { 3658 return this.method == null ? null : this.method.getValue(); 3659 } 3660 3661 /** 3662 * @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. 3663 */ 3664 public BundleEntryRequestComponent setMethod(HTTPVerb value) { 3665 if (this.method == null) 3666 this.method = new Enumeration<HTTPVerb>(new HTTPVerbEnumFactory()); 3667 this.method.setValue(value); 3668 return this; 3669 } 3670 3671 /** 3672 * @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 3673 */ 3674 public UriType getUrlElement() { 3675 if (this.url == null) 3676 if (Configuration.errorOnAutoCreate()) 3677 throw new Error("Attempt to auto-create BundleEntryRequestComponent.url"); 3678 else if (Configuration.doAutoCreate()) 3679 this.url = new UriType(); // bb 3680 return this.url; 3681 } 3682 3683 public boolean hasUrlElement() { 3684 return this.url != null && !this.url.isEmpty(); 3685 } 3686 3687 public boolean hasUrl() { 3688 return this.url != null && !this.url.isEmpty(); 3689 } 3690 3691 /** 3692 * @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 3693 */ 3694 public BundleEntryRequestComponent setUrlElement(UriType value) { 3695 this.url = value; 3696 return this; 3697 } 3698 3699 /** 3700 * @return The URL for this entry, relative to the root (the address to which the request is posted). 3701 */ 3702 public String getUrl() { 3703 return this.url == null ? null : this.url.getValue(); 3704 } 3705 3706 /** 3707 * @param value The URL for this entry, relative to the root (the address to which the request is posted). 3708 */ 3709 public BundleEntryRequestComponent setUrl(String value) { 3710 if (this.url == null) 3711 this.url = new UriType(); 3712 this.url.setValue(value); 3713 return this; 3714 } 3715 3716 /** 3717 * @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 3718 */ 3719 public StringType getIfNoneMatchElement() { 3720 if (this.ifNoneMatch == null) 3721 if (Configuration.errorOnAutoCreate()) 3722 throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifNoneMatch"); 3723 else if (Configuration.doAutoCreate()) 3724 this.ifNoneMatch = new StringType(); // bb 3725 return this.ifNoneMatch; 3726 } 3727 3728 public boolean hasIfNoneMatchElement() { 3729 return this.ifNoneMatch != null && !this.ifNoneMatch.isEmpty(); 3730 } 3731 3732 public boolean hasIfNoneMatch() { 3733 return this.ifNoneMatch != null && !this.ifNoneMatch.isEmpty(); 3734 } 3735 3736 /** 3737 * @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 3738 */ 3739 public BundleEntryRequestComponent setIfNoneMatchElement(StringType value) { 3740 this.ifNoneMatch = value; 3741 return this; 3742 } 3743 3744 /** 3745 * @return If the ETag values match, return a 304 Not Modified status. See the API documentation for ["Conditional Read"](http.html#cread). 3746 */ 3747 public String getIfNoneMatch() { 3748 return this.ifNoneMatch == null ? null : this.ifNoneMatch.getValue(); 3749 } 3750 3751 /** 3752 * @param value If the ETag values match, return a 304 Not Modified status. See the API documentation for ["Conditional Read"](http.html#cread). 3753 */ 3754 public BundleEntryRequestComponent setIfNoneMatch(String value) { 3755 if (Utilities.noString(value)) 3756 this.ifNoneMatch = null; 3757 else { 3758 if (this.ifNoneMatch == null) 3759 this.ifNoneMatch = new StringType(); 3760 this.ifNoneMatch.setValue(value); 3761 } 3762 return this; 3763 } 3764 3765 /** 3766 * @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 3767 */ 3768 public InstantType getIfModifiedSinceElement() { 3769 if (this.ifModifiedSince == null) 3770 if (Configuration.errorOnAutoCreate()) 3771 throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifModifiedSince"); 3772 else if (Configuration.doAutoCreate()) 3773 this.ifModifiedSince = new InstantType(); // bb 3774 return this.ifModifiedSince; 3775 } 3776 3777 public boolean hasIfModifiedSinceElement() { 3778 return this.ifModifiedSince != null && !this.ifModifiedSince.isEmpty(); 3779 } 3780 3781 public boolean hasIfModifiedSince() { 3782 return this.ifModifiedSince != null && !this.ifModifiedSince.isEmpty(); 3783 } 3784 3785 /** 3786 * @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 3787 */ 3788 public BundleEntryRequestComponent setIfModifiedSinceElement(InstantType value) { 3789 this.ifModifiedSince = value; 3790 return this; 3791 } 3792 3793 /** 3794 * @return Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread). 3795 */ 3796 public Date getIfModifiedSince() { 3797 return this.ifModifiedSince == null ? null : this.ifModifiedSince.getValue(); 3798 } 3799 3800 /** 3801 * @param value Only perform the operation if the last updated date matches. See the API documentation for ["Conditional Read"](http.html#cread). 3802 */ 3803 public BundleEntryRequestComponent setIfModifiedSince(Date value) { 3804 if (value == null) 3805 this.ifModifiedSince = null; 3806 else { 3807 if (this.ifModifiedSince == null) 3808 this.ifModifiedSince = new InstantType(); 3809 this.ifModifiedSince.setValue(value); 3810 } 3811 return this; 3812 } 3813 3814 /** 3815 * @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 3816 */ 3817 public StringType getIfMatchElement() { 3818 if (this.ifMatch == null) 3819 if (Configuration.errorOnAutoCreate()) 3820 throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifMatch"); 3821 else if (Configuration.doAutoCreate()) 3822 this.ifMatch = new StringType(); // bb 3823 return this.ifMatch; 3824 } 3825 3826 public boolean hasIfMatchElement() { 3827 return this.ifMatch != null && !this.ifMatch.isEmpty(); 3828 } 3829 3830 public boolean hasIfMatch() { 3831 return this.ifMatch != null && !this.ifMatch.isEmpty(); 3832 } 3833 3834 /** 3835 * @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 3836 */ 3837 public BundleEntryRequestComponent setIfMatchElement(StringType value) { 3838 this.ifMatch = value; 3839 return this; 3840 } 3841 3842 /** 3843 * @return Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency). 3844 */ 3845 public String getIfMatch() { 3846 return this.ifMatch == null ? null : this.ifMatch.getValue(); 3847 } 3848 3849 /** 3850 * @param value Only perform the operation if the Etag value matches. For more information, see the API section ["Managing Resource Contention"](http.html#concurrency). 3851 */ 3852 public BundleEntryRequestComponent setIfMatch(String value) { 3853 if (Utilities.noString(value)) 3854 this.ifMatch = null; 3855 else { 3856 if (this.ifMatch == null) 3857 this.ifMatch = new StringType(); 3858 this.ifMatch.setValue(value); 3859 } 3860 return this; 3861 } 3862 3863 /** 3864 * @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 3865 */ 3866 public StringType getIfNoneExistElement() { 3867 if (this.ifNoneExist == null) 3868 if (Configuration.errorOnAutoCreate()) 3869 throw new Error("Attempt to auto-create BundleEntryRequestComponent.ifNoneExist"); 3870 else if (Configuration.doAutoCreate()) 3871 this.ifNoneExist = new StringType(); // bb 3872 return this.ifNoneExist; 3873 } 3874 3875 public boolean hasIfNoneExistElement() { 3876 return this.ifNoneExist != null && !this.ifNoneExist.isEmpty(); 3877 } 3878 3879 public boolean hasIfNoneExist() { 3880 return this.ifNoneExist != null && !this.ifNoneExist.isEmpty(); 3881 } 3882 3883 /** 3884 * @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 3885 */ 3886 public BundleEntryRequestComponent setIfNoneExistElement(StringType value) { 3887 this.ifNoneExist = value; 3888 return this; 3889 } 3890 3891 /** 3892 * @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 "?"). 3893 */ 3894 public String getIfNoneExist() { 3895 return this.ifNoneExist == null ? null : this.ifNoneExist.getValue(); 3896 } 3897 3898 /** 3899 * @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 "?"). 3900 */ 3901 public BundleEntryRequestComponent setIfNoneExist(String value) { 3902 if (Utilities.noString(value)) 3903 this.ifNoneExist = null; 3904 else { 3905 if (this.ifNoneExist == null) 3906 this.ifNoneExist = new StringType(); 3907 this.ifNoneExist.setValue(value); 3908 } 3909 return this; 3910 } 3911 3912 protected void listChildren(List<Property> children) { 3913 super.listChildren(children); 3914 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)); 3915 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)); 3916 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)); 3917 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)); 3918 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)); 3919 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)); 3920 } 3921 3922 @Override 3923 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3924 switch (_hash) { 3925 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); 3926 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); 3927 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); 3928 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); 3929 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); 3930 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); 3931 default: return super.getNamedProperty(_hash, _name, _checkValid); 3932 } 3933 3934 } 3935 3936 @Override 3937 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3938 switch (hash) { 3939 case -1077554975: /*method*/ return this.method == null ? new Base[0] : new Base[] {this.method}; // Enumeration<HTTPVerb> 3940 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 3941 case 171868368: /*ifNoneMatch*/ return this.ifNoneMatch == null ? new Base[0] : new Base[] {this.ifNoneMatch}; // StringType 3942 case -2061602860: /*ifModifiedSince*/ return this.ifModifiedSince == null ? new Base[0] : new Base[] {this.ifModifiedSince}; // InstantType 3943 case 1692894888: /*ifMatch*/ return this.ifMatch == null ? new Base[0] : new Base[] {this.ifMatch}; // StringType 3944 case 165155330: /*ifNoneExist*/ return this.ifNoneExist == null ? new Base[0] : new Base[] {this.ifNoneExist}; // StringType 3945 default: return super.getProperty(hash, name, checkValid); 3946 } 3947 3948 } 3949 3950 @Override 3951 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3952 switch (hash) { 3953 case -1077554975: // method 3954 value = new HTTPVerbEnumFactory().fromType(TypeConvertor.castToCode(value)); 3955 this.method = (Enumeration) value; // Enumeration<HTTPVerb> 3956 return value; 3957 case 116079: // url 3958 this.url = TypeConvertor.castToUri(value); // UriType 3959 return value; 3960 case 171868368: // ifNoneMatch 3961 this.ifNoneMatch = TypeConvertor.castToString(value); // StringType 3962 return value; 3963 case -2061602860: // ifModifiedSince 3964 this.ifModifiedSince = TypeConvertor.castToInstant(value); // InstantType 3965 return value; 3966 case 1692894888: // ifMatch 3967 this.ifMatch = TypeConvertor.castToString(value); // StringType 3968 return value; 3969 case 165155330: // ifNoneExist 3970 this.ifNoneExist = TypeConvertor.castToString(value); // StringType 3971 return value; 3972 default: return super.setProperty(hash, name, value); 3973 } 3974 3975 } 3976 3977 @Override 3978 public Base setProperty(String name, Base value) throws FHIRException { 3979 if (name.equals("method")) { 3980 value = new HTTPVerbEnumFactory().fromType(TypeConvertor.castToCode(value)); 3981 this.method = (Enumeration) value; // Enumeration<HTTPVerb> 3982 } else if (name.equals("url")) { 3983 this.url = TypeConvertor.castToUri(value); // UriType 3984 } else if (name.equals("ifNoneMatch")) { 3985 this.ifNoneMatch = TypeConvertor.castToString(value); // StringType 3986 } else if (name.equals("ifModifiedSince")) { 3987 this.ifModifiedSince = TypeConvertor.castToInstant(value); // InstantType 3988 } else if (name.equals("ifMatch")) { 3989 this.ifMatch = TypeConvertor.castToString(value); // StringType 3990 } else if (name.equals("ifNoneExist")) { 3991 this.ifNoneExist = TypeConvertor.castToString(value); // StringType 3992 } else 3993 return super.setProperty(name, value); 3994 return value; 3995 } 3996 3997 @Override 3998 public Base makeProperty(int hash, String name) throws FHIRException { 3999 switch (hash) { 4000 case -1077554975: return getMethodElement(); 4001 case 116079: return getUrlElement(); 4002 case 171868368: return getIfNoneMatchElement(); 4003 case -2061602860: return getIfModifiedSinceElement(); 4004 case 1692894888: return getIfMatchElement(); 4005 case 165155330: return getIfNoneExistElement(); 4006 default: return super.makeProperty(hash, name); 4007 } 4008 4009 } 4010 4011 @Override 4012 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4013 switch (hash) { 4014 case -1077554975: /*method*/ return new String[] {"code"}; 4015 case 116079: /*url*/ return new String[] {"uri"}; 4016 case 171868368: /*ifNoneMatch*/ return new String[] {"string"}; 4017 case -2061602860: /*ifModifiedSince*/ return new String[] {"instant"}; 4018 case 1692894888: /*ifMatch*/ return new String[] {"string"}; 4019 case 165155330: /*ifNoneExist*/ return new String[] {"string"}; 4020 default: return super.getTypesForProperty(hash, name); 4021 } 4022 4023 } 4024 4025 @Override 4026 public Base addChild(String name) throws FHIRException { 4027 if (name.equals("method")) { 4028 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.request.method"); 4029 } 4030 else if (name.equals("url")) { 4031 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.request.url"); 4032 } 4033 else if (name.equals("ifNoneMatch")) { 4034 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.request.ifNoneMatch"); 4035 } 4036 else if (name.equals("ifModifiedSince")) { 4037 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.request.ifModifiedSince"); 4038 } 4039 else if (name.equals("ifMatch")) { 4040 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.request.ifMatch"); 4041 } 4042 else if (name.equals("ifNoneExist")) { 4043 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.request.ifNoneExist"); 4044 } 4045 else 4046 return super.addChild(name); 4047 } 4048 4049 public BundleEntryRequestComponent copy() { 4050 BundleEntryRequestComponent dst = new BundleEntryRequestComponent(); 4051 copyValues(dst); 4052 return dst; 4053 } 4054 4055 public void copyValues(BundleEntryRequestComponent dst) { 4056 super.copyValues(dst); 4057 dst.method = method == null ? null : method.copy(); 4058 dst.url = url == null ? null : url.copy(); 4059 dst.ifNoneMatch = ifNoneMatch == null ? null : ifNoneMatch.copy(); 4060 dst.ifModifiedSince = ifModifiedSince == null ? null : ifModifiedSince.copy(); 4061 dst.ifMatch = ifMatch == null ? null : ifMatch.copy(); 4062 dst.ifNoneExist = ifNoneExist == null ? null : ifNoneExist.copy(); 4063 } 4064 4065 @Override 4066 public boolean equalsDeep(Base other_) { 4067 if (!super.equalsDeep(other_)) 4068 return false; 4069 if (!(other_ instanceof BundleEntryRequestComponent)) 4070 return false; 4071 BundleEntryRequestComponent o = (BundleEntryRequestComponent) other_; 4072 return compareDeep(method, o.method, true) && compareDeep(url, o.url, true) && compareDeep(ifNoneMatch, o.ifNoneMatch, true) 4073 && compareDeep(ifModifiedSince, o.ifModifiedSince, true) && compareDeep(ifMatch, o.ifMatch, true) 4074 && compareDeep(ifNoneExist, o.ifNoneExist, true); 4075 } 4076 4077 @Override 4078 public boolean equalsShallow(Base other_) { 4079 if (!super.equalsShallow(other_)) 4080 return false; 4081 if (!(other_ instanceof BundleEntryRequestComponent)) 4082 return false; 4083 BundleEntryRequestComponent o = (BundleEntryRequestComponent) other_; 4084 return compareValues(method, o.method, true) && compareValues(url, o.url, true) && compareValues(ifNoneMatch, o.ifNoneMatch, true) 4085 && compareValues(ifModifiedSince, o.ifModifiedSince, true) && compareValues(ifMatch, o.ifMatch, true) 4086 && compareValues(ifNoneExist, o.ifNoneExist, true); 4087 } 4088 4089 public boolean isEmpty() { 4090 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(method, url, ifNoneMatch 4091 , ifModifiedSince, ifMatch, ifNoneExist); 4092 } 4093 4094 public String fhirType() { 4095 return "Bundle.entry.request"; 4096 4097 } 4098 4099 } 4100 4101 @Block() 4102 public static class BundleEntryResponseComponent extends BackboneElement implements IBaseBackboneElement { 4103 /** 4104 * 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. 4105 */ 4106 @Child(name = "status", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) 4107 @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." ) 4108 protected StringType status; 4109 4110 /** 4111 * The location header created by processing this operation, populated if the operation returns a location. 4112 */ 4113 @Child(name = "location", type = {UriType.class}, order=2, min=0, max=1, modifier=false, summary=true) 4114 @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." ) 4115 protected UriType location; 4116 4117 /** 4118 * 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)). 4119 */ 4120 @Child(name = "etag", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=true) 4121 @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))." ) 4122 protected StringType etag; 4123 4124 /** 4125 * The date/time that the resource was modified on the server. 4126 */ 4127 @Child(name = "lastModified", type = {InstantType.class}, order=4, min=0, max=1, modifier=false, summary=true) 4128 @Description(shortDefinition="Server's date time modified", formalDefinition="The date/time that the resource was modified on the server." ) 4129 protected InstantType lastModified; 4130 4131 /** 4132 * An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction. 4133 */ 4134 @Child(name = "outcome", type = {Resource.class}, order=5, min=0, max=1, modifier=false, summary=true) 4135 @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." ) 4136 protected Resource outcome; 4137 4138 private static final long serialVersionUID = 923278008L; 4139 4140 /** 4141 * Constructor 4142 */ 4143 public BundleEntryResponseComponent() { 4144 super(); 4145 } 4146 4147 /** 4148 * Constructor 4149 */ 4150 public BundleEntryResponseComponent(String status) { 4151 super(); 4152 this.setStatus(status); 4153 } 4154 4155 /** 4156 * @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 4157 */ 4158 public StringType getStatusElement() { 4159 if (this.status == null) 4160 if (Configuration.errorOnAutoCreate()) 4161 throw new Error("Attempt to auto-create BundleEntryResponseComponent.status"); 4162 else if (Configuration.doAutoCreate()) 4163 this.status = new StringType(); // bb 4164 return this.status; 4165 } 4166 4167 public boolean hasStatusElement() { 4168 return this.status != null && !this.status.isEmpty(); 4169 } 4170 4171 public boolean hasStatus() { 4172 return this.status != null && !this.status.isEmpty(); 4173 } 4174 4175 /** 4176 * @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 4177 */ 4178 public BundleEntryResponseComponent setStatusElement(StringType value) { 4179 this.status = value; 4180 return this; 4181 } 4182 4183 /** 4184 * @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. 4185 */ 4186 public String getStatus() { 4187 return this.status == null ? null : this.status.getValue(); 4188 } 4189 4190 /** 4191 * @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. 4192 */ 4193 public BundleEntryResponseComponent setStatus(String value) { 4194 if (this.status == null) 4195 this.status = new StringType(); 4196 this.status.setValue(value); 4197 return this; 4198 } 4199 4200 /** 4201 * @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 4202 */ 4203 public UriType getLocationElement() { 4204 if (this.location == null) 4205 if (Configuration.errorOnAutoCreate()) 4206 throw new Error("Attempt to auto-create BundleEntryResponseComponent.location"); 4207 else if (Configuration.doAutoCreate()) 4208 this.location = new UriType(); // bb 4209 return this.location; 4210 } 4211 4212 public boolean hasLocationElement() { 4213 return this.location != null && !this.location.isEmpty(); 4214 } 4215 4216 public boolean hasLocation() { 4217 return this.location != null && !this.location.isEmpty(); 4218 } 4219 4220 /** 4221 * @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 4222 */ 4223 public BundleEntryResponseComponent setLocationElement(UriType value) { 4224 this.location = value; 4225 return this; 4226 } 4227 4228 /** 4229 * @return The location header created by processing this operation, populated if the operation returns a location. 4230 */ 4231 public String getLocation() { 4232 return this.location == null ? null : this.location.getValue(); 4233 } 4234 4235 /** 4236 * @param value The location header created by processing this operation, populated if the operation returns a location. 4237 */ 4238 public BundleEntryResponseComponent setLocation(String value) { 4239 if (Utilities.noString(value)) 4240 this.location = null; 4241 else { 4242 if (this.location == null) 4243 this.location = new UriType(); 4244 this.location.setValue(value); 4245 } 4246 return this; 4247 } 4248 4249 /** 4250 * @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 4251 */ 4252 public StringType getEtagElement() { 4253 if (this.etag == null) 4254 if (Configuration.errorOnAutoCreate()) 4255 throw new Error("Attempt to auto-create BundleEntryResponseComponent.etag"); 4256 else if (Configuration.doAutoCreate()) 4257 this.etag = new StringType(); // bb 4258 return this.etag; 4259 } 4260 4261 public boolean hasEtagElement() { 4262 return this.etag != null && !this.etag.isEmpty(); 4263 } 4264 4265 public boolean hasEtag() { 4266 return this.etag != null && !this.etag.isEmpty(); 4267 } 4268 4269 /** 4270 * @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 4271 */ 4272 public BundleEntryResponseComponent setEtagElement(StringType value) { 4273 this.etag = value; 4274 return this; 4275 } 4276 4277 /** 4278 * @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)). 4279 */ 4280 public String getEtag() { 4281 return this.etag == null ? null : this.etag.getValue(); 4282 } 4283 4284 /** 4285 * @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)). 4286 */ 4287 public BundleEntryResponseComponent setEtag(String value) { 4288 if (Utilities.noString(value)) 4289 this.etag = null; 4290 else { 4291 if (this.etag == null) 4292 this.etag = new StringType(); 4293 this.etag.setValue(value); 4294 } 4295 return this; 4296 } 4297 4298 /** 4299 * @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 4300 */ 4301 public InstantType getLastModifiedElement() { 4302 if (this.lastModified == null) 4303 if (Configuration.errorOnAutoCreate()) 4304 throw new Error("Attempt to auto-create BundleEntryResponseComponent.lastModified"); 4305 else if (Configuration.doAutoCreate()) 4306 this.lastModified = new InstantType(); // bb 4307 return this.lastModified; 4308 } 4309 4310 public boolean hasLastModifiedElement() { 4311 return this.lastModified != null && !this.lastModified.isEmpty(); 4312 } 4313 4314 public boolean hasLastModified() { 4315 return this.lastModified != null && !this.lastModified.isEmpty(); 4316 } 4317 4318 /** 4319 * @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 4320 */ 4321 public BundleEntryResponseComponent setLastModifiedElement(InstantType value) { 4322 this.lastModified = value; 4323 return this; 4324 } 4325 4326 /** 4327 * @return The date/time that the resource was modified on the server. 4328 */ 4329 public Date getLastModified() { 4330 return this.lastModified == null ? null : this.lastModified.getValue(); 4331 } 4332 4333 /** 4334 * @param value The date/time that the resource was modified on the server. 4335 */ 4336 public BundleEntryResponseComponent setLastModified(Date value) { 4337 if (value == null) 4338 this.lastModified = null; 4339 else { 4340 if (this.lastModified == null) 4341 this.lastModified = new InstantType(); 4342 this.lastModified.setValue(value); 4343 } 4344 return this; 4345 } 4346 4347 /** 4348 * @return {@link #outcome} (An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.) 4349 */ 4350 public Resource getOutcome() { 4351 return this.outcome; 4352 } 4353 4354 public boolean hasOutcome() { 4355 return this.outcome != null && !this.outcome.isEmpty(); 4356 } 4357 4358 /** 4359 * @param value {@link #outcome} (An OperationOutcome containing hints and warnings produced as part of processing this entry in a batch or transaction.) 4360 */ 4361 public BundleEntryResponseComponent setOutcome(Resource value) { 4362 this.outcome = value; 4363 return this; 4364 } 4365 4366 protected void listChildren(List<Property> children) { 4367 super.listChildren(children); 4368 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)); 4369 children.add(new Property("location", "uri", "The location header created by processing this operation, populated if the operation returns a location.", 0, 1, location)); 4370 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)); 4371 children.add(new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, 1, lastModified)); 4372 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)); 4373 } 4374 4375 @Override 4376 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4377 switch (_hash) { 4378 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); 4379 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); 4380 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); 4381 case 1959003007: /*lastModified*/ return new Property("lastModified", "instant", "The date/time that the resource was modified on the server.", 0, 1, lastModified); 4382 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); 4383 default: return super.getNamedProperty(_hash, _name, _checkValid); 4384 } 4385 4386 } 4387 4388 @Override 4389 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4390 switch (hash) { 4391 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // StringType 4392 case 1901043637: /*location*/ return this.location == null ? new Base[0] : new Base[] {this.location}; // UriType 4393 case 3123477: /*etag*/ return this.etag == null ? new Base[0] : new Base[] {this.etag}; // StringType 4394 case 1959003007: /*lastModified*/ return this.lastModified == null ? new Base[0] : new Base[] {this.lastModified}; // InstantType 4395 case -1106507950: /*outcome*/ return this.outcome == null ? new Base[0] : new Base[] {this.outcome}; // Resource 4396 default: return super.getProperty(hash, name, checkValid); 4397 } 4398 4399 } 4400 4401 @Override 4402 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4403 switch (hash) { 4404 case -892481550: // status 4405 this.status = TypeConvertor.castToString(value); // StringType 4406 return value; 4407 case 1901043637: // location 4408 this.location = TypeConvertor.castToUri(value); // UriType 4409 return value; 4410 case 3123477: // etag 4411 this.etag = TypeConvertor.castToString(value); // StringType 4412 return value; 4413 case 1959003007: // lastModified 4414 this.lastModified = TypeConvertor.castToInstant(value); // InstantType 4415 return value; 4416 case -1106507950: // outcome 4417 this.outcome = TypeConvertor.castToResource(value); // Resource 4418 return value; 4419 default: return super.setProperty(hash, name, value); 4420 } 4421 4422 } 4423 4424 @Override 4425 public Base setProperty(String name, Base value) throws FHIRException { 4426 if (name.equals("status")) { 4427 this.status = TypeConvertor.castToString(value); // StringType 4428 } else if (name.equals("location")) { 4429 this.location = TypeConvertor.castToUri(value); // UriType 4430 } else if (name.equals("etag")) { 4431 this.etag = TypeConvertor.castToString(value); // StringType 4432 } else if (name.equals("lastModified")) { 4433 this.lastModified = TypeConvertor.castToInstant(value); // InstantType 4434 } else if (name.equals("outcome")) { 4435 this.outcome = TypeConvertor.castToResource(value); // Resource 4436 } else 4437 return super.setProperty(name, value); 4438 return value; 4439 } 4440 4441 @Override 4442 public Base makeProperty(int hash, String name) throws FHIRException { 4443 switch (hash) { 4444 case -892481550: return getStatusElement(); 4445 case 1901043637: return getLocationElement(); 4446 case 3123477: return getEtagElement(); 4447 case 1959003007: return getLastModifiedElement(); 4448 case -1106507950: throw new FHIRException("Cannot make property outcome as it is not a complex type"); // Resource 4449 default: return super.makeProperty(hash, name); 4450 } 4451 4452 } 4453 4454 @Override 4455 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4456 switch (hash) { 4457 case -892481550: /*status*/ return new String[] {"string"}; 4458 case 1901043637: /*location*/ return new String[] {"uri"}; 4459 case 3123477: /*etag*/ return new String[] {"string"}; 4460 case 1959003007: /*lastModified*/ return new String[] {"instant"}; 4461 case -1106507950: /*outcome*/ return new String[] {"Resource"}; 4462 default: return super.getTypesForProperty(hash, name); 4463 } 4464 4465 } 4466 4467 @Override 4468 public Base addChild(String name) throws FHIRException { 4469 if (name.equals("status")) { 4470 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.response.status"); 4471 } 4472 else if (name.equals("location")) { 4473 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.response.location"); 4474 } 4475 else if (name.equals("etag")) { 4476 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.response.etag"); 4477 } 4478 else if (name.equals("lastModified")) { 4479 throw new FHIRException("Cannot call addChild on a singleton property Bundle.entry.response.lastModified"); 4480 } 4481 else if (name.equals("outcome")) { 4482 throw new FHIRException("Cannot call addChild on an abstract type Bundle.entry.response.outcome"); 4483 } 4484 else 4485 return super.addChild(name); 4486 } 4487 4488 public BundleEntryResponseComponent copy() { 4489 BundleEntryResponseComponent dst = new BundleEntryResponseComponent(); 4490 copyValues(dst); 4491 return dst; 4492 } 4493 4494 public void copyValues(BundleEntryResponseComponent dst) { 4495 super.copyValues(dst); 4496 dst.status = status == null ? null : status.copy(); 4497 dst.location = location == null ? null : location.copy(); 4498 dst.etag = etag == null ? null : etag.copy(); 4499 dst.lastModified = lastModified == null ? null : lastModified.copy(); 4500 dst.outcome = outcome == null ? null : outcome.copy(); 4501 } 4502 4503 @Override 4504 public boolean equalsDeep(Base other_) { 4505 if (!super.equalsDeep(other_)) 4506 return false; 4507 if (!(other_ instanceof BundleEntryResponseComponent)) 4508 return false; 4509 BundleEntryResponseComponent o = (BundleEntryResponseComponent) other_; 4510 return compareDeep(status, o.status, true) && compareDeep(location, o.location, true) && compareDeep(etag, o.etag, true) 4511 && compareDeep(lastModified, o.lastModified, true) && compareDeep(outcome, o.outcome, true); 4512 } 4513 4514 @Override 4515 public boolean equalsShallow(Base other_) { 4516 if (!super.equalsShallow(other_)) 4517 return false; 4518 if (!(other_ instanceof BundleEntryResponseComponent)) 4519 return false; 4520 BundleEntryResponseComponent o = (BundleEntryResponseComponent) other_; 4521 return compareValues(status, o.status, true) && compareValues(location, o.location, true) && compareValues(etag, o.etag, true) 4522 && compareValues(lastModified, o.lastModified, true); 4523 } 4524 4525 public boolean isEmpty() { 4526 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(status, location, etag, lastModified 4527 , outcome); 4528 } 4529 4530 public String fhirType() { 4531 return "Bundle.entry.response"; 4532 4533 } 4534 4535 } 4536 4537 /** 4538 * A persistent identifier for the bundle that won't change as a bundle is copied from server to server. 4539 */ 4540 @Child(name = "identifier", type = {Identifier.class}, order=0, min=0, max=1, modifier=false, summary=true) 4541 @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." ) 4542 protected Identifier identifier; 4543 4544 /** 4545 * Indicates the purpose of this bundle - how it is intended to be used. 4546 */ 4547 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 4548 @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." ) 4549 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/bundle-type") 4550 protected Enumeration<BundleType> type; 4551 4552 /** 4553 * The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle. 4554 */ 4555 @Child(name = "timestamp", type = {InstantType.class}, order=2, min=0, max=1, modifier=false, summary=true) 4556 @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." ) 4557 protected InstantType timestamp; 4558 4559 /** 4560 * 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. 4561 */ 4562 @Child(name = "total", type = {UnsignedIntType.class}, order=3, min=0, max=1, modifier=false, summary=true) 4563 @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." ) 4564 protected UnsignedIntType total; 4565 4566 /** 4567 * A series of links that provide context to this bundle. 4568 */ 4569 @Child(name = "link", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4570 @Description(shortDefinition="Links related to this Bundle", formalDefinition="A series of links that provide context to this bundle." ) 4571 protected List<BundleLinkComponent> link; 4572 4573 /** 4574 * An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only). 4575 */ 4576 @Child(name = "entry", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4577 @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)." ) 4578 protected List<BundleEntryComponent> entry; 4579 4580 /** 4581 * Digital Signature - base64 encoded. XML-DSig or a JWS. 4582 */ 4583 @Child(name = "signature", type = {Signature.class}, order=6, min=0, max=1, modifier=false, summary=true) 4584 @Description(shortDefinition="Digital Signature", formalDefinition="Digital Signature - base64 encoded. XML-DSig or a JWS." ) 4585 protected Signature signature; 4586 4587 /** 4588 * Captures issues and warnings that relate to the construction of the Bundle and the content within it. 4589 */ 4590 @Child(name = "issues", type = {Resource.class}, order=7, min=0, max=1, modifier=false, summary=true) 4591 @Description(shortDefinition="Issues with the Bundle", formalDefinition="Captures issues and warnings that relate to the construction of the Bundle and the content within it." ) 4592 protected Resource issues; 4593 4594 private static final long serialVersionUID = -843739668L; 4595 4596 /** 4597 * Constructor 4598 */ 4599 public Bundle() { 4600 super(); 4601 } 4602 4603 /** 4604 * Constructor 4605 */ 4606 public Bundle(BundleType type) { 4607 super(); 4608 this.setType(type); 4609 } 4610 4611 /** 4612 * @return {@link #identifier} (A persistent identifier for the bundle that won't change as a bundle is copied from server to server.) 4613 */ 4614 public Identifier getIdentifier() { 4615 if (this.identifier == null) 4616 if (Configuration.errorOnAutoCreate()) 4617 throw new Error("Attempt to auto-create Bundle.identifier"); 4618 else if (Configuration.doAutoCreate()) 4619 this.identifier = new Identifier(); // cc 4620 return this.identifier; 4621 } 4622 4623 public boolean hasIdentifier() { 4624 return this.identifier != null && !this.identifier.isEmpty(); 4625 } 4626 4627 /** 4628 * @param value {@link #identifier} (A persistent identifier for the bundle that won't change as a bundle is copied from server to server.) 4629 */ 4630 public Bundle setIdentifier(Identifier value) { 4631 this.identifier = value; 4632 return this; 4633 } 4634 4635 /** 4636 * @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 4637 */ 4638 public Enumeration<BundleType> getTypeElement() { 4639 if (this.type == null) 4640 if (Configuration.errorOnAutoCreate()) 4641 throw new Error("Attempt to auto-create Bundle.type"); 4642 else if (Configuration.doAutoCreate()) 4643 this.type = new Enumeration<BundleType>(new BundleTypeEnumFactory()); // bb 4644 return this.type; 4645 } 4646 4647 public boolean hasTypeElement() { 4648 return this.type != null && !this.type.isEmpty(); 4649 } 4650 4651 public boolean hasType() { 4652 return this.type != null && !this.type.isEmpty(); 4653 } 4654 4655 /** 4656 * @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 4657 */ 4658 public Bundle setTypeElement(Enumeration<BundleType> value) { 4659 this.type = value; 4660 return this; 4661 } 4662 4663 /** 4664 * @return Indicates the purpose of this bundle - how it is intended to be used. 4665 */ 4666 public BundleType getType() { 4667 return this.type == null ? null : this.type.getValue(); 4668 } 4669 4670 /** 4671 * @param value Indicates the purpose of this bundle - how it is intended to be used. 4672 */ 4673 public Bundle setType(BundleType value) { 4674 if (this.type == null) 4675 this.type = new Enumeration<BundleType>(new BundleTypeEnumFactory()); 4676 this.type.setValue(value); 4677 return this; 4678 } 4679 4680 /** 4681 * @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 4682 */ 4683 public InstantType getTimestampElement() { 4684 if (this.timestamp == null) 4685 if (Configuration.errorOnAutoCreate()) 4686 throw new Error("Attempt to auto-create Bundle.timestamp"); 4687 else if (Configuration.doAutoCreate()) 4688 this.timestamp = new InstantType(); // bb 4689 return this.timestamp; 4690 } 4691 4692 public boolean hasTimestampElement() { 4693 return this.timestamp != null && !this.timestamp.isEmpty(); 4694 } 4695 4696 public boolean hasTimestamp() { 4697 return this.timestamp != null && !this.timestamp.isEmpty(); 4698 } 4699 4700 /** 4701 * @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 4702 */ 4703 public Bundle setTimestampElement(InstantType value) { 4704 this.timestamp = value; 4705 return this; 4706 } 4707 4708 /** 4709 * @return The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle. 4710 */ 4711 public Date getTimestamp() { 4712 return this.timestamp == null ? null : this.timestamp.getValue(); 4713 } 4714 4715 /** 4716 * @param value The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle. 4717 */ 4718 public Bundle setTimestamp(Date value) { 4719 if (value == null) 4720 this.timestamp = null; 4721 else { 4722 if (this.timestamp == null) 4723 this.timestamp = new InstantType(); 4724 this.timestamp.setValue(value); 4725 } 4726 return this; 4727 } 4728 4729 /** 4730 * @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 4731 */ 4732 public UnsignedIntType getTotalElement() { 4733 if (this.total == null) 4734 if (Configuration.errorOnAutoCreate()) 4735 throw new Error("Attempt to auto-create Bundle.total"); 4736 else if (Configuration.doAutoCreate()) 4737 this.total = new UnsignedIntType(); // bb 4738 return this.total; 4739 } 4740 4741 public boolean hasTotalElement() { 4742 return this.total != null && !this.total.isEmpty(); 4743 } 4744 4745 public boolean hasTotal() { 4746 return this.total != null && !this.total.isEmpty(); 4747 } 4748 4749 /** 4750 * @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 4751 */ 4752 public Bundle setTotalElement(UnsignedIntType value) { 4753 this.total = value; 4754 return this; 4755 } 4756 4757 /** 4758 * @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. 4759 */ 4760 public int getTotal() { 4761 return this.total == null || this.total.isEmpty() ? 0 : this.total.getValue(); 4762 } 4763 4764 /** 4765 * @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. 4766 */ 4767 public Bundle setTotal(int value) { 4768 if (this.total == null) 4769 this.total = new UnsignedIntType(); 4770 this.total.setValue(value); 4771 return this; 4772 } 4773 4774 /** 4775 * @return {@link #link} (A series of links that provide context to this bundle.) 4776 */ 4777 public List<BundleLinkComponent> getLink() { 4778 if (this.link == null) 4779 this.link = new ArrayList<BundleLinkComponent>(); 4780 return this.link; 4781 } 4782 4783 /** 4784 * @return Returns a reference to <code>this</code> for easy method chaining 4785 */ 4786 public Bundle setLink(List<BundleLinkComponent> theLink) { 4787 this.link = theLink; 4788 return this; 4789 } 4790 4791 public boolean hasLink() { 4792 if (this.link == null) 4793 return false; 4794 for (BundleLinkComponent item : this.link) 4795 if (!item.isEmpty()) 4796 return true; 4797 return false; 4798 } 4799 4800 public BundleLinkComponent addLink() { //3 4801 BundleLinkComponent t = new BundleLinkComponent(); 4802 if (this.link == null) 4803 this.link = new ArrayList<BundleLinkComponent>(); 4804 this.link.add(t); 4805 return t; 4806 } 4807 4808 public Bundle addLink(BundleLinkComponent t) { //3 4809 if (t == null) 4810 return this; 4811 if (this.link == null) 4812 this.link = new ArrayList<BundleLinkComponent>(); 4813 this.link.add(t); 4814 return this; 4815 } 4816 4817 /** 4818 * @return The first repetition of repeating field {@link #link}, creating it if it does not already exist {3} 4819 */ 4820 public BundleLinkComponent getLinkFirstRep() { 4821 if (getLink().isEmpty()) { 4822 addLink(); 4823 } 4824 return getLink().get(0); 4825 } 4826 4827 /** 4828 * @return {@link #entry} (An entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).) 4829 */ 4830 public List<BundleEntryComponent> getEntry() { 4831 if (this.entry == null) 4832 this.entry = new ArrayList<BundleEntryComponent>(); 4833 return this.entry; 4834 } 4835 4836 /** 4837 * @return Returns a reference to <code>this</code> for easy method chaining 4838 */ 4839 public Bundle setEntry(List<BundleEntryComponent> theEntry) { 4840 this.entry = theEntry; 4841 return this; 4842 } 4843 4844 public boolean hasEntry() { 4845 if (this.entry == null) 4846 return false; 4847 for (BundleEntryComponent item : this.entry) 4848 if (!item.isEmpty()) 4849 return true; 4850 return false; 4851 } 4852 4853 public BundleEntryComponent addEntry() { //3 4854 BundleEntryComponent t = new BundleEntryComponent(); 4855 if (this.entry == null) 4856 this.entry = new ArrayList<BundleEntryComponent>(); 4857 this.entry.add(t); 4858 return t; 4859 } 4860 4861 public Bundle addEntry(BundleEntryComponent t) { //3 4862 if (t == null) 4863 return this; 4864 if (this.entry == null) 4865 this.entry = new ArrayList<BundleEntryComponent>(); 4866 this.entry.add(t); 4867 return this; 4868 } 4869 4870 /** 4871 * @return The first repetition of repeating field {@link #entry}, creating it if it does not already exist {3} 4872 */ 4873 public BundleEntryComponent getEntryFirstRep() { 4874 if (getEntry().isEmpty()) { 4875 addEntry(); 4876 } 4877 return getEntry().get(0); 4878 } 4879 4880 /** 4881 * @return {@link #signature} (Digital Signature - base64 encoded. XML-DSig or a JWS.) 4882 */ 4883 public Signature getSignature() { 4884 if (this.signature == null) 4885 if (Configuration.errorOnAutoCreate()) 4886 throw new Error("Attempt to auto-create Bundle.signature"); 4887 else if (Configuration.doAutoCreate()) 4888 this.signature = new Signature(); // cc 4889 return this.signature; 4890 } 4891 4892 public boolean hasSignature() { 4893 return this.signature != null && !this.signature.isEmpty(); 4894 } 4895 4896 /** 4897 * @param value {@link #signature} (Digital Signature - base64 encoded. XML-DSig or a JWS.) 4898 */ 4899 public Bundle setSignature(Signature value) { 4900 this.signature = value; 4901 return this; 4902 } 4903 4904 /** 4905 * @return {@link #issues} (Captures issues and warnings that relate to the construction of the Bundle and the content within it.) 4906 */ 4907 public Resource getIssues() { 4908 return this.issues; 4909 } 4910 4911 public boolean hasIssues() { 4912 return this.issues != null && !this.issues.isEmpty(); 4913 } 4914 4915 /** 4916 * @param value {@link #issues} (Captures issues and warnings that relate to the construction of the Bundle and the content within it.) 4917 */ 4918 public Bundle setIssues(Resource value) { 4919 this.issues = value; 4920 return this; 4921 } 4922 4923 protected void listChildren(List<Property> children) { 4924 super.listChildren(children); 4925 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)); 4926 children.add(new Property("type", "code", "Indicates the purpose of this bundle - how it is intended to be used.", 0, 1, type)); 4927 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)); 4928 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)); 4929 children.add(new Property("link", "", "A series of links that provide context to this bundle.", 0, java.lang.Integer.MAX_VALUE, link)); 4930 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)); 4931 children.add(new Property("signature", "Signature", "Digital Signature - base64 encoded. XML-DSig or a JWS.", 0, 1, signature)); 4932 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)); 4933 } 4934 4935 @Override 4936 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4937 switch (_hash) { 4938 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); 4939 case 3575610: /*type*/ return new Property("type", "code", "Indicates the purpose of this bundle - how it is intended to be used.", 0, 1, type); 4940 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); 4941 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); 4942 case 3321850: /*link*/ return new Property("link", "", "A series of links that provide context to this bundle.", 0, java.lang.Integer.MAX_VALUE, link); 4943 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); 4944 case 1073584312: /*signature*/ return new Property("signature", "Signature", "Digital Signature - base64 encoded. XML-DSig or a JWS.", 0, 1, signature); 4945 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); 4946 default: return super.getNamedProperty(_hash, _name, _checkValid); 4947 } 4948 4949 } 4950 4951 @Override 4952 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4953 switch (hash) { 4954 case -1618432855: /*identifier*/ return this.identifier == null ? new Base[0] : new Base[] {this.identifier}; // Identifier 4955 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<BundleType> 4956 case 55126294: /*timestamp*/ return this.timestamp == null ? new Base[0] : new Base[] {this.timestamp}; // InstantType 4957 case 110549828: /*total*/ return this.total == null ? new Base[0] : new Base[] {this.total}; // UnsignedIntType 4958 case 3321850: /*link*/ return this.link == null ? new Base[0] : this.link.toArray(new Base[this.link.size()]); // BundleLinkComponent 4959 case 96667762: /*entry*/ return this.entry == null ? new Base[0] : this.entry.toArray(new Base[this.entry.size()]); // BundleEntryComponent 4960 case 1073584312: /*signature*/ return this.signature == null ? new Base[0] : new Base[] {this.signature}; // Signature 4961 case -1179159878: /*issues*/ return this.issues == null ? new Base[0] : new Base[] {this.issues}; // Resource 4962 default: return super.getProperty(hash, name, checkValid); 4963 } 4964 4965 } 4966 4967 @Override 4968 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4969 switch (hash) { 4970 case -1618432855: // identifier 4971 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 4972 return value; 4973 case 3575610: // type 4974 value = new BundleTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 4975 this.type = (Enumeration) value; // Enumeration<BundleType> 4976 return value; 4977 case 55126294: // timestamp 4978 this.timestamp = TypeConvertor.castToInstant(value); // InstantType 4979 return value; 4980 case 110549828: // total 4981 this.total = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType 4982 return value; 4983 case 3321850: // link 4984 this.getLink().add((BundleLinkComponent) value); // BundleLinkComponent 4985 return value; 4986 case 96667762: // entry 4987 this.getEntry().add((BundleEntryComponent) value); // BundleEntryComponent 4988 return value; 4989 case 1073584312: // signature 4990 this.signature = TypeConvertor.castToSignature(value); // Signature 4991 return value; 4992 case -1179159878: // issues 4993 this.issues = TypeConvertor.castToResource(value); // Resource 4994 return value; 4995 default: return super.setProperty(hash, name, value); 4996 } 4997 4998 } 4999 5000 @Override 5001 public Base setProperty(String name, Base value) throws FHIRException { 5002 if (name.equals("identifier")) { 5003 this.identifier = TypeConvertor.castToIdentifier(value); // Identifier 5004 } else if (name.equals("type")) { 5005 value = new BundleTypeEnumFactory().fromType(TypeConvertor.castToCode(value)); 5006 this.type = (Enumeration) value; // Enumeration<BundleType> 5007 } else if (name.equals("timestamp")) { 5008 this.timestamp = TypeConvertor.castToInstant(value); // InstantType 5009 } else if (name.equals("total")) { 5010 this.total = TypeConvertor.castToUnsignedInt(value); // UnsignedIntType 5011 } else if (name.equals("link")) { 5012 this.getLink().add((BundleLinkComponent) value); 5013 } else if (name.equals("entry")) { 5014 this.getEntry().add((BundleEntryComponent) value); 5015 } else if (name.equals("signature")) { 5016 this.signature = TypeConvertor.castToSignature(value); // Signature 5017 } else if (name.equals("issues")) { 5018 this.issues = TypeConvertor.castToResource(value); // Resource 5019 } else 5020 return super.setProperty(name, value); 5021 return value; 5022 } 5023 5024 @Override 5025 public Base makeProperty(int hash, String name) throws FHIRException { 5026 switch (hash) { 5027 case -1618432855: return getIdentifier(); 5028 case 3575610: return getTypeElement(); 5029 case 55126294: return getTimestampElement(); 5030 case 110549828: return getTotalElement(); 5031 case 3321850: return addLink(); 5032 case 96667762: return addEntry(); 5033 case 1073584312: return getSignature(); 5034 case -1179159878: throw new FHIRException("Cannot make property issues as it is not a complex type"); // Resource 5035 default: return super.makeProperty(hash, name); 5036 } 5037 5038 } 5039 5040 @Override 5041 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5042 switch (hash) { 5043 case -1618432855: /*identifier*/ return new String[] {"Identifier"}; 5044 case 3575610: /*type*/ return new String[] {"code"}; 5045 case 55126294: /*timestamp*/ return new String[] {"instant"}; 5046 case 110549828: /*total*/ return new String[] {"unsignedInt"}; 5047 case 3321850: /*link*/ return new String[] {}; 5048 case 96667762: /*entry*/ return new String[] {}; 5049 case 1073584312: /*signature*/ return new String[] {"Signature"}; 5050 case -1179159878: /*issues*/ return new String[] {"Resource"}; 5051 default: return super.getTypesForProperty(hash, name); 5052 } 5053 5054 } 5055 5056 @Override 5057 public Base addChild(String name) throws FHIRException { 5058 if (name.equals("identifier")) { 5059 this.identifier = new Identifier(); 5060 return this.identifier; 5061 } 5062 else if (name.equals("type")) { 5063 throw new FHIRException("Cannot call addChild on a singleton property Bundle.type"); 5064 } 5065 else if (name.equals("timestamp")) { 5066 throw new FHIRException("Cannot call addChild on a singleton property Bundle.timestamp"); 5067 } 5068 else if (name.equals("total")) { 5069 throw new FHIRException("Cannot call addChild on a singleton property Bundle.total"); 5070 } 5071 else if (name.equals("link")) { 5072 return addLink(); 5073 } 5074 else if (name.equals("entry")) { 5075 return addEntry(); 5076 } 5077 else if (name.equals("signature")) { 5078 this.signature = new Signature(); 5079 return this.signature; 5080 } 5081 else if (name.equals("issues")) { 5082 throw new FHIRException("Cannot call addChild on an abstract type Bundle.issues"); 5083 } 5084 else 5085 return super.addChild(name); 5086 } 5087 5088 public String fhirType() { 5089 return "Bundle"; 5090 5091 } 5092 5093 public Bundle copy() { 5094 Bundle dst = new Bundle(); 5095 copyValues(dst); 5096 return dst; 5097 } 5098 5099 public void copyValues(Bundle dst) { 5100 super.copyValues(dst); 5101 dst.identifier = identifier == null ? null : identifier.copy(); 5102 dst.type = type == null ? null : type.copy(); 5103 dst.timestamp = timestamp == null ? null : timestamp.copy(); 5104 dst.total = total == null ? null : total.copy(); 5105 if (link != null) { 5106 dst.link = new ArrayList<BundleLinkComponent>(); 5107 for (BundleLinkComponent i : link) 5108 dst.link.add(i.copy()); 5109 }; 5110 if (entry != null) { 5111 dst.entry = new ArrayList<BundleEntryComponent>(); 5112 for (BundleEntryComponent i : entry) 5113 dst.entry.add(i.copy()); 5114 }; 5115 dst.signature = signature == null ? null : signature.copy(); 5116 dst.issues = issues == null ? null : issues.copy(); 5117 } 5118 5119 protected Bundle typedCopy() { 5120 return copy(); 5121 } 5122 5123 @Override 5124 public boolean equalsDeep(Base other_) { 5125 if (!super.equalsDeep(other_)) 5126 return false; 5127 if (!(other_ instanceof Bundle)) 5128 return false; 5129 Bundle o = (Bundle) other_; 5130 return compareDeep(identifier, o.identifier, true) && compareDeep(type, o.type, true) && compareDeep(timestamp, o.timestamp, true) 5131 && compareDeep(total, o.total, true) && compareDeep(link, o.link, true) && compareDeep(entry, o.entry, true) 5132 && compareDeep(signature, o.signature, true) && compareDeep(issues, o.issues, true); 5133 } 5134 5135 @Override 5136 public boolean equalsShallow(Base other_) { 5137 if (!super.equalsShallow(other_)) 5138 return false; 5139 if (!(other_ instanceof Bundle)) 5140 return false; 5141 Bundle o = (Bundle) other_; 5142 return compareValues(type, o.type, true) && compareValues(timestamp, o.timestamp, true) && compareValues(total, o.total, true) 5143 ; 5144 } 5145 5146 public boolean isEmpty() { 5147 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(identifier, type, timestamp 5148 , total, link, entry, signature, issues); 5149 } 5150 5151 @Override 5152 public ResourceType getResourceType() { 5153 return ResourceType.Bundle; 5154 } 5155 5156 /** 5157 * Search parameter: <b>composition</b> 5158 * <p> 5159 * 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> 5160 * Type: <b>reference</b><br> 5161 * Path: <b>Bundle.entry[0].resource as Composition</b><br> 5162 * </p> 5163 */ 5164 @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 } ) 5165 public static final String SP_COMPOSITION = "composition"; 5166 /** 5167 * <b>Fluent Client</b> search parameter constant for <b>composition</b> 5168 * <p> 5169 * 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> 5170 * Type: <b>reference</b><br> 5171 * Path: <b>Bundle.entry[0].resource as Composition</b><br> 5172 * </p> 5173 */ 5174 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSITION = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_COMPOSITION); 5175 5176/** 5177 * Constant for fluent queries to be used to add include statements. Specifies 5178 * the path value of "<b>Bundle:composition</b>". 5179 */ 5180 public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSITION = new ca.uhn.fhir.model.api.Include("Bundle:composition").toLocked(); 5181 5182 /** 5183 * Search parameter: <b>identifier</b> 5184 * <p> 5185 * Description: <b>Persistent identifier for the bundle</b><br> 5186 * Type: <b>token</b><br> 5187 * Path: <b>Bundle.identifier</b><br> 5188 * </p> 5189 */ 5190 @SearchParamDefinition(name="identifier", path="Bundle.identifier", description="Persistent identifier for the bundle", type="token" ) 5191 public static final String SP_IDENTIFIER = "identifier"; 5192 /** 5193 * <b>Fluent Client</b> search parameter constant for <b>identifier</b> 5194 * <p> 5195 * Description: <b>Persistent identifier for the bundle</b><br> 5196 * Type: <b>token</b><br> 5197 * Path: <b>Bundle.identifier</b><br> 5198 * </p> 5199 */ 5200 public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_IDENTIFIER); 5201 5202 /** 5203 * Search parameter: <b>message</b> 5204 * <p> 5205 * 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> 5206 * Type: <b>reference</b><br> 5207 * Path: <b>Bundle.entry[0].resource as MessageHeader</b><br> 5208 * </p> 5209 */ 5210 @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 } ) 5211 public static final String SP_MESSAGE = "message"; 5212 /** 5213 * <b>Fluent Client</b> search parameter constant for <b>message</b> 5214 * <p> 5215 * 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> 5216 * Type: <b>reference</b><br> 5217 * Path: <b>Bundle.entry[0].resource as MessageHeader</b><br> 5218 * </p> 5219 */ 5220 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MESSAGE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_MESSAGE); 5221 5222/** 5223 * Constant for fluent queries to be used to add include statements. Specifies 5224 * the path value of "<b>Bundle:message</b>". 5225 */ 5226 public static final ca.uhn.fhir.model.api.Include INCLUDE_MESSAGE = new ca.uhn.fhir.model.api.Include("Bundle:message").toLocked(); 5227 5228 /** 5229 * Search parameter: <b>timestamp</b> 5230 * <p> 5231 * Description: <b>When the bundle was assembled</b><br> 5232 * Type: <b>date</b><br> 5233 * Path: <b>Bundle.timestamp</b><br> 5234 * </p> 5235 */ 5236 @SearchParamDefinition(name="timestamp", path="Bundle.timestamp", description="When the bundle was assembled", type="date" ) 5237 public static final String SP_TIMESTAMP = "timestamp"; 5238 /** 5239 * <b>Fluent Client</b> search parameter constant for <b>timestamp</b> 5240 * <p> 5241 * Description: <b>When the bundle was assembled</b><br> 5242 * Type: <b>date</b><br> 5243 * Path: <b>Bundle.timestamp</b><br> 5244 * </p> 5245 */ 5246 public static final ca.uhn.fhir.rest.gclient.DateClientParam TIMESTAMP = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_TIMESTAMP); 5247 5248 /** 5249 * Search parameter: <b>type</b> 5250 * <p> 5251 * Description: <b>document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection | subscription-notification</b><br> 5252 * Type: <b>token</b><br> 5253 * Path: <b>Bundle.type</b><br> 5254 * </p> 5255 */ 5256 @SearchParamDefinition(name="type", path="Bundle.type", description="document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection | subscription-notification", type="token" ) 5257 public static final String SP_TYPE = "type"; 5258 /** 5259 * <b>Fluent Client</b> search parameter constant for <b>type</b> 5260 * <p> 5261 * Description: <b>document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection | subscription-notification</b><br> 5262 * Type: <b>token</b><br> 5263 * Path: <b>Bundle.type</b><br> 5264 * </p> 5265 */ 5266 public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_TYPE); 5267 5268 /** 5269 * Search parameter: <b>example-constraint</b> 5270 * <p> 5271 * Description: <b>Search Composition Bundle</b><br> 5272 * Type: <b>reference</b><br> 5273 * Path: <b>Bundle.entry[0].resource</b><br> 5274 * </p> 5275 */ 5276 @SearchParamDefinition(name="example-constraint", path="Bundle.entry[0].resource", description="Search Composition Bundle", type="reference", target={Composition.class } ) 5277 public static final String SP_EXAMPLE_CONSTRAINT = "example-constraint"; 5278 /** 5279 * <b>Fluent Client</b> search parameter constant for <b>example-constraint</b> 5280 * <p> 5281 * Description: <b>Search Composition Bundle</b><br> 5282 * Type: <b>reference</b><br> 5283 * Path: <b>Bundle.entry[0].resource</b><br> 5284 * </p> 5285 */ 5286 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam EXAMPLE_CONSTRAINT = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_EXAMPLE_CONSTRAINT); 5287 5288/** 5289 * Constant for fluent queries to be used to add include statements. Specifies 5290 * the path value of "<b>Bundle:example-constraint</b>". 5291 */ 5292 public static final ca.uhn.fhir.model.api.Include INCLUDE_EXAMPLE_CONSTRAINT = new ca.uhn.fhir.model.api.Include("Bundle:example-constraint").toLocked(); 5293 5294// Manual code (from Configuration.txt): 5295/** 5296 * Returns the {@link #getLink() link} which matches a given {@link BundleLinkComponent#getRelation() relation}. 5297 * If no link is found which matches the given relation, returns <code>null</code>. If more than one 5298 * link is found which matches the given relation, returns the first matching BundleLinkComponent. 5299 * 5300 * @param theRelation 5301 * The relation, such as \"next\", or \"self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}. 5302 * @return Returns a matching BundleLinkComponent, or <code>null</code> 5303 * @see IBaseBundle#LINK_NEXT 5304 * @see IBaseBundle#LINK_PREV 5305 * @see IBaseBundle#LINK_SELF 5306 */ 5307 public BundleLinkComponent getLink(String theRelation) { 5308 org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty"); 5309 for (BundleLinkComponent next : getLink()) { 5310 if (theRelation.equals(next.getRelation().toCode())) { 5311 return next; 5312 } 5313 } 5314 return null; 5315 } 5316 5317 /** 5318 * Returns the {@link #getLink() link} which matches a given {@link BundleLinkComponent#getRelation() relation}. 5319 * If no link is found which matches the given relation, creates a new BundleLinkComponent with the 5320 * given relation and adds it to this Bundle. If more than one 5321 * link is found which matches the given relation, returns the first matching BundleLinkComponent. 5322 * 5323 * @param theRelation 5324 * The relation, such as \"next\", or \"self. See the constants such as {@link IBaseBundle#LINK_SELF} and {@link IBaseBundle#LINK_NEXT}. 5325 * @return Returns a matching BundleLinkComponent, or <code>null</code> 5326 * @see IBaseBundle#LINK_NEXT 5327 * @see IBaseBundle#LINK_PREV 5328 * @see IBaseBundle#LINK_SELF 5329 */ 5330 public BundleLinkComponent getLinkOrCreate(String theRelation) { 5331 org.apache.commons.lang3.Validate.notBlank(theRelation, "theRelation may not be null or empty"); 5332 for (BundleLinkComponent next : getLink()) { 5333 if (theRelation.equals(next.getRelation().toCode())) { 5334 return next; 5335 } 5336 } 5337 BundleLinkComponent retVal = new BundleLinkComponent(); 5338 retVal.setRelation(LinkRelationTypes.fromCode(theRelation)); 5339 getLink().add(retVal); 5340 return retVal; 5341 } 5342// end addition 5343 5344} 5345