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