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