001package org.hl7.fhir.dstu2016may.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Sun, May 8, 2016 03:05+1000 for FHIR v1.4.0 033import java.util.ArrayList; 034import java.util.Date; 035import java.util.List; 036 037import org.hl7.fhir.dstu2016may.model.Enumerations.ConformanceResourceStatus; 038import org.hl7.fhir.dstu2016may.model.Enumerations.ConformanceResourceStatusEnumFactory; 039import org.hl7.fhir.exceptions.FHIRException; 040import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 041import org.hl7.fhir.utilities.Utilities; 042 043import ca.uhn.fhir.model.api.annotation.Block; 044import ca.uhn.fhir.model.api.annotation.Child; 045import ca.uhn.fhir.model.api.annotation.Description; 046import ca.uhn.fhir.model.api.annotation.ResourceDef; 047import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 048/** 049 * A set of rules or how FHIR is used to solve a particular problem. This resource is used to gather all the parts of an implementation guide into a logical whole, and to publish a computable definition of all the parts. 050 */ 051@ResourceDef(name="ImplementationGuide", profile="http://hl7.org/fhir/Profile/ImplementationGuide") 052public class ImplementationGuide extends DomainResource { 053 054 public enum GuideDependencyType { 055 /** 056 * The guide is referred to by URL. 057 */ 058 REFERENCE, 059 /** 060 * The guide is embedded in this guide when published. 061 */ 062 INCLUSION, 063 /** 064 * added to help the parsers 065 */ 066 NULL; 067 public static GuideDependencyType fromCode(String codeString) throws FHIRException { 068 if (codeString == null || "".equals(codeString)) 069 return null; 070 if ("reference".equals(codeString)) 071 return REFERENCE; 072 if ("inclusion".equals(codeString)) 073 return INCLUSION; 074 throw new FHIRException("Unknown GuideDependencyType code '"+codeString+"'"); 075 } 076 public String toCode() { 077 switch (this) { 078 case REFERENCE: return "reference"; 079 case INCLUSION: return "inclusion"; 080 default: return "?"; 081 } 082 } 083 public String getSystem() { 084 switch (this) { 085 case REFERENCE: return "http://hl7.org/fhir/guide-dependency-type"; 086 case INCLUSION: return "http://hl7.org/fhir/guide-dependency-type"; 087 default: return "?"; 088 } 089 } 090 public String getDefinition() { 091 switch (this) { 092 case REFERENCE: return "The guide is referred to by URL."; 093 case INCLUSION: return "The guide is embedded in this guide when published."; 094 default: return "?"; 095 } 096 } 097 public String getDisplay() { 098 switch (this) { 099 case REFERENCE: return "Reference"; 100 case INCLUSION: return "Inclusion"; 101 default: return "?"; 102 } 103 } 104 } 105 106 public static class GuideDependencyTypeEnumFactory implements EnumFactory<GuideDependencyType> { 107 public GuideDependencyType fromCode(String codeString) throws IllegalArgumentException { 108 if (codeString == null || "".equals(codeString)) 109 if (codeString == null || "".equals(codeString)) 110 return null; 111 if ("reference".equals(codeString)) 112 return GuideDependencyType.REFERENCE; 113 if ("inclusion".equals(codeString)) 114 return GuideDependencyType.INCLUSION; 115 throw new IllegalArgumentException("Unknown GuideDependencyType code '"+codeString+"'"); 116 } 117 public Enumeration<GuideDependencyType> fromType(Base code) throws FHIRException { 118 if (code == null || code.isEmpty()) 119 return null; 120 String codeString = ((PrimitiveType) code).asStringValue(); 121 if (codeString == null || "".equals(codeString)) 122 return null; 123 if ("reference".equals(codeString)) 124 return new Enumeration<GuideDependencyType>(this, GuideDependencyType.REFERENCE); 125 if ("inclusion".equals(codeString)) 126 return new Enumeration<GuideDependencyType>(this, GuideDependencyType.INCLUSION); 127 throw new FHIRException("Unknown GuideDependencyType code '"+codeString+"'"); 128 } 129 public String toCode(GuideDependencyType code) { 130 if (code == GuideDependencyType.REFERENCE) 131 return "reference"; 132 if (code == GuideDependencyType.INCLUSION) 133 return "inclusion"; 134 return "?"; 135 } 136 public String toSystem(GuideDependencyType code) { 137 return code.getSystem(); 138 } 139 } 140 141 public enum GuidePageKind { 142 /** 143 * This is a page of content that is included in the implementation guide. It has no particular function. 144 */ 145 PAGE, 146 /** 147 * This is a page that represents a human readable rendering of an example. 148 */ 149 EXAMPLE, 150 /** 151 * This is a page that represents a list of resources of one or more types. 152 */ 153 LIST, 154 /** 155 * This is a page showing where an included guide is injected. 156 */ 157 INCLUDE, 158 /** 159 * This is a page that lists the resources of a given type, and also creates pages for all the listed types as other pages in the section. 160 */ 161 DIRECTORY, 162 /** 163 * This is a page that creates the listed resources as a dictionary. 164 */ 165 DICTIONARY, 166 /** 167 * This is a generated page that contains the table of contents. 168 */ 169 TOC, 170 /** 171 * This is a page that represents a presented resource. This is typically used for generated conformance resource presentations. 172 */ 173 RESOURCE, 174 /** 175 * added to help the parsers 176 */ 177 NULL; 178 public static GuidePageKind fromCode(String codeString) throws FHIRException { 179 if (codeString == null || "".equals(codeString)) 180 return null; 181 if ("page".equals(codeString)) 182 return PAGE; 183 if ("example".equals(codeString)) 184 return EXAMPLE; 185 if ("list".equals(codeString)) 186 return LIST; 187 if ("include".equals(codeString)) 188 return INCLUDE; 189 if ("directory".equals(codeString)) 190 return DIRECTORY; 191 if ("dictionary".equals(codeString)) 192 return DICTIONARY; 193 if ("toc".equals(codeString)) 194 return TOC; 195 if ("resource".equals(codeString)) 196 return RESOURCE; 197 throw new FHIRException("Unknown GuidePageKind code '"+codeString+"'"); 198 } 199 public String toCode() { 200 switch (this) { 201 case PAGE: return "page"; 202 case EXAMPLE: return "example"; 203 case LIST: return "list"; 204 case INCLUDE: return "include"; 205 case DIRECTORY: return "directory"; 206 case DICTIONARY: return "dictionary"; 207 case TOC: return "toc"; 208 case RESOURCE: return "resource"; 209 default: return "?"; 210 } 211 } 212 public String getSystem() { 213 switch (this) { 214 case PAGE: return "http://hl7.org/fhir/guide-page-kind"; 215 case EXAMPLE: return "http://hl7.org/fhir/guide-page-kind"; 216 case LIST: return "http://hl7.org/fhir/guide-page-kind"; 217 case INCLUDE: return "http://hl7.org/fhir/guide-page-kind"; 218 case DIRECTORY: return "http://hl7.org/fhir/guide-page-kind"; 219 case DICTIONARY: return "http://hl7.org/fhir/guide-page-kind"; 220 case TOC: return "http://hl7.org/fhir/guide-page-kind"; 221 case RESOURCE: return "http://hl7.org/fhir/guide-page-kind"; 222 default: return "?"; 223 } 224 } 225 public String getDefinition() { 226 switch (this) { 227 case PAGE: return "This is a page of content that is included in the implementation guide. It has no particular function."; 228 case EXAMPLE: return "This is a page that represents a human readable rendering of an example."; 229 case LIST: return "This is a page that represents a list of resources of one or more types."; 230 case INCLUDE: return "This is a page showing where an included guide is injected."; 231 case DIRECTORY: return "This is a page that lists the resources of a given type, and also creates pages for all the listed types as other pages in the section."; 232 case DICTIONARY: return "This is a page that creates the listed resources as a dictionary."; 233 case TOC: return "This is a generated page that contains the table of contents."; 234 case RESOURCE: return "This is a page that represents a presented resource. This is typically used for generated conformance resource presentations."; 235 default: return "?"; 236 } 237 } 238 public String getDisplay() { 239 switch (this) { 240 case PAGE: return "Page"; 241 case EXAMPLE: return "Example"; 242 case LIST: return "List"; 243 case INCLUDE: return "Include"; 244 case DIRECTORY: return "Directory"; 245 case DICTIONARY: return "Dictionary"; 246 case TOC: return "Table Of Contents"; 247 case RESOURCE: return "Resource"; 248 default: return "?"; 249 } 250 } 251 } 252 253 public static class GuidePageKindEnumFactory implements EnumFactory<GuidePageKind> { 254 public GuidePageKind fromCode(String codeString) throws IllegalArgumentException { 255 if (codeString == null || "".equals(codeString)) 256 if (codeString == null || "".equals(codeString)) 257 return null; 258 if ("page".equals(codeString)) 259 return GuidePageKind.PAGE; 260 if ("example".equals(codeString)) 261 return GuidePageKind.EXAMPLE; 262 if ("list".equals(codeString)) 263 return GuidePageKind.LIST; 264 if ("include".equals(codeString)) 265 return GuidePageKind.INCLUDE; 266 if ("directory".equals(codeString)) 267 return GuidePageKind.DIRECTORY; 268 if ("dictionary".equals(codeString)) 269 return GuidePageKind.DICTIONARY; 270 if ("toc".equals(codeString)) 271 return GuidePageKind.TOC; 272 if ("resource".equals(codeString)) 273 return GuidePageKind.RESOURCE; 274 throw new IllegalArgumentException("Unknown GuidePageKind code '"+codeString+"'"); 275 } 276 public Enumeration<GuidePageKind> fromType(Base code) throws FHIRException { 277 if (code == null || code.isEmpty()) 278 return null; 279 String codeString = ((PrimitiveType) code).asStringValue(); 280 if (codeString == null || "".equals(codeString)) 281 return null; 282 if ("page".equals(codeString)) 283 return new Enumeration<GuidePageKind>(this, GuidePageKind.PAGE); 284 if ("example".equals(codeString)) 285 return new Enumeration<GuidePageKind>(this, GuidePageKind.EXAMPLE); 286 if ("list".equals(codeString)) 287 return new Enumeration<GuidePageKind>(this, GuidePageKind.LIST); 288 if ("include".equals(codeString)) 289 return new Enumeration<GuidePageKind>(this, GuidePageKind.INCLUDE); 290 if ("directory".equals(codeString)) 291 return new Enumeration<GuidePageKind>(this, GuidePageKind.DIRECTORY); 292 if ("dictionary".equals(codeString)) 293 return new Enumeration<GuidePageKind>(this, GuidePageKind.DICTIONARY); 294 if ("toc".equals(codeString)) 295 return new Enumeration<GuidePageKind>(this, GuidePageKind.TOC); 296 if ("resource".equals(codeString)) 297 return new Enumeration<GuidePageKind>(this, GuidePageKind.RESOURCE); 298 throw new FHIRException("Unknown GuidePageKind code '"+codeString+"'"); 299 } 300 public String toCode(GuidePageKind code) { 301 if (code == GuidePageKind.PAGE) 302 return "page"; 303 if (code == GuidePageKind.EXAMPLE) 304 return "example"; 305 if (code == GuidePageKind.LIST) 306 return "list"; 307 if (code == GuidePageKind.INCLUDE) 308 return "include"; 309 if (code == GuidePageKind.DIRECTORY) 310 return "directory"; 311 if (code == GuidePageKind.DICTIONARY) 312 return "dictionary"; 313 if (code == GuidePageKind.TOC) 314 return "toc"; 315 if (code == GuidePageKind.RESOURCE) 316 return "resource"; 317 return "?"; 318 } 319 public String toSystem(GuidePageKind code) { 320 return code.getSystem(); 321 } 322 } 323 324 @Block() 325 public static class ImplementationGuideContactComponent extends BackboneElement implements IBaseBackboneElement { 326 /** 327 * The name of an individual to contact regarding the implementation guide. 328 */ 329 @Child(name = "name", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 330 @Description(shortDefinition="Name of an individual to contact", formalDefinition="The name of an individual to contact regarding the implementation guide." ) 331 protected StringType name; 332 333 /** 334 * Contact details for individual (if a name was provided) or the publisher. 335 */ 336 @Child(name = "telecom", type = {ContactPoint.class}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 337 @Description(shortDefinition="Contact details for individual or publisher", formalDefinition="Contact details for individual (if a name was provided) or the publisher." ) 338 protected List<ContactPoint> telecom; 339 340 private static final long serialVersionUID = -1179697803L; 341 342 /** 343 * Constructor 344 */ 345 public ImplementationGuideContactComponent() { 346 super(); 347 } 348 349 /** 350 * @return {@link #name} (The name of an individual to contact regarding the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 351 */ 352 public StringType getNameElement() { 353 if (this.name == null) 354 if (Configuration.errorOnAutoCreate()) 355 throw new Error("Attempt to auto-create ImplementationGuideContactComponent.name"); 356 else if (Configuration.doAutoCreate()) 357 this.name = new StringType(); // bb 358 return this.name; 359 } 360 361 public boolean hasNameElement() { 362 return this.name != null && !this.name.isEmpty(); 363 } 364 365 public boolean hasName() { 366 return this.name != null && !this.name.isEmpty(); 367 } 368 369 /** 370 * @param value {@link #name} (The name of an individual to contact regarding the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 371 */ 372 public ImplementationGuideContactComponent setNameElement(StringType value) { 373 this.name = value; 374 return this; 375 } 376 377 /** 378 * @return The name of an individual to contact regarding the implementation guide. 379 */ 380 public String getName() { 381 return this.name == null ? null : this.name.getValue(); 382 } 383 384 /** 385 * @param value The name of an individual to contact regarding the implementation guide. 386 */ 387 public ImplementationGuideContactComponent setName(String value) { 388 if (Utilities.noString(value)) 389 this.name = null; 390 else { 391 if (this.name == null) 392 this.name = new StringType(); 393 this.name.setValue(value); 394 } 395 return this; 396 } 397 398 /** 399 * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) 400 */ 401 public List<ContactPoint> getTelecom() { 402 if (this.telecom == null) 403 this.telecom = new ArrayList<ContactPoint>(); 404 return this.telecom; 405 } 406 407 public boolean hasTelecom() { 408 if (this.telecom == null) 409 return false; 410 for (ContactPoint item : this.telecom) 411 if (!item.isEmpty()) 412 return true; 413 return false; 414 } 415 416 /** 417 * @return {@link #telecom} (Contact details for individual (if a name was provided) or the publisher.) 418 */ 419 // syntactic sugar 420 public ContactPoint addTelecom() { //3 421 ContactPoint t = new ContactPoint(); 422 if (this.telecom == null) 423 this.telecom = new ArrayList<ContactPoint>(); 424 this.telecom.add(t); 425 return t; 426 } 427 428 // syntactic sugar 429 public ImplementationGuideContactComponent addTelecom(ContactPoint t) { //3 430 if (t == null) 431 return this; 432 if (this.telecom == null) 433 this.telecom = new ArrayList<ContactPoint>(); 434 this.telecom.add(t); 435 return this; 436 } 437 438 protected void listChildren(List<Property> childrenList) { 439 super.listChildren(childrenList); 440 childrenList.add(new Property("name", "string", "The name of an individual to contact regarding the implementation guide.", 0, java.lang.Integer.MAX_VALUE, name)); 441 childrenList.add(new Property("telecom", "ContactPoint", "Contact details for individual (if a name was provided) or the publisher.", 0, java.lang.Integer.MAX_VALUE, telecom)); 442 } 443 444 @Override 445 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 446 switch (hash) { 447 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 448 case -1429363305: /*telecom*/ return this.telecom == null ? new Base[0] : this.telecom.toArray(new Base[this.telecom.size()]); // ContactPoint 449 default: return super.getProperty(hash, name, checkValid); 450 } 451 452 } 453 454 @Override 455 public void setProperty(int hash, String name, Base value) throws FHIRException { 456 switch (hash) { 457 case 3373707: // name 458 this.name = castToString(value); // StringType 459 break; 460 case -1429363305: // telecom 461 this.getTelecom().add(castToContactPoint(value)); // ContactPoint 462 break; 463 default: super.setProperty(hash, name, value); 464 } 465 466 } 467 468 @Override 469 public void setProperty(String name, Base value) throws FHIRException { 470 if (name.equals("name")) 471 this.name = castToString(value); // StringType 472 else if (name.equals("telecom")) 473 this.getTelecom().add(castToContactPoint(value)); 474 else 475 super.setProperty(name, value); 476 } 477 478 @Override 479 public Base makeProperty(int hash, String name) throws FHIRException { 480 switch (hash) { 481 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 482 case -1429363305: return addTelecom(); // ContactPoint 483 default: return super.makeProperty(hash, name); 484 } 485 486 } 487 488 @Override 489 public Base addChild(String name) throws FHIRException { 490 if (name.equals("name")) { 491 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); 492 } 493 else if (name.equals("telecom")) { 494 return addTelecom(); 495 } 496 else 497 return super.addChild(name); 498 } 499 500 public ImplementationGuideContactComponent copy() { 501 ImplementationGuideContactComponent dst = new ImplementationGuideContactComponent(); 502 copyValues(dst); 503 dst.name = name == null ? null : name.copy(); 504 if (telecom != null) { 505 dst.telecom = new ArrayList<ContactPoint>(); 506 for (ContactPoint i : telecom) 507 dst.telecom.add(i.copy()); 508 }; 509 return dst; 510 } 511 512 @Override 513 public boolean equalsDeep(Base other) { 514 if (!super.equalsDeep(other)) 515 return false; 516 if (!(other instanceof ImplementationGuideContactComponent)) 517 return false; 518 ImplementationGuideContactComponent o = (ImplementationGuideContactComponent) other; 519 return compareDeep(name, o.name, true) && compareDeep(telecom, o.telecom, true); 520 } 521 522 @Override 523 public boolean equalsShallow(Base other) { 524 if (!super.equalsShallow(other)) 525 return false; 526 if (!(other instanceof ImplementationGuideContactComponent)) 527 return false; 528 ImplementationGuideContactComponent o = (ImplementationGuideContactComponent) other; 529 return compareValues(name, o.name, true); 530 } 531 532 public boolean isEmpty() { 533 return super.isEmpty() && (name == null || name.isEmpty()) && (telecom == null || telecom.isEmpty()) 534 ; 535 } 536 537 public String fhirType() { 538 return "ImplementationGuide.contact"; 539 540 } 541 542 } 543 544 @Block() 545 public static class ImplementationGuideDependencyComponent extends BackboneElement implements IBaseBackboneElement { 546 /** 547 * How the dependency is represented when the guide is published. 548 */ 549 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 550 @Description(shortDefinition="reference | inclusion", formalDefinition="How the dependency is represented when the guide is published." ) 551 protected Enumeration<GuideDependencyType> type; 552 553 /** 554 * Where the dependency is located. 555 */ 556 @Child(name = "uri", type = {UriType.class}, order=2, min=1, max=1, modifier=false, summary=true) 557 @Description(shortDefinition="Where to find dependency", formalDefinition="Where the dependency is located." ) 558 protected UriType uri; 559 560 private static final long serialVersionUID = 162447098L; 561 562 /** 563 * Constructor 564 */ 565 public ImplementationGuideDependencyComponent() { 566 super(); 567 } 568 569 /** 570 * Constructor 571 */ 572 public ImplementationGuideDependencyComponent(Enumeration<GuideDependencyType> type, UriType uri) { 573 super(); 574 this.type = type; 575 this.uri = uri; 576 } 577 578 /** 579 * @return {@link #type} (How the dependency is represented when the guide is published.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 580 */ 581 public Enumeration<GuideDependencyType> getTypeElement() { 582 if (this.type == null) 583 if (Configuration.errorOnAutoCreate()) 584 throw new Error("Attempt to auto-create ImplementationGuideDependencyComponent.type"); 585 else if (Configuration.doAutoCreate()) 586 this.type = new Enumeration<GuideDependencyType>(new GuideDependencyTypeEnumFactory()); // bb 587 return this.type; 588 } 589 590 public boolean hasTypeElement() { 591 return this.type != null && !this.type.isEmpty(); 592 } 593 594 public boolean hasType() { 595 return this.type != null && !this.type.isEmpty(); 596 } 597 598 /** 599 * @param value {@link #type} (How the dependency is represented when the guide is published.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 600 */ 601 public ImplementationGuideDependencyComponent setTypeElement(Enumeration<GuideDependencyType> value) { 602 this.type = value; 603 return this; 604 } 605 606 /** 607 * @return How the dependency is represented when the guide is published. 608 */ 609 public GuideDependencyType getType() { 610 return this.type == null ? null : this.type.getValue(); 611 } 612 613 /** 614 * @param value How the dependency is represented when the guide is published. 615 */ 616 public ImplementationGuideDependencyComponent setType(GuideDependencyType value) { 617 if (this.type == null) 618 this.type = new Enumeration<GuideDependencyType>(new GuideDependencyTypeEnumFactory()); 619 this.type.setValue(value); 620 return this; 621 } 622 623 /** 624 * @return {@link #uri} (Where the dependency is located.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value 625 */ 626 public UriType getUriElement() { 627 if (this.uri == null) 628 if (Configuration.errorOnAutoCreate()) 629 throw new Error("Attempt to auto-create ImplementationGuideDependencyComponent.uri"); 630 else if (Configuration.doAutoCreate()) 631 this.uri = new UriType(); // bb 632 return this.uri; 633 } 634 635 public boolean hasUriElement() { 636 return this.uri != null && !this.uri.isEmpty(); 637 } 638 639 public boolean hasUri() { 640 return this.uri != null && !this.uri.isEmpty(); 641 } 642 643 /** 644 * @param value {@link #uri} (Where the dependency is located.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value 645 */ 646 public ImplementationGuideDependencyComponent setUriElement(UriType value) { 647 this.uri = value; 648 return this; 649 } 650 651 /** 652 * @return Where the dependency is located. 653 */ 654 public String getUri() { 655 return this.uri == null ? null : this.uri.getValue(); 656 } 657 658 /** 659 * @param value Where the dependency is located. 660 */ 661 public ImplementationGuideDependencyComponent setUri(String value) { 662 if (this.uri == null) 663 this.uri = new UriType(); 664 this.uri.setValue(value); 665 return this; 666 } 667 668 protected void listChildren(List<Property> childrenList) { 669 super.listChildren(childrenList); 670 childrenList.add(new Property("type", "code", "How the dependency is represented when the guide is published.", 0, java.lang.Integer.MAX_VALUE, type)); 671 childrenList.add(new Property("uri", "uri", "Where the dependency is located.", 0, java.lang.Integer.MAX_VALUE, uri)); 672 } 673 674 @Override 675 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 676 switch (hash) { 677 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // Enumeration<GuideDependencyType> 678 case 116076: /*uri*/ return this.uri == null ? new Base[0] : new Base[] {this.uri}; // UriType 679 default: return super.getProperty(hash, name, checkValid); 680 } 681 682 } 683 684 @Override 685 public void setProperty(int hash, String name, Base value) throws FHIRException { 686 switch (hash) { 687 case 3575610: // type 688 this.type = new GuideDependencyTypeEnumFactory().fromType(value); // Enumeration<GuideDependencyType> 689 break; 690 case 116076: // uri 691 this.uri = castToUri(value); // UriType 692 break; 693 default: super.setProperty(hash, name, value); 694 } 695 696 } 697 698 @Override 699 public void setProperty(String name, Base value) throws FHIRException { 700 if (name.equals("type")) 701 this.type = new GuideDependencyTypeEnumFactory().fromType(value); // Enumeration<GuideDependencyType> 702 else if (name.equals("uri")) 703 this.uri = castToUri(value); // UriType 704 else 705 super.setProperty(name, value); 706 } 707 708 @Override 709 public Base makeProperty(int hash, String name) throws FHIRException { 710 switch (hash) { 711 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // Enumeration<GuideDependencyType> 712 case 116076: throw new FHIRException("Cannot make property uri as it is not a complex type"); // UriType 713 default: return super.makeProperty(hash, name); 714 } 715 716 } 717 718 @Override 719 public Base addChild(String name) throws FHIRException { 720 if (name.equals("type")) { 721 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.type"); 722 } 723 else if (name.equals("uri")) { 724 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.uri"); 725 } 726 else 727 return super.addChild(name); 728 } 729 730 public ImplementationGuideDependencyComponent copy() { 731 ImplementationGuideDependencyComponent dst = new ImplementationGuideDependencyComponent(); 732 copyValues(dst); 733 dst.type = type == null ? null : type.copy(); 734 dst.uri = uri == null ? null : uri.copy(); 735 return dst; 736 } 737 738 @Override 739 public boolean equalsDeep(Base other) { 740 if (!super.equalsDeep(other)) 741 return false; 742 if (!(other instanceof ImplementationGuideDependencyComponent)) 743 return false; 744 ImplementationGuideDependencyComponent o = (ImplementationGuideDependencyComponent) other; 745 return compareDeep(type, o.type, true) && compareDeep(uri, o.uri, true); 746 } 747 748 @Override 749 public boolean equalsShallow(Base other) { 750 if (!super.equalsShallow(other)) 751 return false; 752 if (!(other instanceof ImplementationGuideDependencyComponent)) 753 return false; 754 ImplementationGuideDependencyComponent o = (ImplementationGuideDependencyComponent) other; 755 return compareValues(type, o.type, true) && compareValues(uri, o.uri, true); 756 } 757 758 public boolean isEmpty() { 759 return super.isEmpty() && (type == null || type.isEmpty()) && (uri == null || uri.isEmpty()) 760 ; 761 } 762 763 public String fhirType() { 764 return "ImplementationGuide.dependency"; 765 766 } 767 768 } 769 770 @Block() 771 public static class ImplementationGuidePackageComponent extends BackboneElement implements IBaseBackboneElement { 772 /** 773 * The name for the group, as used in page.package. 774 */ 775 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) 776 @Description(shortDefinition="Name used .page.package", formalDefinition="The name for the group, as used in page.package." ) 777 protected StringType name; 778 779 /** 780 * Human readable text describing the package. 781 */ 782 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 783 @Description(shortDefinition="Human readable text describing the package", formalDefinition="Human readable text describing the package." ) 784 protected StringType description; 785 786 /** 787 * A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource. 788 */ 789 @Child(name = "resource", type = {}, order=3, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 790 @Description(shortDefinition="Resource in the implementation guide", formalDefinition="A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource." ) 791 protected List<ImplementationGuidePackageResourceComponent> resource; 792 793 private static final long serialVersionUID = -701846580L; 794 795 /** 796 * Constructor 797 */ 798 public ImplementationGuidePackageComponent() { 799 super(); 800 } 801 802 /** 803 * Constructor 804 */ 805 public ImplementationGuidePackageComponent(StringType name) { 806 super(); 807 this.name = name; 808 } 809 810 /** 811 * @return {@link #name} (The name for the group, as used in page.package.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 812 */ 813 public StringType getNameElement() { 814 if (this.name == null) 815 if (Configuration.errorOnAutoCreate()) 816 throw new Error("Attempt to auto-create ImplementationGuidePackageComponent.name"); 817 else if (Configuration.doAutoCreate()) 818 this.name = new StringType(); // bb 819 return this.name; 820 } 821 822 public boolean hasNameElement() { 823 return this.name != null && !this.name.isEmpty(); 824 } 825 826 public boolean hasName() { 827 return this.name != null && !this.name.isEmpty(); 828 } 829 830 /** 831 * @param value {@link #name} (The name for the group, as used in page.package.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 832 */ 833 public ImplementationGuidePackageComponent setNameElement(StringType value) { 834 this.name = value; 835 return this; 836 } 837 838 /** 839 * @return The name for the group, as used in page.package. 840 */ 841 public String getName() { 842 return this.name == null ? null : this.name.getValue(); 843 } 844 845 /** 846 * @param value The name for the group, as used in page.package. 847 */ 848 public ImplementationGuidePackageComponent setName(String value) { 849 if (this.name == null) 850 this.name = new StringType(); 851 this.name.setValue(value); 852 return this; 853 } 854 855 /** 856 * @return {@link #description} (Human readable text describing the package.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 857 */ 858 public StringType getDescriptionElement() { 859 if (this.description == null) 860 if (Configuration.errorOnAutoCreate()) 861 throw new Error("Attempt to auto-create ImplementationGuidePackageComponent.description"); 862 else if (Configuration.doAutoCreate()) 863 this.description = new StringType(); // bb 864 return this.description; 865 } 866 867 public boolean hasDescriptionElement() { 868 return this.description != null && !this.description.isEmpty(); 869 } 870 871 public boolean hasDescription() { 872 return this.description != null && !this.description.isEmpty(); 873 } 874 875 /** 876 * @param value {@link #description} (Human readable text describing the package.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 877 */ 878 public ImplementationGuidePackageComponent setDescriptionElement(StringType value) { 879 this.description = value; 880 return this; 881 } 882 883 /** 884 * @return Human readable text describing the package. 885 */ 886 public String getDescription() { 887 return this.description == null ? null : this.description.getValue(); 888 } 889 890 /** 891 * @param value Human readable text describing the package. 892 */ 893 public ImplementationGuidePackageComponent setDescription(String value) { 894 if (Utilities.noString(value)) 895 this.description = null; 896 else { 897 if (this.description == null) 898 this.description = new StringType(); 899 this.description.setValue(value); 900 } 901 return this; 902 } 903 904 /** 905 * @return {@link #resource} (A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.) 906 */ 907 public List<ImplementationGuidePackageResourceComponent> getResource() { 908 if (this.resource == null) 909 this.resource = new ArrayList<ImplementationGuidePackageResourceComponent>(); 910 return this.resource; 911 } 912 913 public boolean hasResource() { 914 if (this.resource == null) 915 return false; 916 for (ImplementationGuidePackageResourceComponent item : this.resource) 917 if (!item.isEmpty()) 918 return true; 919 return false; 920 } 921 922 /** 923 * @return {@link #resource} (A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.) 924 */ 925 // syntactic sugar 926 public ImplementationGuidePackageResourceComponent addResource() { //3 927 ImplementationGuidePackageResourceComponent t = new ImplementationGuidePackageResourceComponent(); 928 if (this.resource == null) 929 this.resource = new ArrayList<ImplementationGuidePackageResourceComponent>(); 930 this.resource.add(t); 931 return t; 932 } 933 934 // syntactic sugar 935 public ImplementationGuidePackageComponent addResource(ImplementationGuidePackageResourceComponent t) { //3 936 if (t == null) 937 return this; 938 if (this.resource == null) 939 this.resource = new ArrayList<ImplementationGuidePackageResourceComponent>(); 940 this.resource.add(t); 941 return this; 942 } 943 944 protected void listChildren(List<Property> childrenList) { 945 super.listChildren(childrenList); 946 childrenList.add(new Property("name", "string", "The name for the group, as used in page.package.", 0, java.lang.Integer.MAX_VALUE, name)); 947 childrenList.add(new Property("description", "string", "Human readable text describing the package.", 0, java.lang.Integer.MAX_VALUE, description)); 948 childrenList.add(new Property("resource", "", "A resource that is part of the implementation guide. Conformance resources (value set, structure definition, conformance statements etc.) are obvious candidates for inclusion, but any kind of resource can be included as an example resource.", 0, java.lang.Integer.MAX_VALUE, resource)); 949 } 950 951 @Override 952 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 953 switch (hash) { 954 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 955 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 956 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : this.resource.toArray(new Base[this.resource.size()]); // ImplementationGuidePackageResourceComponent 957 default: return super.getProperty(hash, name, checkValid); 958 } 959 960 } 961 962 @Override 963 public void setProperty(int hash, String name, Base value) throws FHIRException { 964 switch (hash) { 965 case 3373707: // name 966 this.name = castToString(value); // StringType 967 break; 968 case -1724546052: // description 969 this.description = castToString(value); // StringType 970 break; 971 case -341064690: // resource 972 this.getResource().add((ImplementationGuidePackageResourceComponent) value); // ImplementationGuidePackageResourceComponent 973 break; 974 default: super.setProperty(hash, name, value); 975 } 976 977 } 978 979 @Override 980 public void setProperty(String name, Base value) throws FHIRException { 981 if (name.equals("name")) 982 this.name = castToString(value); // StringType 983 else if (name.equals("description")) 984 this.description = castToString(value); // StringType 985 else if (name.equals("resource")) 986 this.getResource().add((ImplementationGuidePackageResourceComponent) value); 987 else 988 super.setProperty(name, value); 989 } 990 991 @Override 992 public Base makeProperty(int hash, String name) throws FHIRException { 993 switch (hash) { 994 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 995 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 996 case -341064690: return addResource(); // ImplementationGuidePackageResourceComponent 997 default: return super.makeProperty(hash, name); 998 } 999 1000 } 1001 1002 @Override 1003 public Base addChild(String name) throws FHIRException { 1004 if (name.equals("name")) { 1005 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); 1006 } 1007 else if (name.equals("description")) { 1008 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.description"); 1009 } 1010 else if (name.equals("resource")) { 1011 return addResource(); 1012 } 1013 else 1014 return super.addChild(name); 1015 } 1016 1017 public ImplementationGuidePackageComponent copy() { 1018 ImplementationGuidePackageComponent dst = new ImplementationGuidePackageComponent(); 1019 copyValues(dst); 1020 dst.name = name == null ? null : name.copy(); 1021 dst.description = description == null ? null : description.copy(); 1022 if (resource != null) { 1023 dst.resource = new ArrayList<ImplementationGuidePackageResourceComponent>(); 1024 for (ImplementationGuidePackageResourceComponent i : resource) 1025 dst.resource.add(i.copy()); 1026 }; 1027 return dst; 1028 } 1029 1030 @Override 1031 public boolean equalsDeep(Base other) { 1032 if (!super.equalsDeep(other)) 1033 return false; 1034 if (!(other instanceof ImplementationGuidePackageComponent)) 1035 return false; 1036 ImplementationGuidePackageComponent o = (ImplementationGuidePackageComponent) other; 1037 return compareDeep(name, o.name, true) && compareDeep(description, o.description, true) && compareDeep(resource, o.resource, true) 1038 ; 1039 } 1040 1041 @Override 1042 public boolean equalsShallow(Base other) { 1043 if (!super.equalsShallow(other)) 1044 return false; 1045 if (!(other instanceof ImplementationGuidePackageComponent)) 1046 return false; 1047 ImplementationGuidePackageComponent o = (ImplementationGuidePackageComponent) other; 1048 return compareValues(name, o.name, true) && compareValues(description, o.description, true); 1049 } 1050 1051 public boolean isEmpty() { 1052 return super.isEmpty() && (name == null || name.isEmpty()) && (description == null || description.isEmpty()) 1053 && (resource == null || resource.isEmpty()); 1054 } 1055 1056 public String fhirType() { 1057 return "ImplementationGuide.package"; 1058 1059 } 1060 1061 } 1062 1063 @Block() 1064 public static class ImplementationGuidePackageResourceComponent extends BackboneElement implements IBaseBackboneElement { 1065 /** 1066 * Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide. 1067 */ 1068 @Child(name = "example", type = {BooleanType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1069 @Description(shortDefinition="If not an example, has it's normal meaning", formalDefinition="Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide." ) 1070 protected BooleanType example; 1071 1072 /** 1073 * A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name). 1074 */ 1075 @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 1076 @Description(shortDefinition="Human Name for the resource", formalDefinition="A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name)." ) 1077 protected StringType name; 1078 1079 /** 1080 * A description of the reason that a resource has been included in the implementation guide. 1081 */ 1082 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1083 @Description(shortDefinition="Reason why included in guide", formalDefinition="A description of the reason that a resource has been included in the implementation guide." ) 1084 protected StringType description; 1085 1086 /** 1087 * A short code that may be used to identify the resource throughout the implementation guide. 1088 */ 1089 @Child(name = "acronym", type = {StringType.class}, order=4, min=0, max=1, modifier=false, summary=false) 1090 @Description(shortDefinition="Short code to identify the resource", formalDefinition="A short code that may be used to identify the resource throughout the implementation guide." ) 1091 protected StringType acronym; 1092 1093 /** 1094 * Where this resource is found. 1095 */ 1096 @Child(name = "source", type = {UriType.class}, order=5, min=1, max=1, modifier=false, summary=true) 1097 @Description(shortDefinition="Location of the resource", formalDefinition="Where this resource is found." ) 1098 protected Type source; 1099 1100 /** 1101 * Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions. 1102 */ 1103 @Child(name = "exampleFor", type = {StructureDefinition.class}, order=6, min=0, max=1, modifier=false, summary=false) 1104 @Description(shortDefinition="Resource this is an example of (if applicable)", formalDefinition="Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions." ) 1105 protected Reference exampleFor; 1106 1107 /** 1108 * The actual object that is the target of the reference (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.) 1109 */ 1110 protected StructureDefinition exampleForTarget; 1111 1112 private static final long serialVersionUID = 2085404852L; 1113 1114 /** 1115 * Constructor 1116 */ 1117 public ImplementationGuidePackageResourceComponent() { 1118 super(); 1119 } 1120 1121 /** 1122 * Constructor 1123 */ 1124 public ImplementationGuidePackageResourceComponent(BooleanType example, Type source) { 1125 super(); 1126 this.example = example; 1127 this.source = source; 1128 } 1129 1130 /** 1131 * @return {@link #example} (Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.). This is the underlying object with id, value and extensions. The accessor "getExample" gives direct access to the value 1132 */ 1133 public BooleanType getExampleElement() { 1134 if (this.example == null) 1135 if (Configuration.errorOnAutoCreate()) 1136 throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.example"); 1137 else if (Configuration.doAutoCreate()) 1138 this.example = new BooleanType(); // bb 1139 return this.example; 1140 } 1141 1142 public boolean hasExampleElement() { 1143 return this.example != null && !this.example.isEmpty(); 1144 } 1145 1146 public boolean hasExample() { 1147 return this.example != null && !this.example.isEmpty(); 1148 } 1149 1150 /** 1151 * @param value {@link #example} (Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.). This is the underlying object with id, value and extensions. The accessor "getExample" gives direct access to the value 1152 */ 1153 public ImplementationGuidePackageResourceComponent setExampleElement(BooleanType value) { 1154 this.example = value; 1155 return this; 1156 } 1157 1158 /** 1159 * @return Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide. 1160 */ 1161 public boolean getExample() { 1162 return this.example == null || this.example.isEmpty() ? false : this.example.getValue(); 1163 } 1164 1165 /** 1166 * @param value Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide. 1167 */ 1168 public ImplementationGuidePackageResourceComponent setExample(boolean value) { 1169 if (this.example == null) 1170 this.example = new BooleanType(); 1171 this.example.setValue(value); 1172 return this; 1173 } 1174 1175 /** 1176 * @return {@link #name} (A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1177 */ 1178 public StringType getNameElement() { 1179 if (this.name == null) 1180 if (Configuration.errorOnAutoCreate()) 1181 throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.name"); 1182 else if (Configuration.doAutoCreate()) 1183 this.name = new StringType(); // bb 1184 return this.name; 1185 } 1186 1187 public boolean hasNameElement() { 1188 return this.name != null && !this.name.isEmpty(); 1189 } 1190 1191 public boolean hasName() { 1192 return this.name != null && !this.name.isEmpty(); 1193 } 1194 1195 /** 1196 * @param value {@link #name} (A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1197 */ 1198 public ImplementationGuidePackageResourceComponent setNameElement(StringType value) { 1199 this.name = value; 1200 return this; 1201 } 1202 1203 /** 1204 * @return A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name). 1205 */ 1206 public String getName() { 1207 return this.name == null ? null : this.name.getValue(); 1208 } 1209 1210 /** 1211 * @param value A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name). 1212 */ 1213 public ImplementationGuidePackageResourceComponent setName(String value) { 1214 if (Utilities.noString(value)) 1215 this.name = null; 1216 else { 1217 if (this.name == null) 1218 this.name = new StringType(); 1219 this.name.setValue(value); 1220 } 1221 return this; 1222 } 1223 1224 /** 1225 * @return {@link #description} (A description of the reason that a resource has been included in the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1226 */ 1227 public StringType getDescriptionElement() { 1228 if (this.description == null) 1229 if (Configuration.errorOnAutoCreate()) 1230 throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.description"); 1231 else if (Configuration.doAutoCreate()) 1232 this.description = new StringType(); // bb 1233 return this.description; 1234 } 1235 1236 public boolean hasDescriptionElement() { 1237 return this.description != null && !this.description.isEmpty(); 1238 } 1239 1240 public boolean hasDescription() { 1241 return this.description != null && !this.description.isEmpty(); 1242 } 1243 1244 /** 1245 * @param value {@link #description} (A description of the reason that a resource has been included in the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 1246 */ 1247 public ImplementationGuidePackageResourceComponent setDescriptionElement(StringType value) { 1248 this.description = value; 1249 return this; 1250 } 1251 1252 /** 1253 * @return A description of the reason that a resource has been included in the implementation guide. 1254 */ 1255 public String getDescription() { 1256 return this.description == null ? null : this.description.getValue(); 1257 } 1258 1259 /** 1260 * @param value A description of the reason that a resource has been included in the implementation guide. 1261 */ 1262 public ImplementationGuidePackageResourceComponent setDescription(String value) { 1263 if (Utilities.noString(value)) 1264 this.description = null; 1265 else { 1266 if (this.description == null) 1267 this.description = new StringType(); 1268 this.description.setValue(value); 1269 } 1270 return this; 1271 } 1272 1273 /** 1274 * @return {@link #acronym} (A short code that may be used to identify the resource throughout the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getAcronym" gives direct access to the value 1275 */ 1276 public StringType getAcronymElement() { 1277 if (this.acronym == null) 1278 if (Configuration.errorOnAutoCreate()) 1279 throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.acronym"); 1280 else if (Configuration.doAutoCreate()) 1281 this.acronym = new StringType(); // bb 1282 return this.acronym; 1283 } 1284 1285 public boolean hasAcronymElement() { 1286 return this.acronym != null && !this.acronym.isEmpty(); 1287 } 1288 1289 public boolean hasAcronym() { 1290 return this.acronym != null && !this.acronym.isEmpty(); 1291 } 1292 1293 /** 1294 * @param value {@link #acronym} (A short code that may be used to identify the resource throughout the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getAcronym" gives direct access to the value 1295 */ 1296 public ImplementationGuidePackageResourceComponent setAcronymElement(StringType value) { 1297 this.acronym = value; 1298 return this; 1299 } 1300 1301 /** 1302 * @return A short code that may be used to identify the resource throughout the implementation guide. 1303 */ 1304 public String getAcronym() { 1305 return this.acronym == null ? null : this.acronym.getValue(); 1306 } 1307 1308 /** 1309 * @param value A short code that may be used to identify the resource throughout the implementation guide. 1310 */ 1311 public ImplementationGuidePackageResourceComponent setAcronym(String value) { 1312 if (Utilities.noString(value)) 1313 this.acronym = null; 1314 else { 1315 if (this.acronym == null) 1316 this.acronym = new StringType(); 1317 this.acronym.setValue(value); 1318 } 1319 return this; 1320 } 1321 1322 /** 1323 * @return {@link #source} (Where this resource is found.) 1324 */ 1325 public Type getSource() { 1326 return this.source; 1327 } 1328 1329 /** 1330 * @return {@link #source} (Where this resource is found.) 1331 */ 1332 public UriType getSourceUriType() throws FHIRException { 1333 if (!(this.source instanceof UriType)) 1334 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.source.getClass().getName()+" was encountered"); 1335 return (UriType) this.source; 1336 } 1337 1338 public boolean hasSourceUriType() { 1339 return this.source instanceof UriType; 1340 } 1341 1342 /** 1343 * @return {@link #source} (Where this resource is found.) 1344 */ 1345 public Reference getSourceReference() throws FHIRException { 1346 if (!(this.source instanceof Reference)) 1347 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.source.getClass().getName()+" was encountered"); 1348 return (Reference) this.source; 1349 } 1350 1351 public boolean hasSourceReference() { 1352 return this.source instanceof Reference; 1353 } 1354 1355 public boolean hasSource() { 1356 return this.source != null && !this.source.isEmpty(); 1357 } 1358 1359 /** 1360 * @param value {@link #source} (Where this resource is found.) 1361 */ 1362 public ImplementationGuidePackageResourceComponent setSource(Type value) { 1363 this.source = value; 1364 return this; 1365 } 1366 1367 /** 1368 * @return {@link #exampleFor} (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.) 1369 */ 1370 public Reference getExampleFor() { 1371 if (this.exampleFor == null) 1372 if (Configuration.errorOnAutoCreate()) 1373 throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.exampleFor"); 1374 else if (Configuration.doAutoCreate()) 1375 this.exampleFor = new Reference(); // cc 1376 return this.exampleFor; 1377 } 1378 1379 public boolean hasExampleFor() { 1380 return this.exampleFor != null && !this.exampleFor.isEmpty(); 1381 } 1382 1383 /** 1384 * @param value {@link #exampleFor} (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.) 1385 */ 1386 public ImplementationGuidePackageResourceComponent setExampleFor(Reference value) { 1387 this.exampleFor = value; 1388 return this; 1389 } 1390 1391 /** 1392 * @return {@link #exampleFor} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.) 1393 */ 1394 public StructureDefinition getExampleForTarget() { 1395 if (this.exampleForTarget == null) 1396 if (Configuration.errorOnAutoCreate()) 1397 throw new Error("Attempt to auto-create ImplementationGuidePackageResourceComponent.exampleFor"); 1398 else if (Configuration.doAutoCreate()) 1399 this.exampleForTarget = new StructureDefinition(); // aa 1400 return this.exampleForTarget; 1401 } 1402 1403 /** 1404 * @param value {@link #exampleFor} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.) 1405 */ 1406 public ImplementationGuidePackageResourceComponent setExampleForTarget(StructureDefinition value) { 1407 this.exampleForTarget = value; 1408 return this; 1409 } 1410 1411 protected void listChildren(List<Property> childrenList) { 1412 super.listChildren(childrenList); 1413 childrenList.add(new Property("example", "boolean", "Whether a resource is included in the guide as part of the rules defined by the guide, or just as an example of a resource that conforms to the rules and/or help implementers understand the intent of the guide.", 0, java.lang.Integer.MAX_VALUE, example)); 1414 childrenList.add(new Property("name", "string", "A human assigned name for the resource. All resources SHOULD have a name, but the name may be extracted from the resource (e.g. ValueSet.name).", 0, java.lang.Integer.MAX_VALUE, name)); 1415 childrenList.add(new Property("description", "string", "A description of the reason that a resource has been included in the implementation guide.", 0, java.lang.Integer.MAX_VALUE, description)); 1416 childrenList.add(new Property("acronym", "string", "A short code that may be used to identify the resource throughout the implementation guide.", 0, java.lang.Integer.MAX_VALUE, acronym)); 1417 childrenList.add(new Property("source[x]", "uri|Reference(Any)", "Where this resource is found.", 0, java.lang.Integer.MAX_VALUE, source)); 1418 childrenList.add(new Property("exampleFor", "Reference(StructureDefinition)", "Another resource that this resource is an example for. This is mostly used for resources that are included as examples of StructureDefinitions.", 0, java.lang.Integer.MAX_VALUE, exampleFor)); 1419 } 1420 1421 @Override 1422 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1423 switch (hash) { 1424 case -1322970774: /*example*/ return this.example == null ? new Base[0] : new Base[] {this.example}; // BooleanType 1425 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1426 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1427 case -1163472445: /*acronym*/ return this.acronym == null ? new Base[0] : new Base[] {this.acronym}; // StringType 1428 case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // Type 1429 case -2002349313: /*exampleFor*/ return this.exampleFor == null ? new Base[0] : new Base[] {this.exampleFor}; // Reference 1430 default: return super.getProperty(hash, name, checkValid); 1431 } 1432 1433 } 1434 1435 @Override 1436 public void setProperty(int hash, String name, Base value) throws FHIRException { 1437 switch (hash) { 1438 case -1322970774: // example 1439 this.example = castToBoolean(value); // BooleanType 1440 break; 1441 case 3373707: // name 1442 this.name = castToString(value); // StringType 1443 break; 1444 case -1724546052: // description 1445 this.description = castToString(value); // StringType 1446 break; 1447 case -1163472445: // acronym 1448 this.acronym = castToString(value); // StringType 1449 break; 1450 case -896505829: // source 1451 this.source = (Type) value; // Type 1452 break; 1453 case -2002349313: // exampleFor 1454 this.exampleFor = castToReference(value); // Reference 1455 break; 1456 default: super.setProperty(hash, name, value); 1457 } 1458 1459 } 1460 1461 @Override 1462 public void setProperty(String name, Base value) throws FHIRException { 1463 if (name.equals("example")) 1464 this.example = castToBoolean(value); // BooleanType 1465 else if (name.equals("name")) 1466 this.name = castToString(value); // StringType 1467 else if (name.equals("description")) 1468 this.description = castToString(value); // StringType 1469 else if (name.equals("acronym")) 1470 this.acronym = castToString(value); // StringType 1471 else if (name.equals("source[x]")) 1472 this.source = (Type) value; // Type 1473 else if (name.equals("exampleFor")) 1474 this.exampleFor = castToReference(value); // Reference 1475 else 1476 super.setProperty(name, value); 1477 } 1478 1479 @Override 1480 public Base makeProperty(int hash, String name) throws FHIRException { 1481 switch (hash) { 1482 case -1322970774: throw new FHIRException("Cannot make property example as it is not a complex type"); // BooleanType 1483 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 1484 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 1485 case -1163472445: throw new FHIRException("Cannot make property acronym as it is not a complex type"); // StringType 1486 case -1698413947: return getSource(); // Type 1487 case -2002349313: return getExampleFor(); // Reference 1488 default: return super.makeProperty(hash, name); 1489 } 1490 1491 } 1492 1493 @Override 1494 public Base addChild(String name) throws FHIRException { 1495 if (name.equals("example")) { 1496 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.example"); 1497 } 1498 else if (name.equals("name")) { 1499 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); 1500 } 1501 else if (name.equals("description")) { 1502 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.description"); 1503 } 1504 else if (name.equals("acronym")) { 1505 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.acronym"); 1506 } 1507 else if (name.equals("sourceUri")) { 1508 this.source = new UriType(); 1509 return this.source; 1510 } 1511 else if (name.equals("sourceReference")) { 1512 this.source = new Reference(); 1513 return this.source; 1514 } 1515 else if (name.equals("exampleFor")) { 1516 this.exampleFor = new Reference(); 1517 return this.exampleFor; 1518 } 1519 else 1520 return super.addChild(name); 1521 } 1522 1523 public ImplementationGuidePackageResourceComponent copy() { 1524 ImplementationGuidePackageResourceComponent dst = new ImplementationGuidePackageResourceComponent(); 1525 copyValues(dst); 1526 dst.example = example == null ? null : example.copy(); 1527 dst.name = name == null ? null : name.copy(); 1528 dst.description = description == null ? null : description.copy(); 1529 dst.acronym = acronym == null ? null : acronym.copy(); 1530 dst.source = source == null ? null : source.copy(); 1531 dst.exampleFor = exampleFor == null ? null : exampleFor.copy(); 1532 return dst; 1533 } 1534 1535 @Override 1536 public boolean equalsDeep(Base other) { 1537 if (!super.equalsDeep(other)) 1538 return false; 1539 if (!(other instanceof ImplementationGuidePackageResourceComponent)) 1540 return false; 1541 ImplementationGuidePackageResourceComponent o = (ImplementationGuidePackageResourceComponent) other; 1542 return compareDeep(example, o.example, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) 1543 && compareDeep(acronym, o.acronym, true) && compareDeep(source, o.source, true) && compareDeep(exampleFor, o.exampleFor, true) 1544 ; 1545 } 1546 1547 @Override 1548 public boolean equalsShallow(Base other) { 1549 if (!super.equalsShallow(other)) 1550 return false; 1551 if (!(other instanceof ImplementationGuidePackageResourceComponent)) 1552 return false; 1553 ImplementationGuidePackageResourceComponent o = (ImplementationGuidePackageResourceComponent) other; 1554 return compareValues(example, o.example, true) && compareValues(name, o.name, true) && compareValues(description, o.description, true) 1555 && compareValues(acronym, o.acronym, true); 1556 } 1557 1558 public boolean isEmpty() { 1559 return super.isEmpty() && (example == null || example.isEmpty()) && (name == null || name.isEmpty()) 1560 && (description == null || description.isEmpty()) && (acronym == null || acronym.isEmpty()) 1561 && (source == null || source.isEmpty()) && (exampleFor == null || exampleFor.isEmpty()); 1562 } 1563 1564 public String fhirType() { 1565 return "ImplementationGuide.package.resource"; 1566 1567 } 1568 1569 } 1570 1571 @Block() 1572 public static class ImplementationGuideGlobalComponent extends BackboneElement implements IBaseBackboneElement { 1573 /** 1574 * The type of resource that all instances must conform to. 1575 */ 1576 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1577 @Description(shortDefinition="Type this profiles applies to", formalDefinition="The type of resource that all instances must conform to." ) 1578 protected CodeType type; 1579 1580 /** 1581 * A reference to the profile that all instances must conform to. 1582 */ 1583 @Child(name = "profile", type = {StructureDefinition.class}, order=2, min=1, max=1, modifier=false, summary=true) 1584 @Description(shortDefinition="Profile that all resources must conform to", formalDefinition="A reference to the profile that all instances must conform to." ) 1585 protected Reference profile; 1586 1587 /** 1588 * The actual object that is the target of the reference (A reference to the profile that all instances must conform to.) 1589 */ 1590 protected StructureDefinition profileTarget; 1591 1592 private static final long serialVersionUID = 2011731959L; 1593 1594 /** 1595 * Constructor 1596 */ 1597 public ImplementationGuideGlobalComponent() { 1598 super(); 1599 } 1600 1601 /** 1602 * Constructor 1603 */ 1604 public ImplementationGuideGlobalComponent(CodeType type, Reference profile) { 1605 super(); 1606 this.type = type; 1607 this.profile = profile; 1608 } 1609 1610 /** 1611 * @return {@link #type} (The type of resource that all instances must conform to.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1612 */ 1613 public CodeType getTypeElement() { 1614 if (this.type == null) 1615 if (Configuration.errorOnAutoCreate()) 1616 throw new Error("Attempt to auto-create ImplementationGuideGlobalComponent.type"); 1617 else if (Configuration.doAutoCreate()) 1618 this.type = new CodeType(); // bb 1619 return this.type; 1620 } 1621 1622 public boolean hasTypeElement() { 1623 return this.type != null && !this.type.isEmpty(); 1624 } 1625 1626 public boolean hasType() { 1627 return this.type != null && !this.type.isEmpty(); 1628 } 1629 1630 /** 1631 * @param value {@link #type} (The type of resource that all instances must conform to.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value 1632 */ 1633 public ImplementationGuideGlobalComponent setTypeElement(CodeType value) { 1634 this.type = value; 1635 return this; 1636 } 1637 1638 /** 1639 * @return The type of resource that all instances must conform to. 1640 */ 1641 public String getType() { 1642 return this.type == null ? null : this.type.getValue(); 1643 } 1644 1645 /** 1646 * @param value The type of resource that all instances must conform to. 1647 */ 1648 public ImplementationGuideGlobalComponent setType(String value) { 1649 if (this.type == null) 1650 this.type = new CodeType(); 1651 this.type.setValue(value); 1652 return this; 1653 } 1654 1655 /** 1656 * @return {@link #profile} (A reference to the profile that all instances must conform to.) 1657 */ 1658 public Reference getProfile() { 1659 if (this.profile == null) 1660 if (Configuration.errorOnAutoCreate()) 1661 throw new Error("Attempt to auto-create ImplementationGuideGlobalComponent.profile"); 1662 else if (Configuration.doAutoCreate()) 1663 this.profile = new Reference(); // cc 1664 return this.profile; 1665 } 1666 1667 public boolean hasProfile() { 1668 return this.profile != null && !this.profile.isEmpty(); 1669 } 1670 1671 /** 1672 * @param value {@link #profile} (A reference to the profile that all instances must conform to.) 1673 */ 1674 public ImplementationGuideGlobalComponent setProfile(Reference value) { 1675 this.profile = value; 1676 return this; 1677 } 1678 1679 /** 1680 * @return {@link #profile} The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (A reference to the profile that all instances must conform to.) 1681 */ 1682 public StructureDefinition getProfileTarget() { 1683 if (this.profileTarget == null) 1684 if (Configuration.errorOnAutoCreate()) 1685 throw new Error("Attempt to auto-create ImplementationGuideGlobalComponent.profile"); 1686 else if (Configuration.doAutoCreate()) 1687 this.profileTarget = new StructureDefinition(); // aa 1688 return this.profileTarget; 1689 } 1690 1691 /** 1692 * @param value {@link #profile} The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (A reference to the profile that all instances must conform to.) 1693 */ 1694 public ImplementationGuideGlobalComponent setProfileTarget(StructureDefinition value) { 1695 this.profileTarget = value; 1696 return this; 1697 } 1698 1699 protected void listChildren(List<Property> childrenList) { 1700 super.listChildren(childrenList); 1701 childrenList.add(new Property("type", "code", "The type of resource that all instances must conform to.", 0, java.lang.Integer.MAX_VALUE, type)); 1702 childrenList.add(new Property("profile", "Reference(StructureDefinition)", "A reference to the profile that all instances must conform to.", 0, java.lang.Integer.MAX_VALUE, profile)); 1703 } 1704 1705 @Override 1706 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1707 switch (hash) { 1708 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType 1709 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // Reference 1710 default: return super.getProperty(hash, name, checkValid); 1711 } 1712 1713 } 1714 1715 @Override 1716 public void setProperty(int hash, String name, Base value) throws FHIRException { 1717 switch (hash) { 1718 case 3575610: // type 1719 this.type = castToCode(value); // CodeType 1720 break; 1721 case -309425751: // profile 1722 this.profile = castToReference(value); // Reference 1723 break; 1724 default: super.setProperty(hash, name, value); 1725 } 1726 1727 } 1728 1729 @Override 1730 public void setProperty(String name, Base value) throws FHIRException { 1731 if (name.equals("type")) 1732 this.type = castToCode(value); // CodeType 1733 else if (name.equals("profile")) 1734 this.profile = castToReference(value); // Reference 1735 else 1736 super.setProperty(name, value); 1737 } 1738 1739 @Override 1740 public Base makeProperty(int hash, String name) throws FHIRException { 1741 switch (hash) { 1742 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // CodeType 1743 case -309425751: return getProfile(); // Reference 1744 default: return super.makeProperty(hash, name); 1745 } 1746 1747 } 1748 1749 @Override 1750 public Base addChild(String name) throws FHIRException { 1751 if (name.equals("type")) { 1752 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.type"); 1753 } 1754 else if (name.equals("profile")) { 1755 this.profile = new Reference(); 1756 return this.profile; 1757 } 1758 else 1759 return super.addChild(name); 1760 } 1761 1762 public ImplementationGuideGlobalComponent copy() { 1763 ImplementationGuideGlobalComponent dst = new ImplementationGuideGlobalComponent(); 1764 copyValues(dst); 1765 dst.type = type == null ? null : type.copy(); 1766 dst.profile = profile == null ? null : profile.copy(); 1767 return dst; 1768 } 1769 1770 @Override 1771 public boolean equalsDeep(Base other) { 1772 if (!super.equalsDeep(other)) 1773 return false; 1774 if (!(other instanceof ImplementationGuideGlobalComponent)) 1775 return false; 1776 ImplementationGuideGlobalComponent o = (ImplementationGuideGlobalComponent) other; 1777 return compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true); 1778 } 1779 1780 @Override 1781 public boolean equalsShallow(Base other) { 1782 if (!super.equalsShallow(other)) 1783 return false; 1784 if (!(other instanceof ImplementationGuideGlobalComponent)) 1785 return false; 1786 ImplementationGuideGlobalComponent o = (ImplementationGuideGlobalComponent) other; 1787 return compareValues(type, o.type, true); 1788 } 1789 1790 public boolean isEmpty() { 1791 return super.isEmpty() && (type == null || type.isEmpty()) && (profile == null || profile.isEmpty()) 1792 ; 1793 } 1794 1795 public String fhirType() { 1796 return "ImplementationGuide.global"; 1797 1798 } 1799 1800 } 1801 1802 @Block() 1803 public static class ImplementationGuidePageComponent extends BackboneElement implements IBaseBackboneElement { 1804 /** 1805 * The source address for the page. 1806 */ 1807 @Child(name = "source", type = {UriType.class}, order=1, min=1, max=1, modifier=false, summary=true) 1808 @Description(shortDefinition="Where to find that page", formalDefinition="The source address for the page." ) 1809 protected UriType source; 1810 1811 /** 1812 * A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc. 1813 */ 1814 @Child(name = "name", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) 1815 @Description(shortDefinition="Short name shown for navigational assistance", formalDefinition="A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc." ) 1816 protected StringType name; 1817 1818 /** 1819 * The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest. 1820 */ 1821 @Child(name = "kind", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=true) 1822 @Description(shortDefinition="page | example | list | include | directory | dictionary | toc | resource", formalDefinition="The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest." ) 1823 protected Enumeration<GuidePageKind> kind; 1824 1825 /** 1826 * For constructed pages, what kind of resources to include in the list. 1827 */ 1828 @Child(name = "type", type = {CodeType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1829 @Description(shortDefinition="Kind of resource to include in the list", formalDefinition="For constructed pages, what kind of resources to include in the list." ) 1830 protected List<CodeType> type; 1831 1832 /** 1833 * For constructed pages, a list of packages to include in the page (or else empty for everything). 1834 */ 1835 @Child(name = "package", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1836 @Description(shortDefinition="Name of package to include", formalDefinition="For constructed pages, a list of packages to include in the page (or else empty for everything)." ) 1837 protected List<StringType> package_; 1838 1839 /** 1840 * The format of the page. 1841 */ 1842 @Child(name = "format", type = {CodeType.class}, order=6, min=0, max=1, modifier=false, summary=false) 1843 @Description(shortDefinition="Format of the page (e.g. html, markdown, etc.)", formalDefinition="The format of the page." ) 1844 protected CodeType format; 1845 1846 /** 1847 * Nested Pages/Sections under this page. 1848 */ 1849 @Child(name = "page", type = {ImplementationGuidePageComponent.class}, order=7, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 1850 @Description(shortDefinition="Nested Pages / Sections", formalDefinition="Nested Pages/Sections under this page." ) 1851 protected List<ImplementationGuidePageComponent> page; 1852 1853 private static final long serialVersionUID = -1620890043L; 1854 1855 /** 1856 * Constructor 1857 */ 1858 public ImplementationGuidePageComponent() { 1859 super(); 1860 } 1861 1862 /** 1863 * Constructor 1864 */ 1865 public ImplementationGuidePageComponent(UriType source, StringType name, Enumeration<GuidePageKind> kind) { 1866 super(); 1867 this.source = source; 1868 this.name = name; 1869 this.kind = kind; 1870 } 1871 1872 /** 1873 * @return {@link #source} (The source address for the page.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value 1874 */ 1875 public UriType getSourceElement() { 1876 if (this.source == null) 1877 if (Configuration.errorOnAutoCreate()) 1878 throw new Error("Attempt to auto-create ImplementationGuidePageComponent.source"); 1879 else if (Configuration.doAutoCreate()) 1880 this.source = new UriType(); // bb 1881 return this.source; 1882 } 1883 1884 public boolean hasSourceElement() { 1885 return this.source != null && !this.source.isEmpty(); 1886 } 1887 1888 public boolean hasSource() { 1889 return this.source != null && !this.source.isEmpty(); 1890 } 1891 1892 /** 1893 * @param value {@link #source} (The source address for the page.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value 1894 */ 1895 public ImplementationGuidePageComponent setSourceElement(UriType value) { 1896 this.source = value; 1897 return this; 1898 } 1899 1900 /** 1901 * @return The source address for the page. 1902 */ 1903 public String getSource() { 1904 return this.source == null ? null : this.source.getValue(); 1905 } 1906 1907 /** 1908 * @param value The source address for the page. 1909 */ 1910 public ImplementationGuidePageComponent setSource(String value) { 1911 if (this.source == null) 1912 this.source = new UriType(); 1913 this.source.setValue(value); 1914 return this; 1915 } 1916 1917 /** 1918 * @return {@link #name} (A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1919 */ 1920 public StringType getNameElement() { 1921 if (this.name == null) 1922 if (Configuration.errorOnAutoCreate()) 1923 throw new Error("Attempt to auto-create ImplementationGuidePageComponent.name"); 1924 else if (Configuration.doAutoCreate()) 1925 this.name = new StringType(); // bb 1926 return this.name; 1927 } 1928 1929 public boolean hasNameElement() { 1930 return this.name != null && !this.name.isEmpty(); 1931 } 1932 1933 public boolean hasName() { 1934 return this.name != null && !this.name.isEmpty(); 1935 } 1936 1937 /** 1938 * @param value {@link #name} (A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1939 */ 1940 public ImplementationGuidePageComponent setNameElement(StringType value) { 1941 this.name = value; 1942 return this; 1943 } 1944 1945 /** 1946 * @return A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc. 1947 */ 1948 public String getName() { 1949 return this.name == null ? null : this.name.getValue(); 1950 } 1951 1952 /** 1953 * @param value A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc. 1954 */ 1955 public ImplementationGuidePageComponent setName(String value) { 1956 if (this.name == null) 1957 this.name = new StringType(); 1958 this.name.setValue(value); 1959 return this; 1960 } 1961 1962 /** 1963 * @return {@link #kind} (The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 1964 */ 1965 public Enumeration<GuidePageKind> getKindElement() { 1966 if (this.kind == null) 1967 if (Configuration.errorOnAutoCreate()) 1968 throw new Error("Attempt to auto-create ImplementationGuidePageComponent.kind"); 1969 else if (Configuration.doAutoCreate()) 1970 this.kind = new Enumeration<GuidePageKind>(new GuidePageKindEnumFactory()); // bb 1971 return this.kind; 1972 } 1973 1974 public boolean hasKindElement() { 1975 return this.kind != null && !this.kind.isEmpty(); 1976 } 1977 1978 public boolean hasKind() { 1979 return this.kind != null && !this.kind.isEmpty(); 1980 } 1981 1982 /** 1983 * @param value {@link #kind} (The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.). This is the underlying object with id, value and extensions. The accessor "getKind" gives direct access to the value 1984 */ 1985 public ImplementationGuidePageComponent setKindElement(Enumeration<GuidePageKind> value) { 1986 this.kind = value; 1987 return this; 1988 } 1989 1990 /** 1991 * @return The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest. 1992 */ 1993 public GuidePageKind getKind() { 1994 return this.kind == null ? null : this.kind.getValue(); 1995 } 1996 1997 /** 1998 * @param value The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest. 1999 */ 2000 public ImplementationGuidePageComponent setKind(GuidePageKind value) { 2001 if (this.kind == null) 2002 this.kind = new Enumeration<GuidePageKind>(new GuidePageKindEnumFactory()); 2003 this.kind.setValue(value); 2004 return this; 2005 } 2006 2007 /** 2008 * @return {@link #type} (For constructed pages, what kind of resources to include in the list.) 2009 */ 2010 public List<CodeType> getType() { 2011 if (this.type == null) 2012 this.type = new ArrayList<CodeType>(); 2013 return this.type; 2014 } 2015 2016 public boolean hasType() { 2017 if (this.type == null) 2018 return false; 2019 for (CodeType item : this.type) 2020 if (!item.isEmpty()) 2021 return true; 2022 return false; 2023 } 2024 2025 /** 2026 * @return {@link #type} (For constructed pages, what kind of resources to include in the list.) 2027 */ 2028 // syntactic sugar 2029 public CodeType addTypeElement() {//2 2030 CodeType t = new CodeType(); 2031 if (this.type == null) 2032 this.type = new ArrayList<CodeType>(); 2033 this.type.add(t); 2034 return t; 2035 } 2036 2037 /** 2038 * @param value {@link #type} (For constructed pages, what kind of resources to include in the list.) 2039 */ 2040 public ImplementationGuidePageComponent addType(String value) { //1 2041 CodeType t = new CodeType(); 2042 t.setValue(value); 2043 if (this.type == null) 2044 this.type = new ArrayList<CodeType>(); 2045 this.type.add(t); 2046 return this; 2047 } 2048 2049 /** 2050 * @param value {@link #type} (For constructed pages, what kind of resources to include in the list.) 2051 */ 2052 public boolean hasType(String value) { 2053 if (this.type == null) 2054 return false; 2055 for (CodeType v : this.type) 2056 if (v.equals(value)) // code 2057 return true; 2058 return false; 2059 } 2060 2061 /** 2062 * @return {@link #package_} (For constructed pages, a list of packages to include in the page (or else empty for everything).) 2063 */ 2064 public List<StringType> getPackage() { 2065 if (this.package_ == null) 2066 this.package_ = new ArrayList<StringType>(); 2067 return this.package_; 2068 } 2069 2070 public boolean hasPackage() { 2071 if (this.package_ == null) 2072 return false; 2073 for (StringType item : this.package_) 2074 if (!item.isEmpty()) 2075 return true; 2076 return false; 2077 } 2078 2079 /** 2080 * @return {@link #package_} (For constructed pages, a list of packages to include in the page (or else empty for everything).) 2081 */ 2082 // syntactic sugar 2083 public StringType addPackageElement() {//2 2084 StringType t = new StringType(); 2085 if (this.package_ == null) 2086 this.package_ = new ArrayList<StringType>(); 2087 this.package_.add(t); 2088 return t; 2089 } 2090 2091 /** 2092 * @param value {@link #package_} (For constructed pages, a list of packages to include in the page (or else empty for everything).) 2093 */ 2094 public ImplementationGuidePageComponent addPackage(String value) { //1 2095 StringType t = new StringType(); 2096 t.setValue(value); 2097 if (this.package_ == null) 2098 this.package_ = new ArrayList<StringType>(); 2099 this.package_.add(t); 2100 return this; 2101 } 2102 2103 /** 2104 * @param value {@link #package_} (For constructed pages, a list of packages to include in the page (or else empty for everything).) 2105 */ 2106 public boolean hasPackage(String value) { 2107 if (this.package_ == null) 2108 return false; 2109 for (StringType v : this.package_) 2110 if (v.equals(value)) // string 2111 return true; 2112 return false; 2113 } 2114 2115 /** 2116 * @return {@link #format} (The format of the page.). This is the underlying object with id, value and extensions. The accessor "getFormat" gives direct access to the value 2117 */ 2118 public CodeType getFormatElement() { 2119 if (this.format == null) 2120 if (Configuration.errorOnAutoCreate()) 2121 throw new Error("Attempt to auto-create ImplementationGuidePageComponent.format"); 2122 else if (Configuration.doAutoCreate()) 2123 this.format = new CodeType(); // bb 2124 return this.format; 2125 } 2126 2127 public boolean hasFormatElement() { 2128 return this.format != null && !this.format.isEmpty(); 2129 } 2130 2131 public boolean hasFormat() { 2132 return this.format != null && !this.format.isEmpty(); 2133 } 2134 2135 /** 2136 * @param value {@link #format} (The format of the page.). This is the underlying object with id, value and extensions. The accessor "getFormat" gives direct access to the value 2137 */ 2138 public ImplementationGuidePageComponent setFormatElement(CodeType value) { 2139 this.format = value; 2140 return this; 2141 } 2142 2143 /** 2144 * @return The format of the page. 2145 */ 2146 public String getFormat() { 2147 return this.format == null ? null : this.format.getValue(); 2148 } 2149 2150 /** 2151 * @param value The format of the page. 2152 */ 2153 public ImplementationGuidePageComponent setFormat(String value) { 2154 if (Utilities.noString(value)) 2155 this.format = null; 2156 else { 2157 if (this.format == null) 2158 this.format = new CodeType(); 2159 this.format.setValue(value); 2160 } 2161 return this; 2162 } 2163 2164 /** 2165 * @return {@link #page} (Nested Pages/Sections under this page.) 2166 */ 2167 public List<ImplementationGuidePageComponent> getPage() { 2168 if (this.page == null) 2169 this.page = new ArrayList<ImplementationGuidePageComponent>(); 2170 return this.page; 2171 } 2172 2173 public boolean hasPage() { 2174 if (this.page == null) 2175 return false; 2176 for (ImplementationGuidePageComponent item : this.page) 2177 if (!item.isEmpty()) 2178 return true; 2179 return false; 2180 } 2181 2182 /** 2183 * @return {@link #page} (Nested Pages/Sections under this page.) 2184 */ 2185 // syntactic sugar 2186 public ImplementationGuidePageComponent addPage() { //3 2187 ImplementationGuidePageComponent t = new ImplementationGuidePageComponent(); 2188 if (this.page == null) 2189 this.page = new ArrayList<ImplementationGuidePageComponent>(); 2190 this.page.add(t); 2191 return t; 2192 } 2193 2194 // syntactic sugar 2195 public ImplementationGuidePageComponent addPage(ImplementationGuidePageComponent t) { //3 2196 if (t == null) 2197 return this; 2198 if (this.page == null) 2199 this.page = new ArrayList<ImplementationGuidePageComponent>(); 2200 this.page.add(t); 2201 return this; 2202 } 2203 2204 protected void listChildren(List<Property> childrenList) { 2205 super.listChildren(childrenList); 2206 childrenList.add(new Property("source", "uri", "The source address for the page.", 0, java.lang.Integer.MAX_VALUE, source)); 2207 childrenList.add(new Property("name", "string", "A short name used to represent this page in navigational structures such as table of contents, bread crumbs, etc.", 0, java.lang.Integer.MAX_VALUE, name)); 2208 childrenList.add(new Property("kind", "code", "The kind of page that this is. Some pages are autogenerated (list, example), and other kinds are of interest so that tools can navigate the user to the page of interest.", 0, java.lang.Integer.MAX_VALUE, kind)); 2209 childrenList.add(new Property("type", "code", "For constructed pages, what kind of resources to include in the list.", 0, java.lang.Integer.MAX_VALUE, type)); 2210 childrenList.add(new Property("package", "string", "For constructed pages, a list of packages to include in the page (or else empty for everything).", 0, java.lang.Integer.MAX_VALUE, package_)); 2211 childrenList.add(new Property("format", "code", "The format of the page.", 0, java.lang.Integer.MAX_VALUE, format)); 2212 childrenList.add(new Property("page", "@ImplementationGuide.page", "Nested Pages/Sections under this page.", 0, java.lang.Integer.MAX_VALUE, page)); 2213 } 2214 2215 @Override 2216 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2217 switch (hash) { 2218 case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // UriType 2219 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 2220 case 3292052: /*kind*/ return this.kind == null ? new Base[0] : new Base[] {this.kind}; // Enumeration<GuidePageKind> 2221 case 3575610: /*type*/ return this.type == null ? new Base[0] : this.type.toArray(new Base[this.type.size()]); // CodeType 2222 case -807062458: /*package*/ return this.package_ == null ? new Base[0] : this.package_.toArray(new Base[this.package_.size()]); // StringType 2223 case -1268779017: /*format*/ return this.format == null ? new Base[0] : new Base[] {this.format}; // CodeType 2224 case 3433103: /*page*/ return this.page == null ? new Base[0] : this.page.toArray(new Base[this.page.size()]); // ImplementationGuidePageComponent 2225 default: return super.getProperty(hash, name, checkValid); 2226 } 2227 2228 } 2229 2230 @Override 2231 public void setProperty(int hash, String name, Base value) throws FHIRException { 2232 switch (hash) { 2233 case -896505829: // source 2234 this.source = castToUri(value); // UriType 2235 break; 2236 case 3373707: // name 2237 this.name = castToString(value); // StringType 2238 break; 2239 case 3292052: // kind 2240 this.kind = new GuidePageKindEnumFactory().fromType(value); // Enumeration<GuidePageKind> 2241 break; 2242 case 3575610: // type 2243 this.getType().add(castToCode(value)); // CodeType 2244 break; 2245 case -807062458: // package 2246 this.getPackage().add(castToString(value)); // StringType 2247 break; 2248 case -1268779017: // format 2249 this.format = castToCode(value); // CodeType 2250 break; 2251 case 3433103: // page 2252 this.getPage().add((ImplementationGuidePageComponent) value); // ImplementationGuidePageComponent 2253 break; 2254 default: super.setProperty(hash, name, value); 2255 } 2256 2257 } 2258 2259 @Override 2260 public void setProperty(String name, Base value) throws FHIRException { 2261 if (name.equals("source")) 2262 this.source = castToUri(value); // UriType 2263 else if (name.equals("name")) 2264 this.name = castToString(value); // StringType 2265 else if (name.equals("kind")) 2266 this.kind = new GuidePageKindEnumFactory().fromType(value); // Enumeration<GuidePageKind> 2267 else if (name.equals("type")) 2268 this.getType().add(castToCode(value)); 2269 else if (name.equals("package")) 2270 this.getPackage().add(castToString(value)); 2271 else if (name.equals("format")) 2272 this.format = castToCode(value); // CodeType 2273 else if (name.equals("page")) 2274 this.getPage().add((ImplementationGuidePageComponent) value); 2275 else 2276 super.setProperty(name, value); 2277 } 2278 2279 @Override 2280 public Base makeProperty(int hash, String name) throws FHIRException { 2281 switch (hash) { 2282 case -896505829: throw new FHIRException("Cannot make property source as it is not a complex type"); // UriType 2283 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 2284 case 3292052: throw new FHIRException("Cannot make property kind as it is not a complex type"); // Enumeration<GuidePageKind> 2285 case 3575610: throw new FHIRException("Cannot make property type as it is not a complex type"); // CodeType 2286 case -807062458: throw new FHIRException("Cannot make property package as it is not a complex type"); // StringType 2287 case -1268779017: throw new FHIRException("Cannot make property format as it is not a complex type"); // CodeType 2288 case 3433103: return addPage(); // ImplementationGuidePageComponent 2289 default: return super.makeProperty(hash, name); 2290 } 2291 2292 } 2293 2294 @Override 2295 public Base addChild(String name) throws FHIRException { 2296 if (name.equals("source")) { 2297 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.source"); 2298 } 2299 else if (name.equals("name")) { 2300 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); 2301 } 2302 else if (name.equals("kind")) { 2303 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.kind"); 2304 } 2305 else if (name.equals("type")) { 2306 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.type"); 2307 } 2308 else if (name.equals("package")) { 2309 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.package"); 2310 } 2311 else if (name.equals("format")) { 2312 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.format"); 2313 } 2314 else if (name.equals("page")) { 2315 return addPage(); 2316 } 2317 else 2318 return super.addChild(name); 2319 } 2320 2321 public ImplementationGuidePageComponent copy() { 2322 ImplementationGuidePageComponent dst = new ImplementationGuidePageComponent(); 2323 copyValues(dst); 2324 dst.source = source == null ? null : source.copy(); 2325 dst.name = name == null ? null : name.copy(); 2326 dst.kind = kind == null ? null : kind.copy(); 2327 if (type != null) { 2328 dst.type = new ArrayList<CodeType>(); 2329 for (CodeType i : type) 2330 dst.type.add(i.copy()); 2331 }; 2332 if (package_ != null) { 2333 dst.package_ = new ArrayList<StringType>(); 2334 for (StringType i : package_) 2335 dst.package_.add(i.copy()); 2336 }; 2337 dst.format = format == null ? null : format.copy(); 2338 if (page != null) { 2339 dst.page = new ArrayList<ImplementationGuidePageComponent>(); 2340 for (ImplementationGuidePageComponent i : page) 2341 dst.page.add(i.copy()); 2342 }; 2343 return dst; 2344 } 2345 2346 @Override 2347 public boolean equalsDeep(Base other) { 2348 if (!super.equalsDeep(other)) 2349 return false; 2350 if (!(other instanceof ImplementationGuidePageComponent)) 2351 return false; 2352 ImplementationGuidePageComponent o = (ImplementationGuidePageComponent) other; 2353 return compareDeep(source, o.source, true) && compareDeep(name, o.name, true) && compareDeep(kind, o.kind, true) 2354 && compareDeep(type, o.type, true) && compareDeep(package_, o.package_, true) && compareDeep(format, o.format, true) 2355 && compareDeep(page, o.page, true); 2356 } 2357 2358 @Override 2359 public boolean equalsShallow(Base other) { 2360 if (!super.equalsShallow(other)) 2361 return false; 2362 if (!(other instanceof ImplementationGuidePageComponent)) 2363 return false; 2364 ImplementationGuidePageComponent o = (ImplementationGuidePageComponent) other; 2365 return compareValues(source, o.source, true) && compareValues(name, o.name, true) && compareValues(kind, o.kind, true) 2366 && compareValues(type, o.type, true) && compareValues(package_, o.package_, true) && compareValues(format, o.format, true) 2367 ; 2368 } 2369 2370 public boolean isEmpty() { 2371 return super.isEmpty() && (source == null || source.isEmpty()) && (name == null || name.isEmpty()) 2372 && (kind == null || kind.isEmpty()) && (type == null || type.isEmpty()) && (package_ == null || package_.isEmpty()) 2373 && (format == null || format.isEmpty()) && (page == null || page.isEmpty()); 2374 } 2375 2376 public String fhirType() { 2377 return "ImplementationGuide.page"; 2378 2379 } 2380 2381 } 2382 2383 /** 2384 * An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. 2385 */ 2386 @Child(name = "url", type = {UriType.class}, order=0, min=1, max=1, modifier=false, summary=true) 2387 @Description(shortDefinition="Absolute URL used to reference this Implementation Guide", formalDefinition="An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published." ) 2388 protected UriType url; 2389 2390 /** 2391 * The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually. 2392 */ 2393 @Child(name = "version", type = {StringType.class}, order=1, min=0, max=1, modifier=false, summary=true) 2394 @Description(shortDefinition="Logical id for this version of the Implementation Guide", formalDefinition="The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually." ) 2395 protected StringType version; 2396 2397 /** 2398 * A free text natural language name identifying the Implementation Guide. 2399 */ 2400 @Child(name = "name", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=true) 2401 @Description(shortDefinition="Informal name for this Implementation Guide", formalDefinition="A free text natural language name identifying the Implementation Guide." ) 2402 protected StringType name; 2403 2404 /** 2405 * The status of the Implementation Guide. 2406 */ 2407 @Child(name = "status", type = {CodeType.class}, order=3, min=1, max=1, modifier=true, summary=true) 2408 @Description(shortDefinition="draft | active | retired", formalDefinition="The status of the Implementation Guide." ) 2409 protected Enumeration<ConformanceResourceStatus> status; 2410 2411 /** 2412 * This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 2413 */ 2414 @Child(name = "experimental", type = {BooleanType.class}, order=4, min=0, max=1, modifier=false, summary=true) 2415 @Description(shortDefinition="If for testing purposes, not real usage", formalDefinition="This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage." ) 2416 protected BooleanType experimental; 2417 2418 /** 2419 * The name of the individual or organization that published the implementation guide. 2420 */ 2421 @Child(name = "publisher", type = {StringType.class}, order=5, min=0, max=1, modifier=false, summary=true) 2422 @Description(shortDefinition="Name of the publisher (Organization or individual)", formalDefinition="The name of the individual or organization that published the implementation guide." ) 2423 protected StringType publisher; 2424 2425 /** 2426 * Contacts to assist a user in finding and communicating with the publisher. 2427 */ 2428 @Child(name = "contact", type = {}, order=6, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2429 @Description(shortDefinition="Contact details of the publisher", formalDefinition="Contacts to assist a user in finding and communicating with the publisher." ) 2430 protected List<ImplementationGuideContactComponent> contact; 2431 2432 /** 2433 * The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes. 2434 */ 2435 @Child(name = "date", type = {DateTimeType.class}, order=7, min=0, max=1, modifier=false, summary=true) 2436 @Description(shortDefinition="Date for this version of the Implementation Guide", formalDefinition="The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes." ) 2437 protected DateTimeType date; 2438 2439 /** 2440 * A free text natural language description of the Implementation Guide and its use. 2441 */ 2442 @Child(name = "description", type = {StringType.class}, order=8, min=0, max=1, modifier=false, summary=true) 2443 @Description(shortDefinition="Natural language description of the Implementation Guide", formalDefinition="A free text natural language description of the Implementation Guide and its use." ) 2444 protected StringType description; 2445 2446 /** 2447 * The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined. 2448 */ 2449 @Child(name = "useContext", type = {CodeableConcept.class}, order=9, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2450 @Description(shortDefinition="The implementation guide is intended to support these contexts", formalDefinition="The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined." ) 2451 protected List<CodeableConcept> useContext; 2452 2453 /** 2454 * A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. 2455 */ 2456 @Child(name = "copyright", type = {StringType.class}, order=10, min=0, max=1, modifier=false, summary=false) 2457 @Description(shortDefinition="Use and/or publishing restrictions", formalDefinition="A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings." ) 2458 protected StringType copyright; 2459 2460 /** 2461 * The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version. 2462 */ 2463 @Child(name = "fhirVersion", type = {IdType.class}, order=11, min=0, max=1, modifier=false, summary=true) 2464 @Description(shortDefinition="FHIR Version this Implementation Guide targets", formalDefinition="The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version." ) 2465 protected IdType fhirVersion; 2466 2467 /** 2468 * Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides. 2469 */ 2470 @Child(name = "dependency", type = {}, order=12, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2471 @Description(shortDefinition="Another Implementation guide this depends on", formalDefinition="Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides." ) 2472 protected List<ImplementationGuideDependencyComponent> dependency; 2473 2474 /** 2475 * A logical group of resources. Logical groups can be used when building pages. 2476 */ 2477 @Child(name = "package", type = {}, order=13, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2478 @Description(shortDefinition="Group of resources as used in .page.package", formalDefinition="A logical group of resources. Logical groups can be used when building pages." ) 2479 protected List<ImplementationGuidePackageComponent> package_; 2480 2481 /** 2482 * A set of profiles that all resources covered by this implementation guide must conform to. 2483 */ 2484 @Child(name = "global", type = {}, order=14, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 2485 @Description(shortDefinition="Profiles that apply globally", formalDefinition="A set of profiles that all resources covered by this implementation guide must conform to." ) 2486 protected List<ImplementationGuideGlobalComponent> global; 2487 2488 /** 2489 * A binary file that is included in the implementation guide when it is published. 2490 */ 2491 @Child(name = "binary", type = {UriType.class}, order=15, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2492 @Description(shortDefinition="Image, css, script, etc.", formalDefinition="A binary file that is included in the implementation guide when it is published." ) 2493 protected List<UriType> binary; 2494 2495 /** 2496 * A page / section in the implementation guide. The root page is the implementation guide home page. 2497 */ 2498 @Child(name = "page", type = {}, order=16, min=1, max=1, modifier=false, summary=true) 2499 @Description(shortDefinition="Page/Section in the Guide", formalDefinition="A page / section in the implementation guide. The root page is the implementation guide home page." ) 2500 protected ImplementationGuidePageComponent page; 2501 2502 private static final long serialVersionUID = 1150122415L; 2503 2504 /** 2505 * Constructor 2506 */ 2507 public ImplementationGuide() { 2508 super(); 2509 } 2510 2511 /** 2512 * Constructor 2513 */ 2514 public ImplementationGuide(UriType url, StringType name, Enumeration<ConformanceResourceStatus> status, ImplementationGuidePageComponent page) { 2515 super(); 2516 this.url = url; 2517 this.name = name; 2518 this.status = status; 2519 this.page = page; 2520 } 2521 2522 /** 2523 * @return {@link #url} (An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2524 */ 2525 public UriType getUrlElement() { 2526 if (this.url == null) 2527 if (Configuration.errorOnAutoCreate()) 2528 throw new Error("Attempt to auto-create ImplementationGuide.url"); 2529 else if (Configuration.doAutoCreate()) 2530 this.url = new UriType(); // bb 2531 return this.url; 2532 } 2533 2534 public boolean hasUrlElement() { 2535 return this.url != null && !this.url.isEmpty(); 2536 } 2537 2538 public boolean hasUrl() { 2539 return this.url != null && !this.url.isEmpty(); 2540 } 2541 2542 /** 2543 * @param value {@link #url} (An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 2544 */ 2545 public ImplementationGuide setUrlElement(UriType value) { 2546 this.url = value; 2547 return this; 2548 } 2549 2550 /** 2551 * @return An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. 2552 */ 2553 public String getUrl() { 2554 return this.url == null ? null : this.url.getValue(); 2555 } 2556 2557 /** 2558 * @param value An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published. 2559 */ 2560 public ImplementationGuide setUrl(String value) { 2561 if (this.url == null) 2562 this.url = new UriType(); 2563 this.url.setValue(value); 2564 return this; 2565 } 2566 2567 /** 2568 * @return {@link #version} (The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 2569 */ 2570 public StringType getVersionElement() { 2571 if (this.version == null) 2572 if (Configuration.errorOnAutoCreate()) 2573 throw new Error("Attempt to auto-create ImplementationGuide.version"); 2574 else if (Configuration.doAutoCreate()) 2575 this.version = new StringType(); // bb 2576 return this.version; 2577 } 2578 2579 public boolean hasVersionElement() { 2580 return this.version != null && !this.version.isEmpty(); 2581 } 2582 2583 public boolean hasVersion() { 2584 return this.version != null && !this.version.isEmpty(); 2585 } 2586 2587 /** 2588 * @param value {@link #version} (The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 2589 */ 2590 public ImplementationGuide setVersionElement(StringType value) { 2591 this.version = value; 2592 return this; 2593 } 2594 2595 /** 2596 * @return The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually. 2597 */ 2598 public String getVersion() { 2599 return this.version == null ? null : this.version.getValue(); 2600 } 2601 2602 /** 2603 * @param value The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually. 2604 */ 2605 public ImplementationGuide setVersion(String value) { 2606 if (Utilities.noString(value)) 2607 this.version = null; 2608 else { 2609 if (this.version == null) 2610 this.version = new StringType(); 2611 this.version.setValue(value); 2612 } 2613 return this; 2614 } 2615 2616 /** 2617 * @return {@link #name} (A free text natural language name identifying the Implementation Guide.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2618 */ 2619 public StringType getNameElement() { 2620 if (this.name == null) 2621 if (Configuration.errorOnAutoCreate()) 2622 throw new Error("Attempt to auto-create ImplementationGuide.name"); 2623 else if (Configuration.doAutoCreate()) 2624 this.name = new StringType(); // bb 2625 return this.name; 2626 } 2627 2628 public boolean hasNameElement() { 2629 return this.name != null && !this.name.isEmpty(); 2630 } 2631 2632 public boolean hasName() { 2633 return this.name != null && !this.name.isEmpty(); 2634 } 2635 2636 /** 2637 * @param value {@link #name} (A free text natural language name identifying the Implementation Guide.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 2638 */ 2639 public ImplementationGuide setNameElement(StringType value) { 2640 this.name = value; 2641 return this; 2642 } 2643 2644 /** 2645 * @return A free text natural language name identifying the Implementation Guide. 2646 */ 2647 public String getName() { 2648 return this.name == null ? null : this.name.getValue(); 2649 } 2650 2651 /** 2652 * @param value A free text natural language name identifying the Implementation Guide. 2653 */ 2654 public ImplementationGuide setName(String value) { 2655 if (this.name == null) 2656 this.name = new StringType(); 2657 this.name.setValue(value); 2658 return this; 2659 } 2660 2661 /** 2662 * @return {@link #status} (The status of the Implementation Guide.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2663 */ 2664 public Enumeration<ConformanceResourceStatus> getStatusElement() { 2665 if (this.status == null) 2666 if (Configuration.errorOnAutoCreate()) 2667 throw new Error("Attempt to auto-create ImplementationGuide.status"); 2668 else if (Configuration.doAutoCreate()) 2669 this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); // bb 2670 return this.status; 2671 } 2672 2673 public boolean hasStatusElement() { 2674 return this.status != null && !this.status.isEmpty(); 2675 } 2676 2677 public boolean hasStatus() { 2678 return this.status != null && !this.status.isEmpty(); 2679 } 2680 2681 /** 2682 * @param value {@link #status} (The status of the Implementation Guide.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 2683 */ 2684 public ImplementationGuide setStatusElement(Enumeration<ConformanceResourceStatus> value) { 2685 this.status = value; 2686 return this; 2687 } 2688 2689 /** 2690 * @return The status of the Implementation Guide. 2691 */ 2692 public ConformanceResourceStatus getStatus() { 2693 return this.status == null ? null : this.status.getValue(); 2694 } 2695 2696 /** 2697 * @param value The status of the Implementation Guide. 2698 */ 2699 public ImplementationGuide setStatus(ConformanceResourceStatus value) { 2700 if (this.status == null) 2701 this.status = new Enumeration<ConformanceResourceStatus>(new ConformanceResourceStatusEnumFactory()); 2702 this.status.setValue(value); 2703 return this; 2704 } 2705 2706 /** 2707 * @return {@link #experimental} (This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 2708 */ 2709 public BooleanType getExperimentalElement() { 2710 if (this.experimental == null) 2711 if (Configuration.errorOnAutoCreate()) 2712 throw new Error("Attempt to auto-create ImplementationGuide.experimental"); 2713 else if (Configuration.doAutoCreate()) 2714 this.experimental = new BooleanType(); // bb 2715 return this.experimental; 2716 } 2717 2718 public boolean hasExperimentalElement() { 2719 return this.experimental != null && !this.experimental.isEmpty(); 2720 } 2721 2722 public boolean hasExperimental() { 2723 return this.experimental != null && !this.experimental.isEmpty(); 2724 } 2725 2726 /** 2727 * @param value {@link #experimental} (This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 2728 */ 2729 public ImplementationGuide setExperimentalElement(BooleanType value) { 2730 this.experimental = value; 2731 return this; 2732 } 2733 2734 /** 2735 * @return This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 2736 */ 2737 public boolean getExperimental() { 2738 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 2739 } 2740 2741 /** 2742 * @param value This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage. 2743 */ 2744 public ImplementationGuide setExperimental(boolean value) { 2745 if (this.experimental == null) 2746 this.experimental = new BooleanType(); 2747 this.experimental.setValue(value); 2748 return this; 2749 } 2750 2751 /** 2752 * @return {@link #publisher} (The name of the individual or organization that published the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 2753 */ 2754 public StringType getPublisherElement() { 2755 if (this.publisher == null) 2756 if (Configuration.errorOnAutoCreate()) 2757 throw new Error("Attempt to auto-create ImplementationGuide.publisher"); 2758 else if (Configuration.doAutoCreate()) 2759 this.publisher = new StringType(); // bb 2760 return this.publisher; 2761 } 2762 2763 public boolean hasPublisherElement() { 2764 return this.publisher != null && !this.publisher.isEmpty(); 2765 } 2766 2767 public boolean hasPublisher() { 2768 return this.publisher != null && !this.publisher.isEmpty(); 2769 } 2770 2771 /** 2772 * @param value {@link #publisher} (The name of the individual or organization that published the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 2773 */ 2774 public ImplementationGuide setPublisherElement(StringType value) { 2775 this.publisher = value; 2776 return this; 2777 } 2778 2779 /** 2780 * @return The name of the individual or organization that published the implementation guide. 2781 */ 2782 public String getPublisher() { 2783 return this.publisher == null ? null : this.publisher.getValue(); 2784 } 2785 2786 /** 2787 * @param value The name of the individual or organization that published the implementation guide. 2788 */ 2789 public ImplementationGuide setPublisher(String value) { 2790 if (Utilities.noString(value)) 2791 this.publisher = null; 2792 else { 2793 if (this.publisher == null) 2794 this.publisher = new StringType(); 2795 this.publisher.setValue(value); 2796 } 2797 return this; 2798 } 2799 2800 /** 2801 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 2802 */ 2803 public List<ImplementationGuideContactComponent> getContact() { 2804 if (this.contact == null) 2805 this.contact = new ArrayList<ImplementationGuideContactComponent>(); 2806 return this.contact; 2807 } 2808 2809 public boolean hasContact() { 2810 if (this.contact == null) 2811 return false; 2812 for (ImplementationGuideContactComponent item : this.contact) 2813 if (!item.isEmpty()) 2814 return true; 2815 return false; 2816 } 2817 2818 /** 2819 * @return {@link #contact} (Contacts to assist a user in finding and communicating with the publisher.) 2820 */ 2821 // syntactic sugar 2822 public ImplementationGuideContactComponent addContact() { //3 2823 ImplementationGuideContactComponent t = new ImplementationGuideContactComponent(); 2824 if (this.contact == null) 2825 this.contact = new ArrayList<ImplementationGuideContactComponent>(); 2826 this.contact.add(t); 2827 return t; 2828 } 2829 2830 // syntactic sugar 2831 public ImplementationGuide addContact(ImplementationGuideContactComponent t) { //3 2832 if (t == null) 2833 return this; 2834 if (this.contact == null) 2835 this.contact = new ArrayList<ImplementationGuideContactComponent>(); 2836 this.contact.add(t); 2837 return this; 2838 } 2839 2840 /** 2841 * @return {@link #date} (The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 2842 */ 2843 public DateTimeType getDateElement() { 2844 if (this.date == null) 2845 if (Configuration.errorOnAutoCreate()) 2846 throw new Error("Attempt to auto-create ImplementationGuide.date"); 2847 else if (Configuration.doAutoCreate()) 2848 this.date = new DateTimeType(); // bb 2849 return this.date; 2850 } 2851 2852 public boolean hasDateElement() { 2853 return this.date != null && !this.date.isEmpty(); 2854 } 2855 2856 public boolean hasDate() { 2857 return this.date != null && !this.date.isEmpty(); 2858 } 2859 2860 /** 2861 * @param value {@link #date} (The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 2862 */ 2863 public ImplementationGuide setDateElement(DateTimeType value) { 2864 this.date = value; 2865 return this; 2866 } 2867 2868 /** 2869 * @return The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes. 2870 */ 2871 public Date getDate() { 2872 return this.date == null ? null : this.date.getValue(); 2873 } 2874 2875 /** 2876 * @param value The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes. 2877 */ 2878 public ImplementationGuide setDate(Date value) { 2879 if (value == null) 2880 this.date = null; 2881 else { 2882 if (this.date == null) 2883 this.date = new DateTimeType(); 2884 this.date.setValue(value); 2885 } 2886 return this; 2887 } 2888 2889 /** 2890 * @return {@link #description} (A free text natural language description of the Implementation Guide and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2891 */ 2892 public StringType getDescriptionElement() { 2893 if (this.description == null) 2894 if (Configuration.errorOnAutoCreate()) 2895 throw new Error("Attempt to auto-create ImplementationGuide.description"); 2896 else if (Configuration.doAutoCreate()) 2897 this.description = new StringType(); // bb 2898 return this.description; 2899 } 2900 2901 public boolean hasDescriptionElement() { 2902 return this.description != null && !this.description.isEmpty(); 2903 } 2904 2905 public boolean hasDescription() { 2906 return this.description != null && !this.description.isEmpty(); 2907 } 2908 2909 /** 2910 * @param value {@link #description} (A free text natural language description of the Implementation Guide and its use.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 2911 */ 2912 public ImplementationGuide setDescriptionElement(StringType value) { 2913 this.description = value; 2914 return this; 2915 } 2916 2917 /** 2918 * @return A free text natural language description of the Implementation Guide and its use. 2919 */ 2920 public String getDescription() { 2921 return this.description == null ? null : this.description.getValue(); 2922 } 2923 2924 /** 2925 * @param value A free text natural language description of the Implementation Guide and its use. 2926 */ 2927 public ImplementationGuide setDescription(String value) { 2928 if (Utilities.noString(value)) 2929 this.description = null; 2930 else { 2931 if (this.description == null) 2932 this.description = new StringType(); 2933 this.description.setValue(value); 2934 } 2935 return this; 2936 } 2937 2938 /** 2939 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined.) 2940 */ 2941 public List<CodeableConcept> getUseContext() { 2942 if (this.useContext == null) 2943 this.useContext = new ArrayList<CodeableConcept>(); 2944 return this.useContext; 2945 } 2946 2947 public boolean hasUseContext() { 2948 if (this.useContext == null) 2949 return false; 2950 for (CodeableConcept item : this.useContext) 2951 if (!item.isEmpty()) 2952 return true; 2953 return false; 2954 } 2955 2956 /** 2957 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined.) 2958 */ 2959 // syntactic sugar 2960 public CodeableConcept addUseContext() { //3 2961 CodeableConcept t = new CodeableConcept(); 2962 if (this.useContext == null) 2963 this.useContext = new ArrayList<CodeableConcept>(); 2964 this.useContext.add(t); 2965 return t; 2966 } 2967 2968 // syntactic sugar 2969 public ImplementationGuide addUseContext(CodeableConcept t) { //3 2970 if (t == null) 2971 return this; 2972 if (this.useContext == null) 2973 this.useContext = new ArrayList<CodeableConcept>(); 2974 this.useContext.add(t); 2975 return this; 2976 } 2977 2978 /** 2979 * @return {@link #copyright} (A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 2980 */ 2981 public StringType getCopyrightElement() { 2982 if (this.copyright == null) 2983 if (Configuration.errorOnAutoCreate()) 2984 throw new Error("Attempt to auto-create ImplementationGuide.copyright"); 2985 else if (Configuration.doAutoCreate()) 2986 this.copyright = new StringType(); // bb 2987 return this.copyright; 2988 } 2989 2990 public boolean hasCopyrightElement() { 2991 return this.copyright != null && !this.copyright.isEmpty(); 2992 } 2993 2994 public boolean hasCopyright() { 2995 return this.copyright != null && !this.copyright.isEmpty(); 2996 } 2997 2998 /** 2999 * @param value {@link #copyright} (A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 3000 */ 3001 public ImplementationGuide setCopyrightElement(StringType value) { 3002 this.copyright = value; 3003 return this; 3004 } 3005 3006 /** 3007 * @return A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. 3008 */ 3009 public String getCopyright() { 3010 return this.copyright == null ? null : this.copyright.getValue(); 3011 } 3012 3013 /** 3014 * @param value A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings. 3015 */ 3016 public ImplementationGuide setCopyright(String value) { 3017 if (Utilities.noString(value)) 3018 this.copyright = null; 3019 else { 3020 if (this.copyright == null) 3021 this.copyright = new StringType(); 3022 this.copyright.setValue(value); 3023 } 3024 return this; 3025 } 3026 3027 /** 3028 * @return {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value 3029 */ 3030 public IdType getFhirVersionElement() { 3031 if (this.fhirVersion == null) 3032 if (Configuration.errorOnAutoCreate()) 3033 throw new Error("Attempt to auto-create ImplementationGuide.fhirVersion"); 3034 else if (Configuration.doAutoCreate()) 3035 this.fhirVersion = new IdType(); // bb 3036 return this.fhirVersion; 3037 } 3038 3039 public boolean hasFhirVersionElement() { 3040 return this.fhirVersion != null && !this.fhirVersion.isEmpty(); 3041 } 3042 3043 public boolean hasFhirVersion() { 3044 return this.fhirVersion != null && !this.fhirVersion.isEmpty(); 3045 } 3046 3047 /** 3048 * @param value {@link #fhirVersion} (The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value 3049 */ 3050 public ImplementationGuide setFhirVersionElement(IdType value) { 3051 this.fhirVersion = value; 3052 return this; 3053 } 3054 3055 /** 3056 * @return The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version. 3057 */ 3058 public String getFhirVersion() { 3059 return this.fhirVersion == null ? null : this.fhirVersion.getValue(); 3060 } 3061 3062 /** 3063 * @param value The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version. 3064 */ 3065 public ImplementationGuide setFhirVersion(String value) { 3066 if (Utilities.noString(value)) 3067 this.fhirVersion = null; 3068 else { 3069 if (this.fhirVersion == null) 3070 this.fhirVersion = new IdType(); 3071 this.fhirVersion.setValue(value); 3072 } 3073 return this; 3074 } 3075 3076 /** 3077 * @return {@link #dependency} (Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.) 3078 */ 3079 public List<ImplementationGuideDependencyComponent> getDependency() { 3080 if (this.dependency == null) 3081 this.dependency = new ArrayList<ImplementationGuideDependencyComponent>(); 3082 return this.dependency; 3083 } 3084 3085 public boolean hasDependency() { 3086 if (this.dependency == null) 3087 return false; 3088 for (ImplementationGuideDependencyComponent item : this.dependency) 3089 if (!item.isEmpty()) 3090 return true; 3091 return false; 3092 } 3093 3094 /** 3095 * @return {@link #dependency} (Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.) 3096 */ 3097 // syntactic sugar 3098 public ImplementationGuideDependencyComponent addDependency() { //3 3099 ImplementationGuideDependencyComponent t = new ImplementationGuideDependencyComponent(); 3100 if (this.dependency == null) 3101 this.dependency = new ArrayList<ImplementationGuideDependencyComponent>(); 3102 this.dependency.add(t); 3103 return t; 3104 } 3105 3106 // syntactic sugar 3107 public ImplementationGuide addDependency(ImplementationGuideDependencyComponent t) { //3 3108 if (t == null) 3109 return this; 3110 if (this.dependency == null) 3111 this.dependency = new ArrayList<ImplementationGuideDependencyComponent>(); 3112 this.dependency.add(t); 3113 return this; 3114 } 3115 3116 /** 3117 * @return {@link #package_} (A logical group of resources. Logical groups can be used when building pages.) 3118 */ 3119 public List<ImplementationGuidePackageComponent> getPackage() { 3120 if (this.package_ == null) 3121 this.package_ = new ArrayList<ImplementationGuidePackageComponent>(); 3122 return this.package_; 3123 } 3124 3125 public boolean hasPackage() { 3126 if (this.package_ == null) 3127 return false; 3128 for (ImplementationGuidePackageComponent item : this.package_) 3129 if (!item.isEmpty()) 3130 return true; 3131 return false; 3132 } 3133 3134 /** 3135 * @return {@link #package_} (A logical group of resources. Logical groups can be used when building pages.) 3136 */ 3137 // syntactic sugar 3138 public ImplementationGuidePackageComponent addPackage() { //3 3139 ImplementationGuidePackageComponent t = new ImplementationGuidePackageComponent(); 3140 if (this.package_ == null) 3141 this.package_ = new ArrayList<ImplementationGuidePackageComponent>(); 3142 this.package_.add(t); 3143 return t; 3144 } 3145 3146 // syntactic sugar 3147 public ImplementationGuide addPackage(ImplementationGuidePackageComponent t) { //3 3148 if (t == null) 3149 return this; 3150 if (this.package_ == null) 3151 this.package_ = new ArrayList<ImplementationGuidePackageComponent>(); 3152 this.package_.add(t); 3153 return this; 3154 } 3155 3156 /** 3157 * @return {@link #global} (A set of profiles that all resources covered by this implementation guide must conform to.) 3158 */ 3159 public List<ImplementationGuideGlobalComponent> getGlobal() { 3160 if (this.global == null) 3161 this.global = new ArrayList<ImplementationGuideGlobalComponent>(); 3162 return this.global; 3163 } 3164 3165 public boolean hasGlobal() { 3166 if (this.global == null) 3167 return false; 3168 for (ImplementationGuideGlobalComponent item : this.global) 3169 if (!item.isEmpty()) 3170 return true; 3171 return false; 3172 } 3173 3174 /** 3175 * @return {@link #global} (A set of profiles that all resources covered by this implementation guide must conform to.) 3176 */ 3177 // syntactic sugar 3178 public ImplementationGuideGlobalComponent addGlobal() { //3 3179 ImplementationGuideGlobalComponent t = new ImplementationGuideGlobalComponent(); 3180 if (this.global == null) 3181 this.global = new ArrayList<ImplementationGuideGlobalComponent>(); 3182 this.global.add(t); 3183 return t; 3184 } 3185 3186 // syntactic sugar 3187 public ImplementationGuide addGlobal(ImplementationGuideGlobalComponent t) { //3 3188 if (t == null) 3189 return this; 3190 if (this.global == null) 3191 this.global = new ArrayList<ImplementationGuideGlobalComponent>(); 3192 this.global.add(t); 3193 return this; 3194 } 3195 3196 /** 3197 * @return {@link #binary} (A binary file that is included in the implementation guide when it is published.) 3198 */ 3199 public List<UriType> getBinary() { 3200 if (this.binary == null) 3201 this.binary = new ArrayList<UriType>(); 3202 return this.binary; 3203 } 3204 3205 public boolean hasBinary() { 3206 if (this.binary == null) 3207 return false; 3208 for (UriType item : this.binary) 3209 if (!item.isEmpty()) 3210 return true; 3211 return false; 3212 } 3213 3214 /** 3215 * @return {@link #binary} (A binary file that is included in the implementation guide when it is published.) 3216 */ 3217 // syntactic sugar 3218 public UriType addBinaryElement() {//2 3219 UriType t = new UriType(); 3220 if (this.binary == null) 3221 this.binary = new ArrayList<UriType>(); 3222 this.binary.add(t); 3223 return t; 3224 } 3225 3226 /** 3227 * @param value {@link #binary} (A binary file that is included in the implementation guide when it is published.) 3228 */ 3229 public ImplementationGuide addBinary(String value) { //1 3230 UriType t = new UriType(); 3231 t.setValue(value); 3232 if (this.binary == null) 3233 this.binary = new ArrayList<UriType>(); 3234 this.binary.add(t); 3235 return this; 3236 } 3237 3238 /** 3239 * @param value {@link #binary} (A binary file that is included in the implementation guide when it is published.) 3240 */ 3241 public boolean hasBinary(String value) { 3242 if (this.binary == null) 3243 return false; 3244 for (UriType v : this.binary) 3245 if (v.equals(value)) // uri 3246 return true; 3247 return false; 3248 } 3249 3250 /** 3251 * @return {@link #page} (A page / section in the implementation guide. The root page is the implementation guide home page.) 3252 */ 3253 public ImplementationGuidePageComponent getPage() { 3254 if (this.page == null) 3255 if (Configuration.errorOnAutoCreate()) 3256 throw new Error("Attempt to auto-create ImplementationGuide.page"); 3257 else if (Configuration.doAutoCreate()) 3258 this.page = new ImplementationGuidePageComponent(); // cc 3259 return this.page; 3260 } 3261 3262 public boolean hasPage() { 3263 return this.page != null && !this.page.isEmpty(); 3264 } 3265 3266 /** 3267 * @param value {@link #page} (A page / section in the implementation guide. The root page is the implementation guide home page.) 3268 */ 3269 public ImplementationGuide setPage(ImplementationGuidePageComponent value) { 3270 this.page = value; 3271 return this; 3272 } 3273 3274 protected void listChildren(List<Property> childrenList) { 3275 super.listChildren(childrenList); 3276 childrenList.add(new Property("url", "uri", "An absolute URL that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance. This SHALL be a URL, SHOULD be globally unique, and SHOULD be an address at which this implementation guide is (or will be) published.", 0, java.lang.Integer.MAX_VALUE, url)); 3277 childrenList.add(new Property("version", "string", "The identifier that is used to identify this version of the Implementation Guide when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the Implementation Guide author manually.", 0, java.lang.Integer.MAX_VALUE, version)); 3278 childrenList.add(new Property("name", "string", "A free text natural language name identifying the Implementation Guide.", 0, java.lang.Integer.MAX_VALUE, name)); 3279 childrenList.add(new Property("status", "code", "The status of the Implementation Guide.", 0, java.lang.Integer.MAX_VALUE, status)); 3280 childrenList.add(new Property("experimental", "boolean", "This Implementation Guide was authored for testing purposes (or education/evaluation/marketing), and is not intended to be used for genuine usage.", 0, java.lang.Integer.MAX_VALUE, experimental)); 3281 childrenList.add(new Property("publisher", "string", "The name of the individual or organization that published the implementation guide.", 0, java.lang.Integer.MAX_VALUE, publisher)); 3282 childrenList.add(new Property("contact", "", "Contacts to assist a user in finding and communicating with the publisher.", 0, java.lang.Integer.MAX_VALUE, contact)); 3283 childrenList.add(new Property("date", "dateTime", "The date this version of the implementation guide was published. The date must change when the business version changes, if it does, and it must change if the status code changes. In addition, it should change when the substantive content of the implementation guide changes.", 0, java.lang.Integer.MAX_VALUE, date)); 3284 childrenList.add(new Property("description", "string", "A free text natural language description of the Implementation Guide and its use.", 0, java.lang.Integer.MAX_VALUE, description)); 3285 childrenList.add(new Property("useContext", "CodeableConcept", "The content was developed with a focus and intent of supporting the contexts that are listed. These terms may be used to assist with indexing and searching of implementation guides. The most common use of this element is to represent the country / jurisdiction for which this implementation guide was defined.", 0, java.lang.Integer.MAX_VALUE, useContext)); 3286 childrenList.add(new Property("copyright", "string", "A copyright statement relating to the implementation guide and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the details of the constraints and mappings.", 0, java.lang.Integer.MAX_VALUE, copyright)); 3287 childrenList.add(new Property("fhirVersion", "id", "The version of the FHIR specification on which this ImplementationGuide is based - this is the formal version of the specification, without the revision number, e.g. [publication].[major].[minor], which is 1.4.0 for this version.", 0, java.lang.Integer.MAX_VALUE, fhirVersion)); 3288 childrenList.add(new Property("dependency", "", "Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.", 0, java.lang.Integer.MAX_VALUE, dependency)); 3289 childrenList.add(new Property("package", "", "A logical group of resources. Logical groups can be used when building pages.", 0, java.lang.Integer.MAX_VALUE, package_)); 3290 childrenList.add(new Property("global", "", "A set of profiles that all resources covered by this implementation guide must conform to.", 0, java.lang.Integer.MAX_VALUE, global)); 3291 childrenList.add(new Property("binary", "uri", "A binary file that is included in the implementation guide when it is published.", 0, java.lang.Integer.MAX_VALUE, binary)); 3292 childrenList.add(new Property("page", "", "A page / section in the implementation guide. The root page is the implementation guide home page.", 0, java.lang.Integer.MAX_VALUE, page)); 3293 } 3294 3295 @Override 3296 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3297 switch (hash) { 3298 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 3299 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 3300 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 3301 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<ConformanceResourceStatus> 3302 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 3303 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 3304 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ImplementationGuideContactComponent 3305 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 3306 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 3307 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // CodeableConcept 3308 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // StringType 3309 case 461006061: /*fhirVersion*/ return this.fhirVersion == null ? new Base[0] : new Base[] {this.fhirVersion}; // IdType 3310 case -26291381: /*dependency*/ return this.dependency == null ? new Base[0] : this.dependency.toArray(new Base[this.dependency.size()]); // ImplementationGuideDependencyComponent 3311 case -807062458: /*package*/ return this.package_ == null ? new Base[0] : this.package_.toArray(new Base[this.package_.size()]); // ImplementationGuidePackageComponent 3312 case -1243020381: /*global*/ return this.global == null ? new Base[0] : this.global.toArray(new Base[this.global.size()]); // ImplementationGuideGlobalComponent 3313 case -1388966911: /*binary*/ return this.binary == null ? new Base[0] : this.binary.toArray(new Base[this.binary.size()]); // UriType 3314 case 3433103: /*page*/ return this.page == null ? new Base[0] : new Base[] {this.page}; // ImplementationGuidePageComponent 3315 default: return super.getProperty(hash, name, checkValid); 3316 } 3317 3318 } 3319 3320 @Override 3321 public void setProperty(int hash, String name, Base value) throws FHIRException { 3322 switch (hash) { 3323 case 116079: // url 3324 this.url = castToUri(value); // UriType 3325 break; 3326 case 351608024: // version 3327 this.version = castToString(value); // StringType 3328 break; 3329 case 3373707: // name 3330 this.name = castToString(value); // StringType 3331 break; 3332 case -892481550: // status 3333 this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus> 3334 break; 3335 case -404562712: // experimental 3336 this.experimental = castToBoolean(value); // BooleanType 3337 break; 3338 case 1447404028: // publisher 3339 this.publisher = castToString(value); // StringType 3340 break; 3341 case 951526432: // contact 3342 this.getContact().add((ImplementationGuideContactComponent) value); // ImplementationGuideContactComponent 3343 break; 3344 case 3076014: // date 3345 this.date = castToDateTime(value); // DateTimeType 3346 break; 3347 case -1724546052: // description 3348 this.description = castToString(value); // StringType 3349 break; 3350 case -669707736: // useContext 3351 this.getUseContext().add(castToCodeableConcept(value)); // CodeableConcept 3352 break; 3353 case 1522889671: // copyright 3354 this.copyright = castToString(value); // StringType 3355 break; 3356 case 461006061: // fhirVersion 3357 this.fhirVersion = castToId(value); // IdType 3358 break; 3359 case -26291381: // dependency 3360 this.getDependency().add((ImplementationGuideDependencyComponent) value); // ImplementationGuideDependencyComponent 3361 break; 3362 case -807062458: // package 3363 this.getPackage().add((ImplementationGuidePackageComponent) value); // ImplementationGuidePackageComponent 3364 break; 3365 case -1243020381: // global 3366 this.getGlobal().add((ImplementationGuideGlobalComponent) value); // ImplementationGuideGlobalComponent 3367 break; 3368 case -1388966911: // binary 3369 this.getBinary().add(castToUri(value)); // UriType 3370 break; 3371 case 3433103: // page 3372 this.page = (ImplementationGuidePageComponent) value; // ImplementationGuidePageComponent 3373 break; 3374 default: super.setProperty(hash, name, value); 3375 } 3376 3377 } 3378 3379 @Override 3380 public void setProperty(String name, Base value) throws FHIRException { 3381 if (name.equals("url")) 3382 this.url = castToUri(value); // UriType 3383 else if (name.equals("version")) 3384 this.version = castToString(value); // StringType 3385 else if (name.equals("name")) 3386 this.name = castToString(value); // StringType 3387 else if (name.equals("status")) 3388 this.status = new ConformanceResourceStatusEnumFactory().fromType(value); // Enumeration<ConformanceResourceStatus> 3389 else if (name.equals("experimental")) 3390 this.experimental = castToBoolean(value); // BooleanType 3391 else if (name.equals("publisher")) 3392 this.publisher = castToString(value); // StringType 3393 else if (name.equals("contact")) 3394 this.getContact().add((ImplementationGuideContactComponent) value); 3395 else if (name.equals("date")) 3396 this.date = castToDateTime(value); // DateTimeType 3397 else if (name.equals("description")) 3398 this.description = castToString(value); // StringType 3399 else if (name.equals("useContext")) 3400 this.getUseContext().add(castToCodeableConcept(value)); 3401 else if (name.equals("copyright")) 3402 this.copyright = castToString(value); // StringType 3403 else if (name.equals("fhirVersion")) 3404 this.fhirVersion = castToId(value); // IdType 3405 else if (name.equals("dependency")) 3406 this.getDependency().add((ImplementationGuideDependencyComponent) value); 3407 else if (name.equals("package")) 3408 this.getPackage().add((ImplementationGuidePackageComponent) value); 3409 else if (name.equals("global")) 3410 this.getGlobal().add((ImplementationGuideGlobalComponent) value); 3411 else if (name.equals("binary")) 3412 this.getBinary().add(castToUri(value)); 3413 else if (name.equals("page")) 3414 this.page = (ImplementationGuidePageComponent) value; // ImplementationGuidePageComponent 3415 else 3416 super.setProperty(name, value); 3417 } 3418 3419 @Override 3420 public Base makeProperty(int hash, String name) throws FHIRException { 3421 switch (hash) { 3422 case 116079: throw new FHIRException("Cannot make property url as it is not a complex type"); // UriType 3423 case 351608024: throw new FHIRException("Cannot make property version as it is not a complex type"); // StringType 3424 case 3373707: throw new FHIRException("Cannot make property name as it is not a complex type"); // StringType 3425 case -892481550: throw new FHIRException("Cannot make property status as it is not a complex type"); // Enumeration<ConformanceResourceStatus> 3426 case -404562712: throw new FHIRException("Cannot make property experimental as it is not a complex type"); // BooleanType 3427 case 1447404028: throw new FHIRException("Cannot make property publisher as it is not a complex type"); // StringType 3428 case 951526432: return addContact(); // ImplementationGuideContactComponent 3429 case 3076014: throw new FHIRException("Cannot make property date as it is not a complex type"); // DateTimeType 3430 case -1724546052: throw new FHIRException("Cannot make property description as it is not a complex type"); // StringType 3431 case -669707736: return addUseContext(); // CodeableConcept 3432 case 1522889671: throw new FHIRException("Cannot make property copyright as it is not a complex type"); // StringType 3433 case 461006061: throw new FHIRException("Cannot make property fhirVersion as it is not a complex type"); // IdType 3434 case -26291381: return addDependency(); // ImplementationGuideDependencyComponent 3435 case -807062458: return addPackage(); // ImplementationGuidePackageComponent 3436 case -1243020381: return addGlobal(); // ImplementationGuideGlobalComponent 3437 case -1388966911: throw new FHIRException("Cannot make property binary as it is not a complex type"); // UriType 3438 case 3433103: return getPage(); // ImplementationGuidePageComponent 3439 default: return super.makeProperty(hash, name); 3440 } 3441 3442 } 3443 3444 @Override 3445 public Base addChild(String name) throws FHIRException { 3446 if (name.equals("url")) { 3447 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.url"); 3448 } 3449 else if (name.equals("version")) { 3450 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.version"); 3451 } 3452 else if (name.equals("name")) { 3453 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); 3454 } 3455 else if (name.equals("status")) { 3456 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.status"); 3457 } 3458 else if (name.equals("experimental")) { 3459 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.experimental"); 3460 } 3461 else if (name.equals("publisher")) { 3462 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.publisher"); 3463 } 3464 else if (name.equals("contact")) { 3465 return addContact(); 3466 } 3467 else if (name.equals("date")) { 3468 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.date"); 3469 } 3470 else if (name.equals("description")) { 3471 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.description"); 3472 } 3473 else if (name.equals("useContext")) { 3474 return addUseContext(); 3475 } 3476 else if (name.equals("copyright")) { 3477 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.copyright"); 3478 } 3479 else if (name.equals("fhirVersion")) { 3480 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.fhirVersion"); 3481 } 3482 else if (name.equals("dependency")) { 3483 return addDependency(); 3484 } 3485 else if (name.equals("package")) { 3486 return addPackage(); 3487 } 3488 else if (name.equals("global")) { 3489 return addGlobal(); 3490 } 3491 else if (name.equals("binary")) { 3492 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.binary"); 3493 } 3494 else if (name.equals("page")) { 3495 this.page = new ImplementationGuidePageComponent(); 3496 return this.page; 3497 } 3498 else 3499 return super.addChild(name); 3500 } 3501 3502 public String fhirType() { 3503 return "ImplementationGuide"; 3504 3505 } 3506 3507 public ImplementationGuide copy() { 3508 ImplementationGuide dst = new ImplementationGuide(); 3509 copyValues(dst); 3510 dst.url = url == null ? null : url.copy(); 3511 dst.version = version == null ? null : version.copy(); 3512 dst.name = name == null ? null : name.copy(); 3513 dst.status = status == null ? null : status.copy(); 3514 dst.experimental = experimental == null ? null : experimental.copy(); 3515 dst.publisher = publisher == null ? null : publisher.copy(); 3516 if (contact != null) { 3517 dst.contact = new ArrayList<ImplementationGuideContactComponent>(); 3518 for (ImplementationGuideContactComponent i : contact) 3519 dst.contact.add(i.copy()); 3520 }; 3521 dst.date = date == null ? null : date.copy(); 3522 dst.description = description == null ? null : description.copy(); 3523 if (useContext != null) { 3524 dst.useContext = new ArrayList<CodeableConcept>(); 3525 for (CodeableConcept i : useContext) 3526 dst.useContext.add(i.copy()); 3527 }; 3528 dst.copyright = copyright == null ? null : copyright.copy(); 3529 dst.fhirVersion = fhirVersion == null ? null : fhirVersion.copy(); 3530 if (dependency != null) { 3531 dst.dependency = new ArrayList<ImplementationGuideDependencyComponent>(); 3532 for (ImplementationGuideDependencyComponent i : dependency) 3533 dst.dependency.add(i.copy()); 3534 }; 3535 if (package_ != null) { 3536 dst.package_ = new ArrayList<ImplementationGuidePackageComponent>(); 3537 for (ImplementationGuidePackageComponent i : package_) 3538 dst.package_.add(i.copy()); 3539 }; 3540 if (global != null) { 3541 dst.global = new ArrayList<ImplementationGuideGlobalComponent>(); 3542 for (ImplementationGuideGlobalComponent i : global) 3543 dst.global.add(i.copy()); 3544 }; 3545 if (binary != null) { 3546 dst.binary = new ArrayList<UriType>(); 3547 for (UriType i : binary) 3548 dst.binary.add(i.copy()); 3549 }; 3550 dst.page = page == null ? null : page.copy(); 3551 return dst; 3552 } 3553 3554 protected ImplementationGuide typedCopy() { 3555 return copy(); 3556 } 3557 3558 @Override 3559 public boolean equalsDeep(Base other) { 3560 if (!super.equalsDeep(other)) 3561 return false; 3562 if (!(other instanceof ImplementationGuide)) 3563 return false; 3564 ImplementationGuide o = (ImplementationGuide) other; 3565 return compareDeep(url, o.url, true) && compareDeep(version, o.version, true) && compareDeep(name, o.name, true) 3566 && compareDeep(status, o.status, true) && compareDeep(experimental, o.experimental, true) && compareDeep(publisher, o.publisher, true) 3567 && compareDeep(contact, o.contact, true) && compareDeep(date, o.date, true) && compareDeep(description, o.description, true) 3568 && compareDeep(useContext, o.useContext, true) && compareDeep(copyright, o.copyright, true) && compareDeep(fhirVersion, o.fhirVersion, true) 3569 && compareDeep(dependency, o.dependency, true) && compareDeep(package_, o.package_, true) && compareDeep(global, o.global, true) 3570 && compareDeep(binary, o.binary, true) && compareDeep(page, o.page, true); 3571 } 3572 3573 @Override 3574 public boolean equalsShallow(Base other) { 3575 if (!super.equalsShallow(other)) 3576 return false; 3577 if (!(other instanceof ImplementationGuide)) 3578 return false; 3579 ImplementationGuide o = (ImplementationGuide) other; 3580 return compareValues(url, o.url, true) && compareValues(version, o.version, true) && compareValues(name, o.name, true) 3581 && compareValues(status, o.status, true) && compareValues(experimental, o.experimental, true) && compareValues(publisher, o.publisher, true) 3582 && compareValues(date, o.date, true) && compareValues(description, o.description, true) && compareValues(copyright, o.copyright, true) 3583 && compareValues(fhirVersion, o.fhirVersion, true) && compareValues(binary, o.binary, true); 3584 } 3585 3586 public boolean isEmpty() { 3587 return super.isEmpty() && (url == null || url.isEmpty()) && (version == null || version.isEmpty()) 3588 && (name == null || name.isEmpty()) && (status == null || status.isEmpty()) && (experimental == null || experimental.isEmpty()) 3589 && (publisher == null || publisher.isEmpty()) && (contact == null || contact.isEmpty()) && (date == null || date.isEmpty()) 3590 && (description == null || description.isEmpty()) && (useContext == null || useContext.isEmpty()) 3591 && (copyright == null || copyright.isEmpty()) && (fhirVersion == null || fhirVersion.isEmpty()) 3592 && (dependency == null || dependency.isEmpty()) && (package_ == null || package_.isEmpty()) 3593 && (global == null || global.isEmpty()) && (binary == null || binary.isEmpty()) && (page == null || page.isEmpty()) 3594 ; 3595 } 3596 3597 @Override 3598 public ResourceType getResourceType() { 3599 return ResourceType.ImplementationGuide; 3600 } 3601 3602 /** 3603 * Search parameter: <b>dependency</b> 3604 * <p> 3605 * Description: <b>Where to find dependency</b><br> 3606 * Type: <b>uri</b><br> 3607 * Path: <b>ImplementationGuide.dependency.uri</b><br> 3608 * </p> 3609 */ 3610 @SearchParamDefinition(name="dependency", path="ImplementationGuide.dependency.uri", description="Where to find dependency", type="uri" ) 3611 public static final String SP_DEPENDENCY = "dependency"; 3612 /** 3613 * <b>Fluent Client</b> search parameter constant for <b>dependency</b> 3614 * <p> 3615 * Description: <b>Where to find dependency</b><br> 3616 * Type: <b>uri</b><br> 3617 * Path: <b>ImplementationGuide.dependency.uri</b><br> 3618 * </p> 3619 */ 3620 public static final ca.uhn.fhir.rest.gclient.UriClientParam DEPENDENCY = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_DEPENDENCY); 3621 3622 /** 3623 * Search parameter: <b>status</b> 3624 * <p> 3625 * Description: <b>The current status of the implementation guide</b><br> 3626 * Type: <b>token</b><br> 3627 * Path: <b>ImplementationGuide.status</b><br> 3628 * </p> 3629 */ 3630 @SearchParamDefinition(name="status", path="ImplementationGuide.status", description="The current status of the implementation guide", type="token" ) 3631 public static final String SP_STATUS = "status"; 3632 /** 3633 * <b>Fluent Client</b> search parameter constant for <b>status</b> 3634 * <p> 3635 * Description: <b>The current status of the implementation guide</b><br> 3636 * Type: <b>token</b><br> 3637 * Path: <b>ImplementationGuide.status</b><br> 3638 * </p> 3639 */ 3640 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 3641 3642 /** 3643 * Search parameter: <b>description</b> 3644 * <p> 3645 * Description: <b>Text search in the description of the implementation guide</b><br> 3646 * Type: <b>string</b><br> 3647 * Path: <b>ImplementationGuide.description</b><br> 3648 * </p> 3649 */ 3650 @SearchParamDefinition(name="description", path="ImplementationGuide.description", description="Text search in the description of the implementation guide", type="string" ) 3651 public static final String SP_DESCRIPTION = "description"; 3652 /** 3653 * <b>Fluent Client</b> search parameter constant for <b>description</b> 3654 * <p> 3655 * Description: <b>Text search in the description of the implementation guide</b><br> 3656 * Type: <b>string</b><br> 3657 * Path: <b>ImplementationGuide.description</b><br> 3658 * </p> 3659 */ 3660 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 3661 3662 /** 3663 * Search parameter: <b>name</b> 3664 * <p> 3665 * Description: <b>Name of the implementation guide</b><br> 3666 * Type: <b>string</b><br> 3667 * Path: <b>ImplementationGuide.name</b><br> 3668 * </p> 3669 */ 3670 @SearchParamDefinition(name="name", path="ImplementationGuide.name", description="Name of the implementation guide", type="string" ) 3671 public static final String SP_NAME = "name"; 3672 /** 3673 * <b>Fluent Client</b> search parameter constant for <b>name</b> 3674 * <p> 3675 * Description: <b>Name of the implementation guide</b><br> 3676 * Type: <b>string</b><br> 3677 * Path: <b>ImplementationGuide.name</b><br> 3678 * </p> 3679 */ 3680 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 3681 3682 /** 3683 * Search parameter: <b>resource</b> 3684 * <p> 3685 * Description: <b>Location of the resource</b><br> 3686 * Type: <b>reference</b><br> 3687 * Path: <b>ImplementationGuide.package.resource.source[x]</b><br> 3688 * </p> 3689 */ 3690 @SearchParamDefinition(name="resource", path="ImplementationGuide.package.resource.source", description="Location of the resource", type="reference" ) 3691 public static final String SP_RESOURCE = "resource"; 3692 /** 3693 * <b>Fluent Client</b> search parameter constant for <b>resource</b> 3694 * <p> 3695 * Description: <b>Location of the resource</b><br> 3696 * Type: <b>reference</b><br> 3697 * Path: <b>ImplementationGuide.package.resource.source[x]</b><br> 3698 * </p> 3699 */ 3700 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam RESOURCE = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_RESOURCE); 3701 3702/** 3703 * Constant for fluent queries to be used to add include statements. Specifies 3704 * the path value of "<b>ImplementationGuide:resource</b>". 3705 */ 3706 public static final ca.uhn.fhir.model.api.Include INCLUDE_RESOURCE = new ca.uhn.fhir.model.api.Include("ImplementationGuide:resource").toLocked(); 3707 3708 /** 3709 * Search parameter: <b>context</b> 3710 * <p> 3711 * Description: <b>A use context assigned to the structure</b><br> 3712 * Type: <b>token</b><br> 3713 * Path: <b>ImplementationGuide.useContext</b><br> 3714 * </p> 3715 */ 3716 @SearchParamDefinition(name="context", path="ImplementationGuide.useContext", description="A use context assigned to the structure", type="token" ) 3717 public static final String SP_CONTEXT = "context"; 3718 /** 3719 * <b>Fluent Client</b> search parameter constant for <b>context</b> 3720 * <p> 3721 * Description: <b>A use context assigned to the structure</b><br> 3722 * Type: <b>token</b><br> 3723 * Path: <b>ImplementationGuide.useContext</b><br> 3724 * </p> 3725 */ 3726 public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTEXT = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_CONTEXT); 3727 3728 /** 3729 * Search parameter: <b>experimental</b> 3730 * <p> 3731 * Description: <b>If for testing purposes, not real usage</b><br> 3732 * Type: <b>token</b><br> 3733 * Path: <b>ImplementationGuide.experimental</b><br> 3734 * </p> 3735 */ 3736 @SearchParamDefinition(name="experimental", path="ImplementationGuide.experimental", description="If for testing purposes, not real usage", type="token" ) 3737 public static final String SP_EXPERIMENTAL = "experimental"; 3738 /** 3739 * <b>Fluent Client</b> search parameter constant for <b>experimental</b> 3740 * <p> 3741 * Description: <b>If for testing purposes, not real usage</b><br> 3742 * Type: <b>token</b><br> 3743 * Path: <b>ImplementationGuide.experimental</b><br> 3744 * </p> 3745 */ 3746 public static final ca.uhn.fhir.rest.gclient.TokenClientParam EXPERIMENTAL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EXPERIMENTAL); 3747 3748 /** 3749 * Search parameter: <b>date</b> 3750 * <p> 3751 * Description: <b>The implementation guide publication date</b><br> 3752 * Type: <b>date</b><br> 3753 * Path: <b>ImplementationGuide.date</b><br> 3754 * </p> 3755 */ 3756 @SearchParamDefinition(name="date", path="ImplementationGuide.date", description="The implementation guide publication date", type="date" ) 3757 public static final String SP_DATE = "date"; 3758 /** 3759 * <b>Fluent Client</b> search parameter constant for <b>date</b> 3760 * <p> 3761 * Description: <b>The implementation guide publication date</b><br> 3762 * Type: <b>date</b><br> 3763 * Path: <b>ImplementationGuide.date</b><br> 3764 * </p> 3765 */ 3766 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 3767 3768 /** 3769 * Search parameter: <b>url</b> 3770 * <p> 3771 * Description: <b>Absolute URL used to reference this Implementation Guide</b><br> 3772 * Type: <b>uri</b><br> 3773 * Path: <b>ImplementationGuide.url</b><br> 3774 * </p> 3775 */ 3776 @SearchParamDefinition(name="url", path="ImplementationGuide.url", description="Absolute URL used to reference this Implementation Guide", type="uri" ) 3777 public static final String SP_URL = "url"; 3778 /** 3779 * <b>Fluent Client</b> search parameter constant for <b>url</b> 3780 * <p> 3781 * Description: <b>Absolute URL used to reference this Implementation Guide</b><br> 3782 * Type: <b>uri</b><br> 3783 * Path: <b>ImplementationGuide.url</b><br> 3784 * </p> 3785 */ 3786 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 3787 3788 /** 3789 * Search parameter: <b>publisher</b> 3790 * <p> 3791 * Description: <b>Name of the publisher of the implementation guide</b><br> 3792 * Type: <b>string</b><br> 3793 * Path: <b>ImplementationGuide.publisher</b><br> 3794 * </p> 3795 */ 3796 @SearchParamDefinition(name="publisher", path="ImplementationGuide.publisher", description="Name of the publisher of the implementation guide", type="string" ) 3797 public static final String SP_PUBLISHER = "publisher"; 3798 /** 3799 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 3800 * <p> 3801 * Description: <b>Name of the publisher of the implementation guide</b><br> 3802 * Type: <b>string</b><br> 3803 * Path: <b>ImplementationGuide.publisher</b><br> 3804 * </p> 3805 */ 3806 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 3807 3808 /** 3809 * Search parameter: <b>version</b> 3810 * <p> 3811 * Description: <b>The version identifier of the implementation guide</b><br> 3812 * Type: <b>token</b><br> 3813 * Path: <b>ImplementationGuide.version</b><br> 3814 * </p> 3815 */ 3816 @SearchParamDefinition(name="version", path="ImplementationGuide.version", description="The version identifier of the implementation guide", type="token" ) 3817 public static final String SP_VERSION = "version"; 3818 /** 3819 * <b>Fluent Client</b> search parameter constant for <b>version</b> 3820 * <p> 3821 * Description: <b>The version identifier of the implementation guide</b><br> 3822 * Type: <b>token</b><br> 3823 * Path: <b>ImplementationGuide.version</b><br> 3824 * </p> 3825 */ 3826 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 3827 3828 3829} 3830