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