001package org.hl7.fhir.r4.model; 002 003/* 004 Copyright (c) 2011+, HL7, Inc. 005 All rights reserved. 006 007 Redistribution and use in source and binary forms, with or without modification, 008 are permitted provided that the following conditions are met: 009 010 * Redistributions of source code must retain the above copyright notice, this 011 list of conditions and the following disclaimer. 012 * Redistributions in binary form must reproduce the above copyright notice, 013 this list of conditions and the following disclaimer in the documentation 014 and/or other materials provided with the distribution. 015 * Neither the name of HL7 nor the names of its contributors may be used to 016 endorse or promote products derived from this software without specific 017 prior written permission. 018 019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 020 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 021 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 022 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 023 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 024 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 025 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 026 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 027 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 028 POSSIBILITY OF SUCH DAMAGE. 029 030*/ 031 032// Generated on Sun, May 6, 2018 17:51-0400 for FHIR v3.4.0 033 034import java.util.*; 035 036import org.hl7.fhir.utilities.Utilities; 037import org.hl7.fhir.r4.model.Enumerations.*; 038import ca.uhn.fhir.model.api.annotation.ResourceDef; 039import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 040import ca.uhn.fhir.model.api.annotation.Child; 041import ca.uhn.fhir.model.api.annotation.ChildOrder; 042import ca.uhn.fhir.model.api.annotation.Description; 043import ca.uhn.fhir.model.api.annotation.Block; 044import org.hl7.fhir.instance.model.api.*; 045import org.hl7.fhir.exceptions.FHIRException; 046/** 047 * 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. 048 */ 049@ResourceDef(name="ImplementationGuide", profile="http://hl7.org/fhir/Profile/ImplementationGuide") 050@ChildOrder(names={"url", "version", "name", "status", "experimental", "date", "publisher", "contact", "description", "useContext", "jurisdiction", "copyright", "fhirVersion", "dependsOn", "global", "definition", "manifest"}) 051public class ImplementationGuide extends MetadataResource { 052 053 public enum GuidePageGeneration { 054 /** 055 * Page is proper xhtml with no templating. Will be brought across unchanged for standard post-processing 056 */ 057 HTML, 058 /** 059 * Page is markdown with templating. Will use the template to create a file that imports the markdown file prior to post-processing 060 */ 061 MARKDOWN, 062 /** 063 * Page is xml with templating. Will use the template to create a file that imports the source file and run the nominated XSLT transform (see parameters) if present prior to post-processing 064 */ 065 XML, 066 /** 067 * Page will be generated by the publication process - no source to bring across 068 */ 069 GENERATED, 070 /** 071 * added to help the parsers with the generic types 072 */ 073 NULL; 074 public static GuidePageGeneration fromCode(String codeString) throws FHIRException { 075 if (codeString == null || "".equals(codeString)) 076 return null; 077 if ("html".equals(codeString)) 078 return HTML; 079 if ("markdown".equals(codeString)) 080 return MARKDOWN; 081 if ("xml".equals(codeString)) 082 return XML; 083 if ("generated".equals(codeString)) 084 return GENERATED; 085 if (Configuration.isAcceptInvalidEnums()) 086 return null; 087 else 088 throw new FHIRException("Unknown GuidePageGeneration code '"+codeString+"'"); 089 } 090 public String toCode() { 091 switch (this) { 092 case HTML: return "html"; 093 case MARKDOWN: return "markdown"; 094 case XML: return "xml"; 095 case GENERATED: return "generated"; 096 default: return "?"; 097 } 098 } 099 public String getSystem() { 100 switch (this) { 101 case HTML: return "http://hl7.org/fhir/guide-page-generation"; 102 case MARKDOWN: return "http://hl7.org/fhir/guide-page-generation"; 103 case XML: return "http://hl7.org/fhir/guide-page-generation"; 104 case GENERATED: return "http://hl7.org/fhir/guide-page-generation"; 105 default: return "?"; 106 } 107 } 108 public String getDefinition() { 109 switch (this) { 110 case HTML: return "Page is proper xhtml with no templating. Will be brought across unchanged for standard post-processing"; 111 case MARKDOWN: return "Page is markdown with templating. Will use the template to create a file that imports the markdown file prior to post-processing"; 112 case XML: return "Page is xml with templating. Will use the template to create a file that imports the source file and run the nominated XSLT transform (see parameters) if present prior to post-processing"; 113 case GENERATED: return "Page will be generated by the publication process - no source to bring across"; 114 default: return "?"; 115 } 116 } 117 public String getDisplay() { 118 switch (this) { 119 case HTML: return "HTML"; 120 case MARKDOWN: return "Markdown"; 121 case XML: return "XML"; 122 case GENERATED: return "Generated"; 123 default: return "?"; 124 } 125 } 126 } 127 128 public static class GuidePageGenerationEnumFactory implements EnumFactory<GuidePageGeneration> { 129 public GuidePageGeneration fromCode(String codeString) throws IllegalArgumentException { 130 if (codeString == null || "".equals(codeString)) 131 if (codeString == null || "".equals(codeString)) 132 return null; 133 if ("html".equals(codeString)) 134 return GuidePageGeneration.HTML; 135 if ("markdown".equals(codeString)) 136 return GuidePageGeneration.MARKDOWN; 137 if ("xml".equals(codeString)) 138 return GuidePageGeneration.XML; 139 if ("generated".equals(codeString)) 140 return GuidePageGeneration.GENERATED; 141 throw new IllegalArgumentException("Unknown GuidePageGeneration code '"+codeString+"'"); 142 } 143 public Enumeration<GuidePageGeneration> fromType(Base code) throws FHIRException { 144 if (code == null) 145 return null; 146 if (code.isEmpty()) 147 return new Enumeration<GuidePageGeneration>(this); 148 String codeString = ((PrimitiveType) code).asStringValue(); 149 if (codeString == null || "".equals(codeString)) 150 return null; 151 if ("html".equals(codeString)) 152 return new Enumeration<GuidePageGeneration>(this, GuidePageGeneration.HTML); 153 if ("markdown".equals(codeString)) 154 return new Enumeration<GuidePageGeneration>(this, GuidePageGeneration.MARKDOWN); 155 if ("xml".equals(codeString)) 156 return new Enumeration<GuidePageGeneration>(this, GuidePageGeneration.XML); 157 if ("generated".equals(codeString)) 158 return new Enumeration<GuidePageGeneration>(this, GuidePageGeneration.GENERATED); 159 throw new FHIRException("Unknown GuidePageGeneration code '"+codeString+"'"); 160 } 161 public String toCode(GuidePageGeneration code) { 162 if (code == GuidePageGeneration.HTML) 163 return "html"; 164 if (code == GuidePageGeneration.MARKDOWN) 165 return "markdown"; 166 if (code == GuidePageGeneration.XML) 167 return "xml"; 168 if (code == GuidePageGeneration.GENERATED) 169 return "generated"; 170 return "?"; 171 } 172 public String toSystem(GuidePageGeneration code) { 173 return code.getSystem(); 174 } 175 } 176 177 public enum GuideParameterCode { 178 /** 179 * If the value of this boolean 0..1 parameter is "true" then all conformance resources will have any specified [Resource].version overwritten with the ImplementationGuide.version 180 */ 181 APPLYBUSINESSVERSION, 182 /** 183 * If the value of this boolean 0..1 parameter is "true" then all conformance resources will have any specified [Resource].jurisdiction overwritten with the ImplementationGuide.jurisdiction 184 */ 185 APPLYJURISDICTION, 186 /** 187 * The value of this string 0..* parameter is a subfolder of the build context's location that is to be scanned to load resources. Scope is (if present) a particular resource type 188 */ 189 PATHRESOURCE, 190 /** 191 * The value of this string 0..1 parameter is a subfolder of the build context's location that contains files that are part of the html content processed by the builder 192 */ 193 PATHPAGES, 194 /** 195 * The value of this string 0..1 parameter is a subfolder of the build context's location that is used as the terminology cache. If this is not present, the terminology cache is on the local system, not under version control 196 */ 197 PATHTXCACHE, 198 /** 199 * The value of this string 0..1 parameter is a path to the ExpansionProfile used when expanding value sets for this implementation guide. This is particularly used to specify the versions of published terminologies such as SNOMED CT 200 */ 201 EXPANSIONPROFILE, 202 /** 203 * The value of this string 0..1 parameter is either "warning" or "error" (default = "error"). If the value is "warning" then IG build tools allow the IG to be considered successfully build even when there is no internal broken links 204 */ 205 RULEBROKENLINKS, 206 /** 207 * The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in XML format. If not present, the Publication Tool decides whether to generate XML 208 */ 209 GENERATEXML, 210 /** 211 * The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in JSON format. If not present, the Publication Tool decides whether to generate JSON 212 */ 213 GENERATEJSON, 214 /** 215 * The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in Turtle format. If not present, the Publication Tool decides whether to generate Turtle 216 */ 217 GENERATETURTLE, 218 /** 219 * The value of this string singleton parameter is the name of the file to use as the builder template for each generated page (see templating) 220 */ 221 HTMLTEMPLATE, 222 /** 223 * added to help the parsers with the generic types 224 */ 225 NULL; 226 public static GuideParameterCode fromCode(String codeString) throws FHIRException { 227 if (codeString == null || "".equals(codeString)) 228 return null; 229 if ("apply-business-version".equals(codeString)) 230 return APPLYBUSINESSVERSION; 231 if ("apply-jurisdiction".equals(codeString)) 232 return APPLYJURISDICTION; 233 if ("path-resource".equals(codeString)) 234 return PATHRESOURCE; 235 if ("path-pages".equals(codeString)) 236 return PATHPAGES; 237 if ("path-tx-cache".equals(codeString)) 238 return PATHTXCACHE; 239 if ("expansion-profile".equals(codeString)) 240 return EXPANSIONPROFILE; 241 if ("rule-broken-links".equals(codeString)) 242 return RULEBROKENLINKS; 243 if ("generate-xml".equals(codeString)) 244 return GENERATEXML; 245 if ("generate-json".equals(codeString)) 246 return GENERATEJSON; 247 if ("generate-turtle".equals(codeString)) 248 return GENERATETURTLE; 249 if ("html-template".equals(codeString)) 250 return HTMLTEMPLATE; 251 if (Configuration.isAcceptInvalidEnums()) 252 return null; 253 else 254 throw new FHIRException("Unknown GuideParameterCode code '"+codeString+"'"); 255 } 256 public String toCode() { 257 switch (this) { 258 case APPLYBUSINESSVERSION: return "apply-business-version"; 259 case APPLYJURISDICTION: return "apply-jurisdiction"; 260 case PATHRESOURCE: return "path-resource"; 261 case PATHPAGES: return "path-pages"; 262 case PATHTXCACHE: return "path-tx-cache"; 263 case EXPANSIONPROFILE: return "expansion-profile"; 264 case RULEBROKENLINKS: return "rule-broken-links"; 265 case GENERATEXML: return "generate-xml"; 266 case GENERATEJSON: return "generate-json"; 267 case GENERATETURTLE: return "generate-turtle"; 268 case HTMLTEMPLATE: return "html-template"; 269 default: return "?"; 270 } 271 } 272 public String getSystem() { 273 switch (this) { 274 case APPLYBUSINESSVERSION: return "http://hl7.org/fhir/guide-parameter-code"; 275 case APPLYJURISDICTION: return "http://hl7.org/fhir/guide-parameter-code"; 276 case PATHRESOURCE: return "http://hl7.org/fhir/guide-parameter-code"; 277 case PATHPAGES: return "http://hl7.org/fhir/guide-parameter-code"; 278 case PATHTXCACHE: return "http://hl7.org/fhir/guide-parameter-code"; 279 case EXPANSIONPROFILE: return "http://hl7.org/fhir/guide-parameter-code"; 280 case RULEBROKENLINKS: return "http://hl7.org/fhir/guide-parameter-code"; 281 case GENERATEXML: return "http://hl7.org/fhir/guide-parameter-code"; 282 case GENERATEJSON: return "http://hl7.org/fhir/guide-parameter-code"; 283 case GENERATETURTLE: return "http://hl7.org/fhir/guide-parameter-code"; 284 case HTMLTEMPLATE: return "http://hl7.org/fhir/guide-parameter-code"; 285 default: return "?"; 286 } 287 } 288 public String getDefinition() { 289 switch (this) { 290 case APPLYBUSINESSVERSION: return "If the value of this boolean 0..1 parameter is \"true\" then all conformance resources will have any specified [Resource].version overwritten with the ImplementationGuide.version"; 291 case APPLYJURISDICTION: return "If the value of this boolean 0..1 parameter is \"true\" then all conformance resources will have any specified [Resource].jurisdiction overwritten with the ImplementationGuide.jurisdiction"; 292 case PATHRESOURCE: return "The value of this string 0..* parameter is a subfolder of the build context's location that is to be scanned to load resources. Scope is (if present) a particular resource type"; 293 case PATHPAGES: return "The value of this string 0..1 parameter is a subfolder of the build context's location that contains files that are part of the html content processed by the builder"; 294 case PATHTXCACHE: return "The value of this string 0..1 parameter is a subfolder of the build context's location that is used as the terminology cache. If this is not present, the terminology cache is on the local system, not under version control"; 295 case EXPANSIONPROFILE: return "The value of this string 0..1 parameter is a path to the ExpansionProfile used when expanding value sets for this implementation guide. This is particularly used to specify the versions of published terminologies such as SNOMED CT"; 296 case RULEBROKENLINKS: return "The value of this string 0..1 parameter is either \"warning\" or \"error\" (default = \"error\"). If the value is \"warning\" then IG build tools allow the IG to be considered successfully build even when there is no internal broken links"; 297 case GENERATEXML: return "The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in XML format. If not present, the Publication Tool decides whether to generate XML"; 298 case GENERATEJSON: return "The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in JSON format. If not present, the Publication Tool decides whether to generate JSON"; 299 case GENERATETURTLE: return "The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in Turtle format. If not present, the Publication Tool decides whether to generate Turtle"; 300 case HTMLTEMPLATE: return "The value of this string singleton parameter is the name of the file to use as the builder template for each generated page (see templating)"; 301 default: return "?"; 302 } 303 } 304 public String getDisplay() { 305 switch (this) { 306 case APPLYBUSINESSVERSION: return "Apply Business Version"; 307 case APPLYJURISDICTION: return "Apply Jurisdiction"; 308 case PATHRESOURCE: return "Resource Path"; 309 case PATHPAGES: return "Pages Path"; 310 case PATHTXCACHE: return "Terminology Cache Path"; 311 case EXPANSIONPROFILE: return "Expansion Profile"; 312 case RULEBROKENLINKS: return "Broken Links Rule"; 313 case GENERATEXML: return "Generate XML"; 314 case GENERATEJSON: return "Generate JSON"; 315 case GENERATETURTLE: return "Generate Turtle"; 316 case HTMLTEMPLATE: return "HTML Template"; 317 default: return "?"; 318 } 319 } 320 } 321 322 public static class GuideParameterCodeEnumFactory implements EnumFactory<GuideParameterCode> { 323 public GuideParameterCode fromCode(String codeString) throws IllegalArgumentException { 324 if (codeString == null || "".equals(codeString)) 325 if (codeString == null || "".equals(codeString)) 326 return null; 327 if ("apply-business-version".equals(codeString)) 328 return GuideParameterCode.APPLYBUSINESSVERSION; 329 if ("apply-jurisdiction".equals(codeString)) 330 return GuideParameterCode.APPLYJURISDICTION; 331 if ("path-resource".equals(codeString)) 332 return GuideParameterCode.PATHRESOURCE; 333 if ("path-pages".equals(codeString)) 334 return GuideParameterCode.PATHPAGES; 335 if ("path-tx-cache".equals(codeString)) 336 return GuideParameterCode.PATHTXCACHE; 337 if ("expansion-profile".equals(codeString)) 338 return GuideParameterCode.EXPANSIONPROFILE; 339 if ("rule-broken-links".equals(codeString)) 340 return GuideParameterCode.RULEBROKENLINKS; 341 if ("generate-xml".equals(codeString)) 342 return GuideParameterCode.GENERATEXML; 343 if ("generate-json".equals(codeString)) 344 return GuideParameterCode.GENERATEJSON; 345 if ("generate-turtle".equals(codeString)) 346 return GuideParameterCode.GENERATETURTLE; 347 if ("html-template".equals(codeString)) 348 return GuideParameterCode.HTMLTEMPLATE; 349 throw new IllegalArgumentException("Unknown GuideParameterCode code '"+codeString+"'"); 350 } 351 public Enumeration<GuideParameterCode> fromType(Base code) throws FHIRException { 352 if (code == null) 353 return null; 354 if (code.isEmpty()) 355 return new Enumeration<GuideParameterCode>(this); 356 String codeString = ((PrimitiveType) code).asStringValue(); 357 if (codeString == null || "".equals(codeString)) 358 return null; 359 if ("apply-business-version".equals(codeString)) 360 return new Enumeration<GuideParameterCode>(this, GuideParameterCode.APPLYBUSINESSVERSION); 361 if ("apply-jurisdiction".equals(codeString)) 362 return new Enumeration<GuideParameterCode>(this, GuideParameterCode.APPLYJURISDICTION); 363 if ("path-resource".equals(codeString)) 364 return new Enumeration<GuideParameterCode>(this, GuideParameterCode.PATHRESOURCE); 365 if ("path-pages".equals(codeString)) 366 return new Enumeration<GuideParameterCode>(this, GuideParameterCode.PATHPAGES); 367 if ("path-tx-cache".equals(codeString)) 368 return new Enumeration<GuideParameterCode>(this, GuideParameterCode.PATHTXCACHE); 369 if ("expansion-profile".equals(codeString)) 370 return new Enumeration<GuideParameterCode>(this, GuideParameterCode.EXPANSIONPROFILE); 371 if ("rule-broken-links".equals(codeString)) 372 return new Enumeration<GuideParameterCode>(this, GuideParameterCode.RULEBROKENLINKS); 373 if ("generate-xml".equals(codeString)) 374 return new Enumeration<GuideParameterCode>(this, GuideParameterCode.GENERATEXML); 375 if ("generate-json".equals(codeString)) 376 return new Enumeration<GuideParameterCode>(this, GuideParameterCode.GENERATEJSON); 377 if ("generate-turtle".equals(codeString)) 378 return new Enumeration<GuideParameterCode>(this, GuideParameterCode.GENERATETURTLE); 379 if ("html-template".equals(codeString)) 380 return new Enumeration<GuideParameterCode>(this, GuideParameterCode.HTMLTEMPLATE); 381 throw new FHIRException("Unknown GuideParameterCode code '"+codeString+"'"); 382 } 383 public String toCode(GuideParameterCode code) { 384 if (code == GuideParameterCode.APPLYBUSINESSVERSION) 385 return "apply-business-version"; 386 if (code == GuideParameterCode.APPLYJURISDICTION) 387 return "apply-jurisdiction"; 388 if (code == GuideParameterCode.PATHRESOURCE) 389 return "path-resource"; 390 if (code == GuideParameterCode.PATHPAGES) 391 return "path-pages"; 392 if (code == GuideParameterCode.PATHTXCACHE) 393 return "path-tx-cache"; 394 if (code == GuideParameterCode.EXPANSIONPROFILE) 395 return "expansion-profile"; 396 if (code == GuideParameterCode.RULEBROKENLINKS) 397 return "rule-broken-links"; 398 if (code == GuideParameterCode.GENERATEXML) 399 return "generate-xml"; 400 if (code == GuideParameterCode.GENERATEJSON) 401 return "generate-json"; 402 if (code == GuideParameterCode.GENERATETURTLE) 403 return "generate-turtle"; 404 if (code == GuideParameterCode.HTMLTEMPLATE) 405 return "html-template"; 406 return "?"; 407 } 408 public String toSystem(GuideParameterCode code) { 409 return code.getSystem(); 410 } 411 } 412 413 @Block() 414 public static class ImplementationGuideDependsOnComponent extends BackboneElement implements IBaseBackboneElement { 415 /** 416 * The canonical URL of the Implementation guide for the dependency. 417 */ 418 @Child(name = "uri", type = {CanonicalType.class}, order=1, min=1, max=1, modifier=false, summary=true) 419 @Description(shortDefinition="Identity of the IG that this depends on", formalDefinition="The canonical URL of the Implementation guide for the dependency." ) 420 protected CanonicalType uri; 421 422 /** 423 * The version of the IG that is depended on, when the correct version is required to understand the IG correctly. 424 */ 425 @Child(name = "version", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=true) 426 @Description(shortDefinition="Version of the IG", formalDefinition="The version of the IG that is depended on, when the correct version is required to understand the IG correctly." ) 427 protected StringType version; 428 429 private static final long serialVersionUID = -1431104269L; 430 431 /** 432 * Constructor 433 */ 434 public ImplementationGuideDependsOnComponent() { 435 super(); 436 } 437 438 /** 439 * Constructor 440 */ 441 public ImplementationGuideDependsOnComponent(CanonicalType uri) { 442 super(); 443 this.uri = uri; 444 } 445 446 /** 447 * @return {@link #uri} (The canonical URL of the Implementation guide for the dependency.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value 448 */ 449 public CanonicalType getUriElement() { 450 if (this.uri == null) 451 if (Configuration.errorOnAutoCreate()) 452 throw new Error("Attempt to auto-create ImplementationGuideDependsOnComponent.uri"); 453 else if (Configuration.doAutoCreate()) 454 this.uri = new CanonicalType(); // bb 455 return this.uri; 456 } 457 458 public boolean hasUriElement() { 459 return this.uri != null && !this.uri.isEmpty(); 460 } 461 462 public boolean hasUri() { 463 return this.uri != null && !this.uri.isEmpty(); 464 } 465 466 /** 467 * @param value {@link #uri} (The canonical URL of the Implementation guide for the dependency.). This is the underlying object with id, value and extensions. The accessor "getUri" gives direct access to the value 468 */ 469 public ImplementationGuideDependsOnComponent setUriElement(CanonicalType value) { 470 this.uri = value; 471 return this; 472 } 473 474 /** 475 * @return The canonical URL of the Implementation guide for the dependency. 476 */ 477 public String getUri() { 478 return this.uri == null ? null : this.uri.getValue(); 479 } 480 481 /** 482 * @param value The canonical URL of the Implementation guide for the dependency. 483 */ 484 public ImplementationGuideDependsOnComponent setUri(String value) { 485 if (this.uri == null) 486 this.uri = new CanonicalType(); 487 this.uri.setValue(value); 488 return this; 489 } 490 491 /** 492 * @return {@link #version} (The version of the IG that is depended on, when the correct version is required to understand the IG correctly.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 493 */ 494 public StringType getVersionElement() { 495 if (this.version == null) 496 if (Configuration.errorOnAutoCreate()) 497 throw new Error("Attempt to auto-create ImplementationGuideDependsOnComponent.version"); 498 else if (Configuration.doAutoCreate()) 499 this.version = new StringType(); // bb 500 return this.version; 501 } 502 503 public boolean hasVersionElement() { 504 return this.version != null && !this.version.isEmpty(); 505 } 506 507 public boolean hasVersion() { 508 return this.version != null && !this.version.isEmpty(); 509 } 510 511 /** 512 * @param value {@link #version} (The version of the IG that is depended on, when the correct version is required to understand the IG correctly.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 513 */ 514 public ImplementationGuideDependsOnComponent setVersionElement(StringType value) { 515 this.version = value; 516 return this; 517 } 518 519 /** 520 * @return The version of the IG that is depended on, when the correct version is required to understand the IG correctly. 521 */ 522 public String getVersion() { 523 return this.version == null ? null : this.version.getValue(); 524 } 525 526 /** 527 * @param value The version of the IG that is depended on, when the correct version is required to understand the IG correctly. 528 */ 529 public ImplementationGuideDependsOnComponent setVersion(String value) { 530 if (Utilities.noString(value)) 531 this.version = null; 532 else { 533 if (this.version == null) 534 this.version = new StringType(); 535 this.version.setValue(value); 536 } 537 return this; 538 } 539 540 protected void listChildren(List<Property> children) { 541 super.listChildren(children); 542 children.add(new Property("uri", "canonical", "The canonical URL of the Implementation guide for the dependency.", 0, 1, uri)); 543 children.add(new Property("version", "string", "The version of the IG that is depended on, when the correct version is required to understand the IG correctly.", 0, 1, version)); 544 } 545 546 @Override 547 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 548 switch (_hash) { 549 case 116076: /*uri*/ return new Property("uri", "canonical", "The canonical URL of the Implementation guide for the dependency.", 0, 1, uri); 550 case 351608024: /*version*/ return new Property("version", "string", "The version of the IG that is depended on, when the correct version is required to understand the IG correctly.", 0, 1, version); 551 default: return super.getNamedProperty(_hash, _name, _checkValid); 552 } 553 554 } 555 556 @Override 557 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 558 switch (hash) { 559 case 116076: /*uri*/ return this.uri == null ? new Base[0] : new Base[] {this.uri}; // CanonicalType 560 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 561 default: return super.getProperty(hash, name, checkValid); 562 } 563 564 } 565 566 @Override 567 public Base setProperty(int hash, String name, Base value) throws FHIRException { 568 switch (hash) { 569 case 116076: // uri 570 this.uri = castToCanonical(value); // CanonicalType 571 return value; 572 case 351608024: // version 573 this.version = castToString(value); // StringType 574 return value; 575 default: return super.setProperty(hash, name, value); 576 } 577 578 } 579 580 @Override 581 public Base setProperty(String name, Base value) throws FHIRException { 582 if (name.equals("uri")) { 583 this.uri = castToCanonical(value); // CanonicalType 584 } else if (name.equals("version")) { 585 this.version = castToString(value); // StringType 586 } else 587 return super.setProperty(name, value); 588 return value; 589 } 590 591 @Override 592 public Base makeProperty(int hash, String name) throws FHIRException { 593 switch (hash) { 594 case 116076: return getUriElement(); 595 case 351608024: return getVersionElement(); 596 default: return super.makeProperty(hash, name); 597 } 598 599 } 600 601 @Override 602 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 603 switch (hash) { 604 case 116076: /*uri*/ return new String[] {"canonical"}; 605 case 351608024: /*version*/ return new String[] {"string"}; 606 default: return super.getTypesForProperty(hash, name); 607 } 608 609 } 610 611 @Override 612 public Base addChild(String name) throws FHIRException { 613 if (name.equals("uri")) { 614 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.uri"); 615 } 616 else if (name.equals("version")) { 617 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.version"); 618 } 619 else 620 return super.addChild(name); 621 } 622 623 public ImplementationGuideDependsOnComponent copy() { 624 ImplementationGuideDependsOnComponent dst = new ImplementationGuideDependsOnComponent(); 625 copyValues(dst); 626 dst.uri = uri == null ? null : uri.copy(); 627 dst.version = version == null ? null : version.copy(); 628 return dst; 629 } 630 631 @Override 632 public boolean equalsDeep(Base other_) { 633 if (!super.equalsDeep(other_)) 634 return false; 635 if (!(other_ instanceof ImplementationGuideDependsOnComponent)) 636 return false; 637 ImplementationGuideDependsOnComponent o = (ImplementationGuideDependsOnComponent) other_; 638 return compareDeep(uri, o.uri, true) && compareDeep(version, o.version, true); 639 } 640 641 @Override 642 public boolean equalsShallow(Base other_) { 643 if (!super.equalsShallow(other_)) 644 return false; 645 if (!(other_ instanceof ImplementationGuideDependsOnComponent)) 646 return false; 647 ImplementationGuideDependsOnComponent o = (ImplementationGuideDependsOnComponent) other_; 648 return compareValues(uri, o.uri, true) && compareValues(version, o.version, true); 649 } 650 651 public boolean isEmpty() { 652 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(uri, version); 653 } 654 655 public String fhirType() { 656 return "ImplementationGuide.dependsOn"; 657 658 } 659 660 } 661 662 @Block() 663 public static class ImplementationGuideGlobalComponent extends BackboneElement implements IBaseBackboneElement { 664 /** 665 * The type of resource that all instances must conform to. 666 */ 667 @Child(name = "type", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=true) 668 @Description(shortDefinition="Type this profile applies to", formalDefinition="The type of resource that all instances must conform to." ) 669 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/resource-types") 670 protected CodeType type; 671 672 /** 673 * A reference to the profile that all instances must conform to. 674 */ 675 @Child(name = "profile", type = {CanonicalType.class}, order=2, min=1, max=1, modifier=false, summary=true) 676 @Description(shortDefinition="Profile that all resources must conform to", formalDefinition="A reference to the profile that all instances must conform to." ) 677 protected CanonicalType profile; 678 679 private static final long serialVersionUID = 33894666L; 680 681 /** 682 * Constructor 683 */ 684 public ImplementationGuideGlobalComponent() { 685 super(); 686 } 687 688 /** 689 * Constructor 690 */ 691 public ImplementationGuideGlobalComponent(CodeType type, CanonicalType profile) { 692 super(); 693 this.type = type; 694 this.profile = profile; 695 } 696 697 /** 698 * @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 699 */ 700 public CodeType getTypeElement() { 701 if (this.type == null) 702 if (Configuration.errorOnAutoCreate()) 703 throw new Error("Attempt to auto-create ImplementationGuideGlobalComponent.type"); 704 else if (Configuration.doAutoCreate()) 705 this.type = new CodeType(); // bb 706 return this.type; 707 } 708 709 public boolean hasTypeElement() { 710 return this.type != null && !this.type.isEmpty(); 711 } 712 713 public boolean hasType() { 714 return this.type != null && !this.type.isEmpty(); 715 } 716 717 /** 718 * @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 719 */ 720 public ImplementationGuideGlobalComponent setTypeElement(CodeType value) { 721 this.type = value; 722 return this; 723 } 724 725 /** 726 * @return The type of resource that all instances must conform to. 727 */ 728 public String getType() { 729 return this.type == null ? null : this.type.getValue(); 730 } 731 732 /** 733 * @param value The type of resource that all instances must conform to. 734 */ 735 public ImplementationGuideGlobalComponent setType(String value) { 736 if (this.type == null) 737 this.type = new CodeType(); 738 this.type.setValue(value); 739 return this; 740 } 741 742 /** 743 * @return {@link #profile} (A reference to the profile that all instances must conform to.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value 744 */ 745 public CanonicalType getProfileElement() { 746 if (this.profile == null) 747 if (Configuration.errorOnAutoCreate()) 748 throw new Error("Attempt to auto-create ImplementationGuideGlobalComponent.profile"); 749 else if (Configuration.doAutoCreate()) 750 this.profile = new CanonicalType(); // bb 751 return this.profile; 752 } 753 754 public boolean hasProfileElement() { 755 return this.profile != null && !this.profile.isEmpty(); 756 } 757 758 public boolean hasProfile() { 759 return this.profile != null && !this.profile.isEmpty(); 760 } 761 762 /** 763 * @param value {@link #profile} (A reference to the profile that all instances must conform to.). This is the underlying object with id, value and extensions. The accessor "getProfile" gives direct access to the value 764 */ 765 public ImplementationGuideGlobalComponent setProfileElement(CanonicalType value) { 766 this.profile = value; 767 return this; 768 } 769 770 /** 771 * @return A reference to the profile that all instances must conform to. 772 */ 773 public String getProfile() { 774 return this.profile == null ? null : this.profile.getValue(); 775 } 776 777 /** 778 * @param value A reference to the profile that all instances must conform to. 779 */ 780 public ImplementationGuideGlobalComponent setProfile(String value) { 781 if (this.profile == null) 782 this.profile = new CanonicalType(); 783 this.profile.setValue(value); 784 return this; 785 } 786 787 protected void listChildren(List<Property> children) { 788 super.listChildren(children); 789 children.add(new Property("type", "code", "The type of resource that all instances must conform to.", 0, 1, type)); 790 children.add(new Property("profile", "canonical(StructureDefinition)", "A reference to the profile that all instances must conform to.", 0, 1, profile)); 791 } 792 793 @Override 794 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 795 switch (_hash) { 796 case 3575610: /*type*/ return new Property("type", "code", "The type of resource that all instances must conform to.", 0, 1, type); 797 case -309425751: /*profile*/ return new Property("profile", "canonical(StructureDefinition)", "A reference to the profile that all instances must conform to.", 0, 1, profile); 798 default: return super.getNamedProperty(_hash, _name, _checkValid); 799 } 800 801 } 802 803 @Override 804 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 805 switch (hash) { 806 case 3575610: /*type*/ return this.type == null ? new Base[0] : new Base[] {this.type}; // CodeType 807 case -309425751: /*profile*/ return this.profile == null ? new Base[0] : new Base[] {this.profile}; // CanonicalType 808 default: return super.getProperty(hash, name, checkValid); 809 } 810 811 } 812 813 @Override 814 public Base setProperty(int hash, String name, Base value) throws FHIRException { 815 switch (hash) { 816 case 3575610: // type 817 this.type = castToCode(value); // CodeType 818 return value; 819 case -309425751: // profile 820 this.profile = castToCanonical(value); // CanonicalType 821 return value; 822 default: return super.setProperty(hash, name, value); 823 } 824 825 } 826 827 @Override 828 public Base setProperty(String name, Base value) throws FHIRException { 829 if (name.equals("type")) { 830 this.type = castToCode(value); // CodeType 831 } else if (name.equals("profile")) { 832 this.profile = castToCanonical(value); // CanonicalType 833 } else 834 return super.setProperty(name, value); 835 return value; 836 } 837 838 @Override 839 public Base makeProperty(int hash, String name) throws FHIRException { 840 switch (hash) { 841 case 3575610: return getTypeElement(); 842 case -309425751: return getProfileElement(); 843 default: return super.makeProperty(hash, name); 844 } 845 846 } 847 848 @Override 849 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 850 switch (hash) { 851 case 3575610: /*type*/ return new String[] {"code"}; 852 case -309425751: /*profile*/ return new String[] {"canonical"}; 853 default: return super.getTypesForProperty(hash, name); 854 } 855 856 } 857 858 @Override 859 public Base addChild(String name) throws FHIRException { 860 if (name.equals("type")) { 861 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.type"); 862 } 863 else if (name.equals("profile")) { 864 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.profile"); 865 } 866 else 867 return super.addChild(name); 868 } 869 870 public ImplementationGuideGlobalComponent copy() { 871 ImplementationGuideGlobalComponent dst = new ImplementationGuideGlobalComponent(); 872 copyValues(dst); 873 dst.type = type == null ? null : type.copy(); 874 dst.profile = profile == null ? null : profile.copy(); 875 return dst; 876 } 877 878 @Override 879 public boolean equalsDeep(Base other_) { 880 if (!super.equalsDeep(other_)) 881 return false; 882 if (!(other_ instanceof ImplementationGuideGlobalComponent)) 883 return false; 884 ImplementationGuideGlobalComponent o = (ImplementationGuideGlobalComponent) other_; 885 return compareDeep(type, o.type, true) && compareDeep(profile, o.profile, true); 886 } 887 888 @Override 889 public boolean equalsShallow(Base other_) { 890 if (!super.equalsShallow(other_)) 891 return false; 892 if (!(other_ instanceof ImplementationGuideGlobalComponent)) 893 return false; 894 ImplementationGuideGlobalComponent o = (ImplementationGuideGlobalComponent) other_; 895 return compareValues(type, o.type, true); 896 } 897 898 public boolean isEmpty() { 899 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(type, profile); 900 } 901 902 public String fhirType() { 903 return "ImplementationGuide.global"; 904 905 } 906 907 } 908 909 @Block() 910 public static class ImplementationGuideDefinitionComponent extends BackboneElement implements IBaseBackboneElement { 911 /** 912 * A logical group of resources. Logical groups can be used when building pages. 913 */ 914 @Child(name = "package", type = {}, order=1, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 915 @Description(shortDefinition="Group of resources as used in .page.package", formalDefinition="A logical group of resources. Logical groups can be used when building pages." ) 916 protected List<ImplementationGuideDefinitionPackageComponent> package_; 917 918 /** 919 * 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. 920 */ 921 @Child(name = "resource", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 922 @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." ) 923 protected List<ImplementationGuideDefinitionResourceComponent> resource; 924 925 /** 926 * A page / section in the implementation guide. The root page is the implementation guide home page. 927 */ 928 @Child(name = "page", type = {}, order=3, min=0, max=1, modifier=false, summary=false) 929 @Description(shortDefinition="Page/Section in the Guide", formalDefinition="A page / section in the implementation guide. The root page is the implementation guide home page." ) 930 protected ImplementationGuideDefinitionPageComponent page; 931 932 /** 933 * Defines how IG is built by tools. 934 */ 935 @Child(name = "parameter", type = {}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 936 @Description(shortDefinition="Defines how IG is built by tools", formalDefinition="Defines how IG is built by tools." ) 937 protected List<ImplementationGuideDefinitionParameterComponent> parameter; 938 939 /** 940 * A template for building resources. 941 */ 942 @Child(name = "template", type = {}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 943 @Description(shortDefinition="A template for building resources", formalDefinition="A template for building resources." ) 944 protected List<ImplementationGuideDefinitionTemplateComponent> template; 945 946 private static final long serialVersionUID = 1395079915L; 947 948 /** 949 * Constructor 950 */ 951 public ImplementationGuideDefinitionComponent() { 952 super(); 953 } 954 955 /** 956 * @return {@link #package_} (A logical group of resources. Logical groups can be used when building pages.) 957 */ 958 public List<ImplementationGuideDefinitionPackageComponent> getPackage() { 959 if (this.package_ == null) 960 this.package_ = new ArrayList<ImplementationGuideDefinitionPackageComponent>(); 961 return this.package_; 962 } 963 964 /** 965 * @return Returns a reference to <code>this</code> for easy method chaining 966 */ 967 public ImplementationGuideDefinitionComponent setPackage(List<ImplementationGuideDefinitionPackageComponent> thePackage) { 968 this.package_ = thePackage; 969 return this; 970 } 971 972 public boolean hasPackage() { 973 if (this.package_ == null) 974 return false; 975 for (ImplementationGuideDefinitionPackageComponent item : this.package_) 976 if (!item.isEmpty()) 977 return true; 978 return false; 979 } 980 981 public ImplementationGuideDefinitionPackageComponent addPackage() { //3 982 ImplementationGuideDefinitionPackageComponent t = new ImplementationGuideDefinitionPackageComponent(); 983 if (this.package_ == null) 984 this.package_ = new ArrayList<ImplementationGuideDefinitionPackageComponent>(); 985 this.package_.add(t); 986 return t; 987 } 988 989 public ImplementationGuideDefinitionComponent addPackage(ImplementationGuideDefinitionPackageComponent t) { //3 990 if (t == null) 991 return this; 992 if (this.package_ == null) 993 this.package_ = new ArrayList<ImplementationGuideDefinitionPackageComponent>(); 994 this.package_.add(t); 995 return this; 996 } 997 998 /** 999 * @return The first repetition of repeating field {@link #package_}, creating it if it does not already exist 1000 */ 1001 public ImplementationGuideDefinitionPackageComponent getPackageFirstRep() { 1002 if (getPackage().isEmpty()) { 1003 addPackage(); 1004 } 1005 return getPackage().get(0); 1006 } 1007 1008 /** 1009 * @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.) 1010 */ 1011 public List<ImplementationGuideDefinitionResourceComponent> getResource() { 1012 if (this.resource == null) 1013 this.resource = new ArrayList<ImplementationGuideDefinitionResourceComponent>(); 1014 return this.resource; 1015 } 1016 1017 /** 1018 * @return Returns a reference to <code>this</code> for easy method chaining 1019 */ 1020 public ImplementationGuideDefinitionComponent setResource(List<ImplementationGuideDefinitionResourceComponent> theResource) { 1021 this.resource = theResource; 1022 return this; 1023 } 1024 1025 public boolean hasResource() { 1026 if (this.resource == null) 1027 return false; 1028 for (ImplementationGuideDefinitionResourceComponent item : this.resource) 1029 if (!item.isEmpty()) 1030 return true; 1031 return false; 1032 } 1033 1034 public ImplementationGuideDefinitionResourceComponent addResource() { //3 1035 ImplementationGuideDefinitionResourceComponent t = new ImplementationGuideDefinitionResourceComponent(); 1036 if (this.resource == null) 1037 this.resource = new ArrayList<ImplementationGuideDefinitionResourceComponent>(); 1038 this.resource.add(t); 1039 return t; 1040 } 1041 1042 public ImplementationGuideDefinitionComponent addResource(ImplementationGuideDefinitionResourceComponent t) { //3 1043 if (t == null) 1044 return this; 1045 if (this.resource == null) 1046 this.resource = new ArrayList<ImplementationGuideDefinitionResourceComponent>(); 1047 this.resource.add(t); 1048 return this; 1049 } 1050 1051 /** 1052 * @return The first repetition of repeating field {@link #resource}, creating it if it does not already exist 1053 */ 1054 public ImplementationGuideDefinitionResourceComponent getResourceFirstRep() { 1055 if (getResource().isEmpty()) { 1056 addResource(); 1057 } 1058 return getResource().get(0); 1059 } 1060 1061 /** 1062 * @return {@link #page} (A page / section in the implementation guide. The root page is the implementation guide home page.) 1063 */ 1064 public ImplementationGuideDefinitionPageComponent getPage() { 1065 if (this.page == null) 1066 if (Configuration.errorOnAutoCreate()) 1067 throw new Error("Attempt to auto-create ImplementationGuideDefinitionComponent.page"); 1068 else if (Configuration.doAutoCreate()) 1069 this.page = new ImplementationGuideDefinitionPageComponent(); // cc 1070 return this.page; 1071 } 1072 1073 public boolean hasPage() { 1074 return this.page != null && !this.page.isEmpty(); 1075 } 1076 1077 /** 1078 * @param value {@link #page} (A page / section in the implementation guide. The root page is the implementation guide home page.) 1079 */ 1080 public ImplementationGuideDefinitionComponent setPage(ImplementationGuideDefinitionPageComponent value) { 1081 this.page = value; 1082 return this; 1083 } 1084 1085 /** 1086 * @return {@link #parameter} (Defines how IG is built by tools.) 1087 */ 1088 public List<ImplementationGuideDefinitionParameterComponent> getParameter() { 1089 if (this.parameter == null) 1090 this.parameter = new ArrayList<ImplementationGuideDefinitionParameterComponent>(); 1091 return this.parameter; 1092 } 1093 1094 /** 1095 * @return Returns a reference to <code>this</code> for easy method chaining 1096 */ 1097 public ImplementationGuideDefinitionComponent setParameter(List<ImplementationGuideDefinitionParameterComponent> theParameter) { 1098 this.parameter = theParameter; 1099 return this; 1100 } 1101 1102 public boolean hasParameter() { 1103 if (this.parameter == null) 1104 return false; 1105 for (ImplementationGuideDefinitionParameterComponent item : this.parameter) 1106 if (!item.isEmpty()) 1107 return true; 1108 return false; 1109 } 1110 1111 public ImplementationGuideDefinitionParameterComponent addParameter() { //3 1112 ImplementationGuideDefinitionParameterComponent t = new ImplementationGuideDefinitionParameterComponent(); 1113 if (this.parameter == null) 1114 this.parameter = new ArrayList<ImplementationGuideDefinitionParameterComponent>(); 1115 this.parameter.add(t); 1116 return t; 1117 } 1118 1119 public ImplementationGuideDefinitionComponent addParameter(ImplementationGuideDefinitionParameterComponent t) { //3 1120 if (t == null) 1121 return this; 1122 if (this.parameter == null) 1123 this.parameter = new ArrayList<ImplementationGuideDefinitionParameterComponent>(); 1124 this.parameter.add(t); 1125 return this; 1126 } 1127 1128 /** 1129 * @return The first repetition of repeating field {@link #parameter}, creating it if it does not already exist 1130 */ 1131 public ImplementationGuideDefinitionParameterComponent getParameterFirstRep() { 1132 if (getParameter().isEmpty()) { 1133 addParameter(); 1134 } 1135 return getParameter().get(0); 1136 } 1137 1138 /** 1139 * @return {@link #template} (A template for building resources.) 1140 */ 1141 public List<ImplementationGuideDefinitionTemplateComponent> getTemplate() { 1142 if (this.template == null) 1143 this.template = new ArrayList<ImplementationGuideDefinitionTemplateComponent>(); 1144 return this.template; 1145 } 1146 1147 /** 1148 * @return Returns a reference to <code>this</code> for easy method chaining 1149 */ 1150 public ImplementationGuideDefinitionComponent setTemplate(List<ImplementationGuideDefinitionTemplateComponent> theTemplate) { 1151 this.template = theTemplate; 1152 return this; 1153 } 1154 1155 public boolean hasTemplate() { 1156 if (this.template == null) 1157 return false; 1158 for (ImplementationGuideDefinitionTemplateComponent item : this.template) 1159 if (!item.isEmpty()) 1160 return true; 1161 return false; 1162 } 1163 1164 public ImplementationGuideDefinitionTemplateComponent addTemplate() { //3 1165 ImplementationGuideDefinitionTemplateComponent t = new ImplementationGuideDefinitionTemplateComponent(); 1166 if (this.template == null) 1167 this.template = new ArrayList<ImplementationGuideDefinitionTemplateComponent>(); 1168 this.template.add(t); 1169 return t; 1170 } 1171 1172 public ImplementationGuideDefinitionComponent addTemplate(ImplementationGuideDefinitionTemplateComponent t) { //3 1173 if (t == null) 1174 return this; 1175 if (this.template == null) 1176 this.template = new ArrayList<ImplementationGuideDefinitionTemplateComponent>(); 1177 this.template.add(t); 1178 return this; 1179 } 1180 1181 /** 1182 * @return The first repetition of repeating field {@link #template}, creating it if it does not already exist 1183 */ 1184 public ImplementationGuideDefinitionTemplateComponent getTemplateFirstRep() { 1185 if (getTemplate().isEmpty()) { 1186 addTemplate(); 1187 } 1188 return getTemplate().get(0); 1189 } 1190 1191 protected void listChildren(List<Property> children) { 1192 super.listChildren(children); 1193 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_)); 1194 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)); 1195 children.add(new Property("page", "", "A page / section in the implementation guide. The root page is the implementation guide home page.", 0, 1, page)); 1196 children.add(new Property("parameter", "", "Defines how IG is built by tools.", 0, java.lang.Integer.MAX_VALUE, parameter)); 1197 children.add(new Property("template", "", "A template for building resources.", 0, java.lang.Integer.MAX_VALUE, template)); 1198 } 1199 1200 @Override 1201 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1202 switch (_hash) { 1203 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_); 1204 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); 1205 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); 1206 case 1954460585: /*parameter*/ return new Property("parameter", "", "Defines how IG is built by tools.", 0, java.lang.Integer.MAX_VALUE, parameter); 1207 case -1321546630: /*template*/ return new Property("template", "", "A template for building resources.", 0, java.lang.Integer.MAX_VALUE, template); 1208 default: return super.getNamedProperty(_hash, _name, _checkValid); 1209 } 1210 1211 } 1212 1213 @Override 1214 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1215 switch (hash) { 1216 case -807062458: /*package*/ return this.package_ == null ? new Base[0] : this.package_.toArray(new Base[this.package_.size()]); // ImplementationGuideDefinitionPackageComponent 1217 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : this.resource.toArray(new Base[this.resource.size()]); // ImplementationGuideDefinitionResourceComponent 1218 case 3433103: /*page*/ return this.page == null ? new Base[0] : new Base[] {this.page}; // ImplementationGuideDefinitionPageComponent 1219 case 1954460585: /*parameter*/ return this.parameter == null ? new Base[0] : this.parameter.toArray(new Base[this.parameter.size()]); // ImplementationGuideDefinitionParameterComponent 1220 case -1321546630: /*template*/ return this.template == null ? new Base[0] : this.template.toArray(new Base[this.template.size()]); // ImplementationGuideDefinitionTemplateComponent 1221 default: return super.getProperty(hash, name, checkValid); 1222 } 1223 1224 } 1225 1226 @Override 1227 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1228 switch (hash) { 1229 case -807062458: // package 1230 this.getPackage().add((ImplementationGuideDefinitionPackageComponent) value); // ImplementationGuideDefinitionPackageComponent 1231 return value; 1232 case -341064690: // resource 1233 this.getResource().add((ImplementationGuideDefinitionResourceComponent) value); // ImplementationGuideDefinitionResourceComponent 1234 return value; 1235 case 3433103: // page 1236 this.page = (ImplementationGuideDefinitionPageComponent) value; // ImplementationGuideDefinitionPageComponent 1237 return value; 1238 case 1954460585: // parameter 1239 this.getParameter().add((ImplementationGuideDefinitionParameterComponent) value); // ImplementationGuideDefinitionParameterComponent 1240 return value; 1241 case -1321546630: // template 1242 this.getTemplate().add((ImplementationGuideDefinitionTemplateComponent) value); // ImplementationGuideDefinitionTemplateComponent 1243 return value; 1244 default: return super.setProperty(hash, name, value); 1245 } 1246 1247 } 1248 1249 @Override 1250 public Base setProperty(String name, Base value) throws FHIRException { 1251 if (name.equals("package")) { 1252 this.getPackage().add((ImplementationGuideDefinitionPackageComponent) value); 1253 } else if (name.equals("resource")) { 1254 this.getResource().add((ImplementationGuideDefinitionResourceComponent) value); 1255 } else if (name.equals("page")) { 1256 this.page = (ImplementationGuideDefinitionPageComponent) value; // ImplementationGuideDefinitionPageComponent 1257 } else if (name.equals("parameter")) { 1258 this.getParameter().add((ImplementationGuideDefinitionParameterComponent) value); 1259 } else if (name.equals("template")) { 1260 this.getTemplate().add((ImplementationGuideDefinitionTemplateComponent) value); 1261 } else 1262 return super.setProperty(name, value); 1263 return value; 1264 } 1265 1266 @Override 1267 public Base makeProperty(int hash, String name) throws FHIRException { 1268 switch (hash) { 1269 case -807062458: return addPackage(); 1270 case -341064690: return addResource(); 1271 case 3433103: return getPage(); 1272 case 1954460585: return addParameter(); 1273 case -1321546630: return addTemplate(); 1274 default: return super.makeProperty(hash, name); 1275 } 1276 1277 } 1278 1279 @Override 1280 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1281 switch (hash) { 1282 case -807062458: /*package*/ return new String[] {}; 1283 case -341064690: /*resource*/ return new String[] {}; 1284 case 3433103: /*page*/ return new String[] {}; 1285 case 1954460585: /*parameter*/ return new String[] {}; 1286 case -1321546630: /*template*/ return new String[] {}; 1287 default: return super.getTypesForProperty(hash, name); 1288 } 1289 1290 } 1291 1292 @Override 1293 public Base addChild(String name) throws FHIRException { 1294 if (name.equals("package")) { 1295 return addPackage(); 1296 } 1297 else if (name.equals("resource")) { 1298 return addResource(); 1299 } 1300 else if (name.equals("page")) { 1301 this.page = new ImplementationGuideDefinitionPageComponent(); 1302 return this.page; 1303 } 1304 else if (name.equals("parameter")) { 1305 return addParameter(); 1306 } 1307 else if (name.equals("template")) { 1308 return addTemplate(); 1309 } 1310 else 1311 return super.addChild(name); 1312 } 1313 1314 public ImplementationGuideDefinitionComponent copy() { 1315 ImplementationGuideDefinitionComponent dst = new ImplementationGuideDefinitionComponent(); 1316 copyValues(dst); 1317 if (package_ != null) { 1318 dst.package_ = new ArrayList<ImplementationGuideDefinitionPackageComponent>(); 1319 for (ImplementationGuideDefinitionPackageComponent i : package_) 1320 dst.package_.add(i.copy()); 1321 }; 1322 if (resource != null) { 1323 dst.resource = new ArrayList<ImplementationGuideDefinitionResourceComponent>(); 1324 for (ImplementationGuideDefinitionResourceComponent i : resource) 1325 dst.resource.add(i.copy()); 1326 }; 1327 dst.page = page == null ? null : page.copy(); 1328 if (parameter != null) { 1329 dst.parameter = new ArrayList<ImplementationGuideDefinitionParameterComponent>(); 1330 for (ImplementationGuideDefinitionParameterComponent i : parameter) 1331 dst.parameter.add(i.copy()); 1332 }; 1333 if (template != null) { 1334 dst.template = new ArrayList<ImplementationGuideDefinitionTemplateComponent>(); 1335 for (ImplementationGuideDefinitionTemplateComponent i : template) 1336 dst.template.add(i.copy()); 1337 }; 1338 return dst; 1339 } 1340 1341 @Override 1342 public boolean equalsDeep(Base other_) { 1343 if (!super.equalsDeep(other_)) 1344 return false; 1345 if (!(other_ instanceof ImplementationGuideDefinitionComponent)) 1346 return false; 1347 ImplementationGuideDefinitionComponent o = (ImplementationGuideDefinitionComponent) other_; 1348 return compareDeep(package_, o.package_, true) && compareDeep(resource, o.resource, true) && compareDeep(page, o.page, true) 1349 && compareDeep(parameter, o.parameter, true) && compareDeep(template, o.template, true); 1350 } 1351 1352 @Override 1353 public boolean equalsShallow(Base other_) { 1354 if (!super.equalsShallow(other_)) 1355 return false; 1356 if (!(other_ instanceof ImplementationGuideDefinitionComponent)) 1357 return false; 1358 ImplementationGuideDefinitionComponent o = (ImplementationGuideDefinitionComponent) other_; 1359 return true; 1360 } 1361 1362 public boolean isEmpty() { 1363 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(package_, resource, page 1364 , parameter, template); 1365 } 1366 1367 public String fhirType() { 1368 return "ImplementationGuide.definition"; 1369 1370 } 1371 1372 } 1373 1374 @Block() 1375 public static class ImplementationGuideDefinitionPackageComponent extends BackboneElement implements IBaseBackboneElement { 1376 /** 1377 * The name for the group, as used in ImplementationGuide.definition.resource.package and ImplementationGuide.definition.page.package. 1378 */ 1379 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 1380 @Description(shortDefinition="Name used .resource.package and .page.package", formalDefinition="The name for the group, as used in ImplementationGuide.definition.resource.package and ImplementationGuide.definition.page.package." ) 1381 protected StringType name; 1382 1383 /** 1384 * Human readable text describing the package. 1385 */ 1386 @Child(name = "description", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1387 @Description(shortDefinition="Human readable text describing the package", formalDefinition="Human readable text describing the package." ) 1388 protected StringType description; 1389 1390 private static final long serialVersionUID = -1105523499L; 1391 1392 /** 1393 * Constructor 1394 */ 1395 public ImplementationGuideDefinitionPackageComponent() { 1396 super(); 1397 } 1398 1399 /** 1400 * Constructor 1401 */ 1402 public ImplementationGuideDefinitionPackageComponent(StringType name) { 1403 super(); 1404 this.name = name; 1405 } 1406 1407 /** 1408 * @return {@link #name} (The name for the group, as used in ImplementationGuide.definition.resource.package and ImplementationGuide.definition.page.package.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1409 */ 1410 public StringType getNameElement() { 1411 if (this.name == null) 1412 if (Configuration.errorOnAutoCreate()) 1413 throw new Error("Attempt to auto-create ImplementationGuideDefinitionPackageComponent.name"); 1414 else if (Configuration.doAutoCreate()) 1415 this.name = new StringType(); // bb 1416 return this.name; 1417 } 1418 1419 public boolean hasNameElement() { 1420 return this.name != null && !this.name.isEmpty(); 1421 } 1422 1423 public boolean hasName() { 1424 return this.name != null && !this.name.isEmpty(); 1425 } 1426 1427 /** 1428 * @param value {@link #name} (The name for the group, as used in ImplementationGuide.definition.resource.package and ImplementationGuide.definition.page.package.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 1429 */ 1430 public ImplementationGuideDefinitionPackageComponent setNameElement(StringType value) { 1431 this.name = value; 1432 return this; 1433 } 1434 1435 /** 1436 * @return The name for the group, as used in ImplementationGuide.definition.resource.package and ImplementationGuide.definition.page.package. 1437 */ 1438 public String getName() { 1439 return this.name == null ? null : this.name.getValue(); 1440 } 1441 1442 /** 1443 * @param value The name for the group, as used in ImplementationGuide.definition.resource.package and ImplementationGuide.definition.page.package. 1444 */ 1445 public ImplementationGuideDefinitionPackageComponent setName(String value) { 1446 if (this.name == null) 1447 this.name = new StringType(); 1448 this.name.setValue(value); 1449 return this; 1450 } 1451 1452 /** 1453 * @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 1454 */ 1455 public StringType getDescriptionElement() { 1456 if (this.description == null) 1457 if (Configuration.errorOnAutoCreate()) 1458 throw new Error("Attempt to auto-create ImplementationGuideDefinitionPackageComponent.description"); 1459 else if (Configuration.doAutoCreate()) 1460 this.description = new StringType(); // bb 1461 return this.description; 1462 } 1463 1464 public boolean hasDescriptionElement() { 1465 return this.description != null && !this.description.isEmpty(); 1466 } 1467 1468 public boolean hasDescription() { 1469 return this.description != null && !this.description.isEmpty(); 1470 } 1471 1472 /** 1473 * @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 1474 */ 1475 public ImplementationGuideDefinitionPackageComponent setDescriptionElement(StringType value) { 1476 this.description = value; 1477 return this; 1478 } 1479 1480 /** 1481 * @return Human readable text describing the package. 1482 */ 1483 public String getDescription() { 1484 return this.description == null ? null : this.description.getValue(); 1485 } 1486 1487 /** 1488 * @param value Human readable text describing the package. 1489 */ 1490 public ImplementationGuideDefinitionPackageComponent setDescription(String value) { 1491 if (Utilities.noString(value)) 1492 this.description = null; 1493 else { 1494 if (this.description == null) 1495 this.description = new StringType(); 1496 this.description.setValue(value); 1497 } 1498 return this; 1499 } 1500 1501 protected void listChildren(List<Property> children) { 1502 super.listChildren(children); 1503 children.add(new Property("name", "string", "The name for the group, as used in ImplementationGuide.definition.resource.package and ImplementationGuide.definition.page.package.", 0, 1, name)); 1504 children.add(new Property("description", "string", "Human readable text describing the package.", 0, 1, description)); 1505 } 1506 1507 @Override 1508 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1509 switch (_hash) { 1510 case 3373707: /*name*/ return new Property("name", "string", "The name for the group, as used in ImplementationGuide.definition.resource.package and ImplementationGuide.definition.page.package.", 0, 1, name); 1511 case -1724546052: /*description*/ return new Property("description", "string", "Human readable text describing the package.", 0, 1, description); 1512 default: return super.getNamedProperty(_hash, _name, _checkValid); 1513 } 1514 1515 } 1516 1517 @Override 1518 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1519 switch (hash) { 1520 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1521 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1522 default: return super.getProperty(hash, name, checkValid); 1523 } 1524 1525 } 1526 1527 @Override 1528 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1529 switch (hash) { 1530 case 3373707: // name 1531 this.name = castToString(value); // StringType 1532 return value; 1533 case -1724546052: // description 1534 this.description = castToString(value); // StringType 1535 return value; 1536 default: return super.setProperty(hash, name, value); 1537 } 1538 1539 } 1540 1541 @Override 1542 public Base setProperty(String name, Base value) throws FHIRException { 1543 if (name.equals("name")) { 1544 this.name = castToString(value); // StringType 1545 } else if (name.equals("description")) { 1546 this.description = castToString(value); // StringType 1547 } else 1548 return super.setProperty(name, value); 1549 return value; 1550 } 1551 1552 @Override 1553 public Base makeProperty(int hash, String name) throws FHIRException { 1554 switch (hash) { 1555 case 3373707: return getNameElement(); 1556 case -1724546052: return getDescriptionElement(); 1557 default: return super.makeProperty(hash, name); 1558 } 1559 1560 } 1561 1562 @Override 1563 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1564 switch (hash) { 1565 case 3373707: /*name*/ return new String[] {"string"}; 1566 case -1724546052: /*description*/ return new String[] {"string"}; 1567 default: return super.getTypesForProperty(hash, name); 1568 } 1569 1570 } 1571 1572 @Override 1573 public Base addChild(String name) throws FHIRException { 1574 if (name.equals("name")) { 1575 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); 1576 } 1577 else if (name.equals("description")) { 1578 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.description"); 1579 } 1580 else 1581 return super.addChild(name); 1582 } 1583 1584 public ImplementationGuideDefinitionPackageComponent copy() { 1585 ImplementationGuideDefinitionPackageComponent dst = new ImplementationGuideDefinitionPackageComponent(); 1586 copyValues(dst); 1587 dst.name = name == null ? null : name.copy(); 1588 dst.description = description == null ? null : description.copy(); 1589 return dst; 1590 } 1591 1592 @Override 1593 public boolean equalsDeep(Base other_) { 1594 if (!super.equalsDeep(other_)) 1595 return false; 1596 if (!(other_ instanceof ImplementationGuideDefinitionPackageComponent)) 1597 return false; 1598 ImplementationGuideDefinitionPackageComponent o = (ImplementationGuideDefinitionPackageComponent) other_; 1599 return compareDeep(name, o.name, true) && compareDeep(description, o.description, true); 1600 } 1601 1602 @Override 1603 public boolean equalsShallow(Base other_) { 1604 if (!super.equalsShallow(other_)) 1605 return false; 1606 if (!(other_ instanceof ImplementationGuideDefinitionPackageComponent)) 1607 return false; 1608 ImplementationGuideDefinitionPackageComponent o = (ImplementationGuideDefinitionPackageComponent) other_; 1609 return compareValues(name, o.name, true) && compareValues(description, o.description, true); 1610 } 1611 1612 public boolean isEmpty() { 1613 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, description); 1614 } 1615 1616 public String fhirType() { 1617 return "ImplementationGuide.definition.package"; 1618 1619 } 1620 1621 } 1622 1623 @Block() 1624 public static class ImplementationGuideDefinitionResourceComponent extends BackboneElement implements IBaseBackboneElement { 1625 /** 1626 * Where this resource is found. 1627 */ 1628 @Child(name = "reference", type = {Reference.class}, order=1, min=1, max=1, modifier=false, summary=false) 1629 @Description(shortDefinition="Location of the resource", formalDefinition="Where this resource is found." ) 1630 protected Reference reference; 1631 1632 /** 1633 * The actual object that is the target of the reference (Where this resource is found.) 1634 */ 1635 protected Resource referenceTarget; 1636 1637 /** 1638 * 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). 1639 */ 1640 @Child(name = "name", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 1641 @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)." ) 1642 protected StringType name; 1643 1644 /** 1645 * A description of the reason that a resource has been included in the implementation guide. 1646 */ 1647 @Child(name = "description", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 1648 @Description(shortDefinition="Reason why included in guide", formalDefinition="A description of the reason that a resource has been included in the implementation guide." ) 1649 protected StringType description; 1650 1651 /** 1652 * If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile. 1653 */ 1654 @Child(name = "example", type = {BooleanType.class, CanonicalType.class}, order=4, min=0, max=1, modifier=false, summary=false) 1655 @Description(shortDefinition="Is an example/What is this an example of?", formalDefinition="If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile." ) 1656 protected Type example; 1657 1658 /** 1659 * Reference to the id of the pack this resource appears in. 1660 */ 1661 @Child(name = "package", type = {IdType.class}, order=5, min=0, max=1, modifier=false, summary=false) 1662 @Description(shortDefinition="Pack this is part of", formalDefinition="Reference to the id of the pack this resource appears in." ) 1663 protected IdType package_; 1664 1665 private static final long serialVersionUID = 1199251259L; 1666 1667 /** 1668 * Constructor 1669 */ 1670 public ImplementationGuideDefinitionResourceComponent() { 1671 super(); 1672 } 1673 1674 /** 1675 * Constructor 1676 */ 1677 public ImplementationGuideDefinitionResourceComponent(Reference reference) { 1678 super(); 1679 this.reference = reference; 1680 } 1681 1682 /** 1683 * @return {@link #reference} (Where this resource is found.) 1684 */ 1685 public Reference getReference() { 1686 if (this.reference == null) 1687 if (Configuration.errorOnAutoCreate()) 1688 throw new Error("Attempt to auto-create ImplementationGuideDefinitionResourceComponent.reference"); 1689 else if (Configuration.doAutoCreate()) 1690 this.reference = new Reference(); // cc 1691 return this.reference; 1692 } 1693 1694 public boolean hasReference() { 1695 return this.reference != null && !this.reference.isEmpty(); 1696 } 1697 1698 /** 1699 * @param value {@link #reference} (Where this resource is found.) 1700 */ 1701 public ImplementationGuideDefinitionResourceComponent setReference(Reference value) { 1702 this.reference = value; 1703 return this; 1704 } 1705 1706 /** 1707 * @return {@link #reference} 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. (Where this resource is found.) 1708 */ 1709 public Resource getReferenceTarget() { 1710 return this.referenceTarget; 1711 } 1712 1713 /** 1714 * @param value {@link #reference} 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. (Where this resource is found.) 1715 */ 1716 public ImplementationGuideDefinitionResourceComponent setReferenceTarget(Resource value) { 1717 this.referenceTarget = value; 1718 return this; 1719 } 1720 1721 /** 1722 * @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 1723 */ 1724 public StringType getNameElement() { 1725 if (this.name == null) 1726 if (Configuration.errorOnAutoCreate()) 1727 throw new Error("Attempt to auto-create ImplementationGuideDefinitionResourceComponent.name"); 1728 else if (Configuration.doAutoCreate()) 1729 this.name = new StringType(); // bb 1730 return this.name; 1731 } 1732 1733 public boolean hasNameElement() { 1734 return this.name != null && !this.name.isEmpty(); 1735 } 1736 1737 public boolean hasName() { 1738 return this.name != null && !this.name.isEmpty(); 1739 } 1740 1741 /** 1742 * @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 1743 */ 1744 public ImplementationGuideDefinitionResourceComponent setNameElement(StringType value) { 1745 this.name = value; 1746 return this; 1747 } 1748 1749 /** 1750 * @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). 1751 */ 1752 public String getName() { 1753 return this.name == null ? null : this.name.getValue(); 1754 } 1755 1756 /** 1757 * @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). 1758 */ 1759 public ImplementationGuideDefinitionResourceComponent setName(String value) { 1760 if (Utilities.noString(value)) 1761 this.name = null; 1762 else { 1763 if (this.name == null) 1764 this.name = new StringType(); 1765 this.name.setValue(value); 1766 } 1767 return this; 1768 } 1769 1770 /** 1771 * @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 1772 */ 1773 public StringType getDescriptionElement() { 1774 if (this.description == null) 1775 if (Configuration.errorOnAutoCreate()) 1776 throw new Error("Attempt to auto-create ImplementationGuideDefinitionResourceComponent.description"); 1777 else if (Configuration.doAutoCreate()) 1778 this.description = new StringType(); // bb 1779 return this.description; 1780 } 1781 1782 public boolean hasDescriptionElement() { 1783 return this.description != null && !this.description.isEmpty(); 1784 } 1785 1786 public boolean hasDescription() { 1787 return this.description != null && !this.description.isEmpty(); 1788 } 1789 1790 /** 1791 * @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 1792 */ 1793 public ImplementationGuideDefinitionResourceComponent setDescriptionElement(StringType value) { 1794 this.description = value; 1795 return this; 1796 } 1797 1798 /** 1799 * @return A description of the reason that a resource has been included in the implementation guide. 1800 */ 1801 public String getDescription() { 1802 return this.description == null ? null : this.description.getValue(); 1803 } 1804 1805 /** 1806 * @param value A description of the reason that a resource has been included in the implementation guide. 1807 */ 1808 public ImplementationGuideDefinitionResourceComponent setDescription(String value) { 1809 if (Utilities.noString(value)) 1810 this.description = null; 1811 else { 1812 if (this.description == null) 1813 this.description = new StringType(); 1814 this.description.setValue(value); 1815 } 1816 return this; 1817 } 1818 1819 /** 1820 * @return {@link #example} (If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.) 1821 */ 1822 public Type getExample() { 1823 return this.example; 1824 } 1825 1826 /** 1827 * @return {@link #example} (If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.) 1828 */ 1829 public BooleanType getExampleBooleanType() throws FHIRException { 1830 if (this.example == null) 1831 return null; 1832 if (!(this.example instanceof BooleanType)) 1833 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.example.getClass().getName()+" was encountered"); 1834 return (BooleanType) this.example; 1835 } 1836 1837 public boolean hasExampleBooleanType() { 1838 return this != null && this.example instanceof BooleanType; 1839 } 1840 1841 /** 1842 * @return {@link #example} (If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.) 1843 */ 1844 public CanonicalType getExampleCanonicalType() throws FHIRException { 1845 if (this.example == null) 1846 return null; 1847 if (!(this.example instanceof CanonicalType)) 1848 throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.example.getClass().getName()+" was encountered"); 1849 return (CanonicalType) this.example; 1850 } 1851 1852 public boolean hasExampleCanonicalType() { 1853 return this != null && this.example instanceof CanonicalType; 1854 } 1855 1856 public boolean hasExample() { 1857 return this.example != null && !this.example.isEmpty(); 1858 } 1859 1860 /** 1861 * @param value {@link #example} (If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.) 1862 */ 1863 public ImplementationGuideDefinitionResourceComponent setExample(Type value) { 1864 if (value != null && !(value instanceof BooleanType || value instanceof CanonicalType)) 1865 throw new Error("Not the right type for ImplementationGuide.definition.resource.example[x]: "+value.fhirType()); 1866 this.example = value; 1867 return this; 1868 } 1869 1870 /** 1871 * @return {@link #package_} (Reference to the id of the pack this resource appears in.). This is the underlying object with id, value and extensions. The accessor "getPackage" gives direct access to the value 1872 */ 1873 public IdType getPackageElement() { 1874 if (this.package_ == null) 1875 if (Configuration.errorOnAutoCreate()) 1876 throw new Error("Attempt to auto-create ImplementationGuideDefinitionResourceComponent.package_"); 1877 else if (Configuration.doAutoCreate()) 1878 this.package_ = new IdType(); // bb 1879 return this.package_; 1880 } 1881 1882 public boolean hasPackageElement() { 1883 return this.package_ != null && !this.package_.isEmpty(); 1884 } 1885 1886 public boolean hasPackage() { 1887 return this.package_ != null && !this.package_.isEmpty(); 1888 } 1889 1890 /** 1891 * @param value {@link #package_} (Reference to the id of the pack this resource appears in.). This is the underlying object with id, value and extensions. The accessor "getPackage" gives direct access to the value 1892 */ 1893 public ImplementationGuideDefinitionResourceComponent setPackageElement(IdType value) { 1894 this.package_ = value; 1895 return this; 1896 } 1897 1898 /** 1899 * @return Reference to the id of the pack this resource appears in. 1900 */ 1901 public String getPackage() { 1902 return this.package_ == null ? null : this.package_.getValue(); 1903 } 1904 1905 /** 1906 * @param value Reference to the id of the pack this resource appears in. 1907 */ 1908 public ImplementationGuideDefinitionResourceComponent setPackage(String value) { 1909 if (Utilities.noString(value)) 1910 this.package_ = null; 1911 else { 1912 if (this.package_ == null) 1913 this.package_ = new IdType(); 1914 this.package_.setValue(value); 1915 } 1916 return this; 1917 } 1918 1919 protected void listChildren(List<Property> children) { 1920 super.listChildren(children); 1921 children.add(new Property("reference", "Reference(Any)", "Where this resource is found.", 0, 1, reference)); 1922 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)); 1923 children.add(new Property("description", "string", "A description of the reason that a resource has been included in the implementation guide.", 0, 1, description)); 1924 children.add(new Property("example[x]", "boolean|canonical(StructureDefinition)", "If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", 0, 1, example)); 1925 children.add(new Property("package", "id", "Reference to the id of the pack this resource appears in.", 0, 1, package_)); 1926 } 1927 1928 @Override 1929 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1930 switch (_hash) { 1931 case -925155509: /*reference*/ return new Property("reference", "Reference(Any)", "Where this resource is found.", 0, 1, reference); 1932 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); 1933 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); 1934 case -2002328874: /*example[x]*/ return new Property("example[x]", "boolean|canonical(StructureDefinition)", "If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", 0, 1, example); 1935 case -1322970774: /*example*/ return new Property("example[x]", "boolean|canonical(StructureDefinition)", "If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", 0, 1, example); 1936 case 159803230: /*exampleBoolean*/ return new Property("example[x]", "boolean|canonical(StructureDefinition)", "If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", 0, 1, example); 1937 case 2016979626: /*exampleCanonical*/ return new Property("example[x]", "boolean|canonical(StructureDefinition)", "If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", 0, 1, example); 1938 case -807062458: /*package*/ return new Property("package", "id", "Reference to the id of the pack this resource appears in.", 0, 1, package_); 1939 default: return super.getNamedProperty(_hash, _name, _checkValid); 1940 } 1941 1942 } 1943 1944 @Override 1945 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1946 switch (hash) { 1947 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference 1948 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1949 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // StringType 1950 case -1322970774: /*example*/ return this.example == null ? new Base[0] : new Base[] {this.example}; // Type 1951 case -807062458: /*package*/ return this.package_ == null ? new Base[0] : new Base[] {this.package_}; // IdType 1952 default: return super.getProperty(hash, name, checkValid); 1953 } 1954 1955 } 1956 1957 @Override 1958 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1959 switch (hash) { 1960 case -925155509: // reference 1961 this.reference = castToReference(value); // Reference 1962 return value; 1963 case 3373707: // name 1964 this.name = castToString(value); // StringType 1965 return value; 1966 case -1724546052: // description 1967 this.description = castToString(value); // StringType 1968 return value; 1969 case -1322970774: // example 1970 this.example = castToType(value); // Type 1971 return value; 1972 case -807062458: // package 1973 this.package_ = castToId(value); // IdType 1974 return value; 1975 default: return super.setProperty(hash, name, value); 1976 } 1977 1978 } 1979 1980 @Override 1981 public Base setProperty(String name, Base value) throws FHIRException { 1982 if (name.equals("reference")) { 1983 this.reference = castToReference(value); // Reference 1984 } else if (name.equals("name")) { 1985 this.name = castToString(value); // StringType 1986 } else if (name.equals("description")) { 1987 this.description = castToString(value); // StringType 1988 } else if (name.equals("example[x]")) { 1989 this.example = castToType(value); // Type 1990 } else if (name.equals("package")) { 1991 this.package_ = castToId(value); // IdType 1992 } else 1993 return super.setProperty(name, value); 1994 return value; 1995 } 1996 1997 @Override 1998 public Base makeProperty(int hash, String name) throws FHIRException { 1999 switch (hash) { 2000 case -925155509: return getReference(); 2001 case 3373707: return getNameElement(); 2002 case -1724546052: return getDescriptionElement(); 2003 case -2002328874: return getExample(); 2004 case -1322970774: return getExample(); 2005 case -807062458: return getPackageElement(); 2006 default: return super.makeProperty(hash, name); 2007 } 2008 2009 } 2010 2011 @Override 2012 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2013 switch (hash) { 2014 case -925155509: /*reference*/ return new String[] {"Reference"}; 2015 case 3373707: /*name*/ return new String[] {"string"}; 2016 case -1724546052: /*description*/ return new String[] {"string"}; 2017 case -1322970774: /*example*/ return new String[] {"boolean", "canonical"}; 2018 case -807062458: /*package*/ return new String[] {"id"}; 2019 default: return super.getTypesForProperty(hash, name); 2020 } 2021 2022 } 2023 2024 @Override 2025 public Base addChild(String name) throws FHIRException { 2026 if (name.equals("reference")) { 2027 this.reference = new Reference(); 2028 return this.reference; 2029 } 2030 else if (name.equals("name")) { 2031 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); 2032 } 2033 else if (name.equals("description")) { 2034 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.description"); 2035 } 2036 else if (name.equals("exampleBoolean")) { 2037 this.example = new BooleanType(); 2038 return this.example; 2039 } 2040 else if (name.equals("exampleCanonical")) { 2041 this.example = new CanonicalType(); 2042 return this.example; 2043 } 2044 else if (name.equals("package")) { 2045 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.package"); 2046 } 2047 else 2048 return super.addChild(name); 2049 } 2050 2051 public ImplementationGuideDefinitionResourceComponent copy() { 2052 ImplementationGuideDefinitionResourceComponent dst = new ImplementationGuideDefinitionResourceComponent(); 2053 copyValues(dst); 2054 dst.reference = reference == null ? null : reference.copy(); 2055 dst.name = name == null ? null : name.copy(); 2056 dst.description = description == null ? null : description.copy(); 2057 dst.example = example == null ? null : example.copy(); 2058 dst.package_ = package_ == null ? null : package_.copy(); 2059 return dst; 2060 } 2061 2062 @Override 2063 public boolean equalsDeep(Base other_) { 2064 if (!super.equalsDeep(other_)) 2065 return false; 2066 if (!(other_ instanceof ImplementationGuideDefinitionResourceComponent)) 2067 return false; 2068 ImplementationGuideDefinitionResourceComponent o = (ImplementationGuideDefinitionResourceComponent) other_; 2069 return compareDeep(reference, o.reference, true) && compareDeep(name, o.name, true) && compareDeep(description, o.description, true) 2070 && compareDeep(example, o.example, true) && compareDeep(package_, o.package_, true); 2071 } 2072 2073 @Override 2074 public boolean equalsShallow(Base other_) { 2075 if (!super.equalsShallow(other_)) 2076 return false; 2077 if (!(other_ instanceof ImplementationGuideDefinitionResourceComponent)) 2078 return false; 2079 ImplementationGuideDefinitionResourceComponent o = (ImplementationGuideDefinitionResourceComponent) other_; 2080 return compareValues(name, o.name, true) && compareValues(description, o.description, true) && compareValues(package_, o.package_, true) 2081 ; 2082 } 2083 2084 public boolean isEmpty() { 2085 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reference, name, description 2086 , example, package_); 2087 } 2088 2089 public String fhirType() { 2090 return "ImplementationGuide.definition.resource"; 2091 2092 } 2093 2094 } 2095 2096 @Block() 2097 public static class ImplementationGuideDefinitionPageComponent extends BackboneElement implements IBaseBackboneElement { 2098 /** 2099 * The source address for the page. 2100 */ 2101 @Child(name = "name", type = {UrlType.class, Binary.class}, order=1, min=1, max=1, modifier=false, summary=false) 2102 @Description(shortDefinition="Where to find that page", formalDefinition="The source address for the page." ) 2103 protected Type name; 2104 2105 /** 2106 * A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc. 2107 */ 2108 @Child(name = "title", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 2109 @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." ) 2110 protected StringType title; 2111 2112 /** 2113 * A code that indicates how the page is generated. 2114 */ 2115 @Child(name = "generation", type = {CodeType.class}, order=3, min=1, max=1, modifier=false, summary=false) 2116 @Description(shortDefinition="html | markdown | xml | generated", formalDefinition="A code that indicates how the page is generated." ) 2117 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/guide-page-generation") 2118 protected Enumeration<GuidePageGeneration> generation; 2119 2120 /** 2121 * Nested Pages/Sections under this page. 2122 */ 2123 @Child(name = "page", type = {ImplementationGuideDefinitionPageComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 2124 @Description(shortDefinition="Nested Pages / Sections", formalDefinition="Nested Pages/Sections under this page." ) 2125 protected List<ImplementationGuideDefinitionPageComponent> page; 2126 2127 private static final long serialVersionUID = -365655658L; 2128 2129 /** 2130 * Constructor 2131 */ 2132 public ImplementationGuideDefinitionPageComponent() { 2133 super(); 2134 } 2135 2136 /** 2137 * Constructor 2138 */ 2139 public ImplementationGuideDefinitionPageComponent(Type name, StringType title, Enumeration<GuidePageGeneration> generation) { 2140 super(); 2141 this.name = name; 2142 this.title = title; 2143 this.generation = generation; 2144 } 2145 2146 /** 2147 * @return {@link #name} (The source address for the page.) 2148 */ 2149 public Type getName() { 2150 return this.name; 2151 } 2152 2153 /** 2154 * @return {@link #name} (The source address for the page.) 2155 */ 2156 public UrlType getNameUrlType() throws FHIRException { 2157 if (this.name == null) 2158 return null; 2159 if (!(this.name instanceof UrlType)) 2160 throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.name.getClass().getName()+" was encountered"); 2161 return (UrlType) this.name; 2162 } 2163 2164 public boolean hasNameUrlType() { 2165 return this != null && this.name instanceof UrlType; 2166 } 2167 2168 /** 2169 * @return {@link #name} (The source address for the page.) 2170 */ 2171 public Reference getNameReference() throws FHIRException { 2172 if (this.name == null) 2173 return null; 2174 if (!(this.name instanceof Reference)) 2175 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.name.getClass().getName()+" was encountered"); 2176 return (Reference) this.name; 2177 } 2178 2179 public boolean hasNameReference() { 2180 return this != null && this.name instanceof Reference; 2181 } 2182 2183 public boolean hasName() { 2184 return this.name != null && !this.name.isEmpty(); 2185 } 2186 2187 /** 2188 * @param value {@link #name} (The source address for the page.) 2189 */ 2190 public ImplementationGuideDefinitionPageComponent setName(Type value) { 2191 if (value != null && !(value instanceof UrlType || value instanceof Reference)) 2192 throw new Error("Not the right type for ImplementationGuide.definition.page.name[x]: "+value.fhirType()); 2193 this.name = value; 2194 return this; 2195 } 2196 2197 /** 2198 * @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 2199 */ 2200 public StringType getTitleElement() { 2201 if (this.title == null) 2202 if (Configuration.errorOnAutoCreate()) 2203 throw new Error("Attempt to auto-create ImplementationGuideDefinitionPageComponent.title"); 2204 else if (Configuration.doAutoCreate()) 2205 this.title = new StringType(); // bb 2206 return this.title; 2207 } 2208 2209 public boolean hasTitleElement() { 2210 return this.title != null && !this.title.isEmpty(); 2211 } 2212 2213 public boolean hasTitle() { 2214 return this.title != null && !this.title.isEmpty(); 2215 } 2216 2217 /** 2218 * @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 2219 */ 2220 public ImplementationGuideDefinitionPageComponent setTitleElement(StringType value) { 2221 this.title = value; 2222 return this; 2223 } 2224 2225 /** 2226 * @return A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc. 2227 */ 2228 public String getTitle() { 2229 return this.title == null ? null : this.title.getValue(); 2230 } 2231 2232 /** 2233 * @param value A short title used to represent this page in navigational structures such as table of contents, bread crumbs, etc. 2234 */ 2235 public ImplementationGuideDefinitionPageComponent setTitle(String value) { 2236 if (this.title == null) 2237 this.title = new StringType(); 2238 this.title.setValue(value); 2239 return this; 2240 } 2241 2242 /** 2243 * @return {@link #generation} (A code that indicates how the page is generated.). This is the underlying object with id, value and extensions. The accessor "getGeneration" gives direct access to the value 2244 */ 2245 public Enumeration<GuidePageGeneration> getGenerationElement() { 2246 if (this.generation == null) 2247 if (Configuration.errorOnAutoCreate()) 2248 throw new Error("Attempt to auto-create ImplementationGuideDefinitionPageComponent.generation"); 2249 else if (Configuration.doAutoCreate()) 2250 this.generation = new Enumeration<GuidePageGeneration>(new GuidePageGenerationEnumFactory()); // bb 2251 return this.generation; 2252 } 2253 2254 public boolean hasGenerationElement() { 2255 return this.generation != null && !this.generation.isEmpty(); 2256 } 2257 2258 public boolean hasGeneration() { 2259 return this.generation != null && !this.generation.isEmpty(); 2260 } 2261 2262 /** 2263 * @param value {@link #generation} (A code that indicates how the page is generated.). This is the underlying object with id, value and extensions. The accessor "getGeneration" gives direct access to the value 2264 */ 2265 public ImplementationGuideDefinitionPageComponent setGenerationElement(Enumeration<GuidePageGeneration> value) { 2266 this.generation = value; 2267 return this; 2268 } 2269 2270 /** 2271 * @return A code that indicates how the page is generated. 2272 */ 2273 public GuidePageGeneration getGeneration() { 2274 return this.generation == null ? null : this.generation.getValue(); 2275 } 2276 2277 /** 2278 * @param value A code that indicates how the page is generated. 2279 */ 2280 public ImplementationGuideDefinitionPageComponent setGeneration(GuidePageGeneration value) { 2281 if (this.generation == null) 2282 this.generation = new Enumeration<GuidePageGeneration>(new GuidePageGenerationEnumFactory()); 2283 this.generation.setValue(value); 2284 return this; 2285 } 2286 2287 /** 2288 * @return {@link #page} (Nested Pages/Sections under this page.) 2289 */ 2290 public List<ImplementationGuideDefinitionPageComponent> getPage() { 2291 if (this.page == null) 2292 this.page = new ArrayList<ImplementationGuideDefinitionPageComponent>(); 2293 return this.page; 2294 } 2295 2296 /** 2297 * @return Returns a reference to <code>this</code> for easy method chaining 2298 */ 2299 public ImplementationGuideDefinitionPageComponent setPage(List<ImplementationGuideDefinitionPageComponent> thePage) { 2300 this.page = thePage; 2301 return this; 2302 } 2303 2304 public boolean hasPage() { 2305 if (this.page == null) 2306 return false; 2307 for (ImplementationGuideDefinitionPageComponent item : this.page) 2308 if (!item.isEmpty()) 2309 return true; 2310 return false; 2311 } 2312 2313 public ImplementationGuideDefinitionPageComponent addPage() { //3 2314 ImplementationGuideDefinitionPageComponent t = new ImplementationGuideDefinitionPageComponent(); 2315 if (this.page == null) 2316 this.page = new ArrayList<ImplementationGuideDefinitionPageComponent>(); 2317 this.page.add(t); 2318 return t; 2319 } 2320 2321 public ImplementationGuideDefinitionPageComponent addPage(ImplementationGuideDefinitionPageComponent t) { //3 2322 if (t == null) 2323 return this; 2324 if (this.page == null) 2325 this.page = new ArrayList<ImplementationGuideDefinitionPageComponent>(); 2326 this.page.add(t); 2327 return this; 2328 } 2329 2330 /** 2331 * @return The first repetition of repeating field {@link #page}, creating it if it does not already exist 2332 */ 2333 public ImplementationGuideDefinitionPageComponent getPageFirstRep() { 2334 if (getPage().isEmpty()) { 2335 addPage(); 2336 } 2337 return getPage().get(0); 2338 } 2339 2340 protected void listChildren(List<Property> children) { 2341 super.listChildren(children); 2342 children.add(new Property("name[x]", "url|Reference(Binary)", "The source address for the page.", 0, 1, name)); 2343 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)); 2344 children.add(new Property("generation", "code", "A code that indicates how the page is generated.", 0, 1, generation)); 2345 children.add(new Property("page", "@ImplementationGuide.definition.page", "Nested Pages/Sections under this page.", 0, java.lang.Integer.MAX_VALUE, page)); 2346 } 2347 2348 @Override 2349 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2350 switch (_hash) { 2351 case 1721948693: /*name[x]*/ return new Property("name[x]", "url|Reference(Binary)", "The source address for the page.", 0, 1, name); 2352 case 3373707: /*name*/ return new Property("name[x]", "url|Reference(Binary)", "The source address for the page.", 0, 1, name); 2353 case 1721942756: /*nameUrl*/ return new Property("name[x]", "url|Reference(Binary)", "The source address for the page.", 0, 1, name); 2354 case 1833144576: /*nameReference*/ return new Property("name[x]", "url|Reference(Binary)", "The source address for the page.", 0, 1, name); 2355 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); 2356 case 305703192: /*generation*/ return new Property("generation", "code", "A code that indicates how the page is generated.", 0, 1, generation); 2357 case 3433103: /*page*/ return new Property("page", "@ImplementationGuide.definition.page", "Nested Pages/Sections under this page.", 0, java.lang.Integer.MAX_VALUE, page); 2358 default: return super.getNamedProperty(_hash, _name, _checkValid); 2359 } 2360 2361 } 2362 2363 @Override 2364 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2365 switch (hash) { 2366 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // Type 2367 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 2368 case 305703192: /*generation*/ return this.generation == null ? new Base[0] : new Base[] {this.generation}; // Enumeration<GuidePageGeneration> 2369 case 3433103: /*page*/ return this.page == null ? new Base[0] : this.page.toArray(new Base[this.page.size()]); // ImplementationGuideDefinitionPageComponent 2370 default: return super.getProperty(hash, name, checkValid); 2371 } 2372 2373 } 2374 2375 @Override 2376 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2377 switch (hash) { 2378 case 3373707: // name 2379 this.name = castToType(value); // Type 2380 return value; 2381 case 110371416: // title 2382 this.title = castToString(value); // StringType 2383 return value; 2384 case 305703192: // generation 2385 value = new GuidePageGenerationEnumFactory().fromType(castToCode(value)); 2386 this.generation = (Enumeration) value; // Enumeration<GuidePageGeneration> 2387 return value; 2388 case 3433103: // page 2389 this.getPage().add((ImplementationGuideDefinitionPageComponent) value); // ImplementationGuideDefinitionPageComponent 2390 return value; 2391 default: return super.setProperty(hash, name, value); 2392 } 2393 2394 } 2395 2396 @Override 2397 public Base setProperty(String name, Base value) throws FHIRException { 2398 if (name.equals("name[x]")) { 2399 this.name = castToType(value); // Type 2400 } else if (name.equals("title")) { 2401 this.title = castToString(value); // StringType 2402 } else if (name.equals("generation")) { 2403 value = new GuidePageGenerationEnumFactory().fromType(castToCode(value)); 2404 this.generation = (Enumeration) value; // Enumeration<GuidePageGeneration> 2405 } else if (name.equals("page")) { 2406 this.getPage().add((ImplementationGuideDefinitionPageComponent) value); 2407 } else 2408 return super.setProperty(name, value); 2409 return value; 2410 } 2411 2412 @Override 2413 public Base makeProperty(int hash, String name) throws FHIRException { 2414 switch (hash) { 2415 case 1721948693: return getName(); 2416 case 3373707: return getName(); 2417 case 110371416: return getTitleElement(); 2418 case 305703192: return getGenerationElement(); 2419 case 3433103: return addPage(); 2420 default: return super.makeProperty(hash, name); 2421 } 2422 2423 } 2424 2425 @Override 2426 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2427 switch (hash) { 2428 case 3373707: /*name*/ return new String[] {"url", "Reference"}; 2429 case 110371416: /*title*/ return new String[] {"string"}; 2430 case 305703192: /*generation*/ return new String[] {"code"}; 2431 case 3433103: /*page*/ return new String[] {"@ImplementationGuide.definition.page"}; 2432 default: return super.getTypesForProperty(hash, name); 2433 } 2434 2435 } 2436 2437 @Override 2438 public Base addChild(String name) throws FHIRException { 2439 if (name.equals("nameUrl")) { 2440 this.name = new UrlType(); 2441 return this.name; 2442 } 2443 else if (name.equals("nameReference")) { 2444 this.name = new Reference(); 2445 return this.name; 2446 } 2447 else if (name.equals("title")) { 2448 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.title"); 2449 } 2450 else if (name.equals("generation")) { 2451 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.generation"); 2452 } 2453 else if (name.equals("page")) { 2454 return addPage(); 2455 } 2456 else 2457 return super.addChild(name); 2458 } 2459 2460 public ImplementationGuideDefinitionPageComponent copy() { 2461 ImplementationGuideDefinitionPageComponent dst = new ImplementationGuideDefinitionPageComponent(); 2462 copyValues(dst); 2463 dst.name = name == null ? null : name.copy(); 2464 dst.title = title == null ? null : title.copy(); 2465 dst.generation = generation == null ? null : generation.copy(); 2466 if (page != null) { 2467 dst.page = new ArrayList<ImplementationGuideDefinitionPageComponent>(); 2468 for (ImplementationGuideDefinitionPageComponent i : page) 2469 dst.page.add(i.copy()); 2470 }; 2471 return dst; 2472 } 2473 2474 @Override 2475 public boolean equalsDeep(Base other_) { 2476 if (!super.equalsDeep(other_)) 2477 return false; 2478 if (!(other_ instanceof ImplementationGuideDefinitionPageComponent)) 2479 return false; 2480 ImplementationGuideDefinitionPageComponent o = (ImplementationGuideDefinitionPageComponent) other_; 2481 return compareDeep(name, o.name, true) && compareDeep(title, o.title, true) && compareDeep(generation, o.generation, true) 2482 && compareDeep(page, o.page, true); 2483 } 2484 2485 @Override 2486 public boolean equalsShallow(Base other_) { 2487 if (!super.equalsShallow(other_)) 2488 return false; 2489 if (!(other_ instanceof ImplementationGuideDefinitionPageComponent)) 2490 return false; 2491 ImplementationGuideDefinitionPageComponent o = (ImplementationGuideDefinitionPageComponent) other_; 2492 return compareValues(title, o.title, true) && compareValues(generation, o.generation, true); 2493 } 2494 2495 public boolean isEmpty() { 2496 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, title, generation 2497 , page); 2498 } 2499 2500 public String fhirType() { 2501 return "ImplementationGuide.definition.page"; 2502 2503 } 2504 2505 } 2506 2507 @Block() 2508 public static class ImplementationGuideDefinitionParameterComponent extends BackboneElement implements IBaseBackboneElement { 2509 /** 2510 * apply-business-version | apply-jurisdiction | path-resource | path-pages | path-tx-cache | expansion-profile | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template. 2511 */ 2512 @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2513 @Description(shortDefinition="apply-business-version | apply-jurisdiction | path-resource | path-pages | path-tx-cache | expansion-profile | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template", formalDefinition="apply-business-version | apply-jurisdiction | path-resource | path-pages | path-tx-cache | expansion-profile | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template." ) 2514 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/guide-parameter-code") 2515 protected Enumeration<GuideParameterCode> code; 2516 2517 /** 2518 * Value for named type. 2519 */ 2520 @Child(name = "value", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 2521 @Description(shortDefinition="Value for named type", formalDefinition="Value for named type." ) 2522 protected StringType value; 2523 2524 private static final long serialVersionUID = 1188999138L; 2525 2526 /** 2527 * Constructor 2528 */ 2529 public ImplementationGuideDefinitionParameterComponent() { 2530 super(); 2531 } 2532 2533 /** 2534 * Constructor 2535 */ 2536 public ImplementationGuideDefinitionParameterComponent(Enumeration<GuideParameterCode> code, StringType value) { 2537 super(); 2538 this.code = code; 2539 this.value = value; 2540 } 2541 2542 /** 2543 * @return {@link #code} (apply-business-version | apply-jurisdiction | path-resource | path-pages | path-tx-cache | expansion-profile | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 2544 */ 2545 public Enumeration<GuideParameterCode> getCodeElement() { 2546 if (this.code == null) 2547 if (Configuration.errorOnAutoCreate()) 2548 throw new Error("Attempt to auto-create ImplementationGuideDefinitionParameterComponent.code"); 2549 else if (Configuration.doAutoCreate()) 2550 this.code = new Enumeration<GuideParameterCode>(new GuideParameterCodeEnumFactory()); // bb 2551 return this.code; 2552 } 2553 2554 public boolean hasCodeElement() { 2555 return this.code != null && !this.code.isEmpty(); 2556 } 2557 2558 public boolean hasCode() { 2559 return this.code != null && !this.code.isEmpty(); 2560 } 2561 2562 /** 2563 * @param value {@link #code} (apply-business-version | apply-jurisdiction | path-resource | path-pages | path-tx-cache | expansion-profile | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 2564 */ 2565 public ImplementationGuideDefinitionParameterComponent setCodeElement(Enumeration<GuideParameterCode> value) { 2566 this.code = value; 2567 return this; 2568 } 2569 2570 /** 2571 * @return apply-business-version | apply-jurisdiction | path-resource | path-pages | path-tx-cache | expansion-profile | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template. 2572 */ 2573 public GuideParameterCode getCode() { 2574 return this.code == null ? null : this.code.getValue(); 2575 } 2576 2577 /** 2578 * @param value apply-business-version | apply-jurisdiction | path-resource | path-pages | path-tx-cache | expansion-profile | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template. 2579 */ 2580 public ImplementationGuideDefinitionParameterComponent setCode(GuideParameterCode value) { 2581 if (this.code == null) 2582 this.code = new Enumeration<GuideParameterCode>(new GuideParameterCodeEnumFactory()); 2583 this.code.setValue(value); 2584 return this; 2585 } 2586 2587 /** 2588 * @return {@link #value} (Value for named type.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 2589 */ 2590 public StringType getValueElement() { 2591 if (this.value == null) 2592 if (Configuration.errorOnAutoCreate()) 2593 throw new Error("Attempt to auto-create ImplementationGuideDefinitionParameterComponent.value"); 2594 else if (Configuration.doAutoCreate()) 2595 this.value = new StringType(); // bb 2596 return this.value; 2597 } 2598 2599 public boolean hasValueElement() { 2600 return this.value != null && !this.value.isEmpty(); 2601 } 2602 2603 public boolean hasValue() { 2604 return this.value != null && !this.value.isEmpty(); 2605 } 2606 2607 /** 2608 * @param value {@link #value} (Value for named type.). This is the underlying object with id, value and extensions. The accessor "getValue" gives direct access to the value 2609 */ 2610 public ImplementationGuideDefinitionParameterComponent setValueElement(StringType value) { 2611 this.value = value; 2612 return this; 2613 } 2614 2615 /** 2616 * @return Value for named type. 2617 */ 2618 public String getValue() { 2619 return this.value == null ? null : this.value.getValue(); 2620 } 2621 2622 /** 2623 * @param value Value for named type. 2624 */ 2625 public ImplementationGuideDefinitionParameterComponent setValue(String value) { 2626 if (this.value == null) 2627 this.value = new StringType(); 2628 this.value.setValue(value); 2629 return this; 2630 } 2631 2632 protected void listChildren(List<Property> children) { 2633 super.listChildren(children); 2634 children.add(new Property("code", "code", "apply-business-version | apply-jurisdiction | path-resource | path-pages | path-tx-cache | expansion-profile | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template.", 0, 1, code)); 2635 children.add(new Property("value", "string", "Value for named type.", 0, 1, value)); 2636 } 2637 2638 @Override 2639 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2640 switch (_hash) { 2641 case 3059181: /*code*/ return new Property("code", "code", "apply-business-version | apply-jurisdiction | path-resource | path-pages | path-tx-cache | expansion-profile | rule-broken-links | generate-xml | generate-json | generate-turtle | html-template.", 0, 1, code); 2642 case 111972721: /*value*/ return new Property("value", "string", "Value for named type.", 0, 1, value); 2643 default: return super.getNamedProperty(_hash, _name, _checkValid); 2644 } 2645 2646 } 2647 2648 @Override 2649 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2650 switch (hash) { 2651 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // Enumeration<GuideParameterCode> 2652 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // StringType 2653 default: return super.getProperty(hash, name, checkValid); 2654 } 2655 2656 } 2657 2658 @Override 2659 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2660 switch (hash) { 2661 case 3059181: // code 2662 value = new GuideParameterCodeEnumFactory().fromType(castToCode(value)); 2663 this.code = (Enumeration) value; // Enumeration<GuideParameterCode> 2664 return value; 2665 case 111972721: // value 2666 this.value = castToString(value); // StringType 2667 return value; 2668 default: return super.setProperty(hash, name, value); 2669 } 2670 2671 } 2672 2673 @Override 2674 public Base setProperty(String name, Base value) throws FHIRException { 2675 if (name.equals("code")) { 2676 value = new GuideParameterCodeEnumFactory().fromType(castToCode(value)); 2677 this.code = (Enumeration) value; // Enumeration<GuideParameterCode> 2678 } else if (name.equals("value")) { 2679 this.value = castToString(value); // StringType 2680 } else 2681 return super.setProperty(name, value); 2682 return value; 2683 } 2684 2685 @Override 2686 public Base makeProperty(int hash, String name) throws FHIRException { 2687 switch (hash) { 2688 case 3059181: return getCodeElement(); 2689 case 111972721: return getValueElement(); 2690 default: return super.makeProperty(hash, name); 2691 } 2692 2693 } 2694 2695 @Override 2696 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 2697 switch (hash) { 2698 case 3059181: /*code*/ return new String[] {"code"}; 2699 case 111972721: /*value*/ return new String[] {"string"}; 2700 default: return super.getTypesForProperty(hash, name); 2701 } 2702 2703 } 2704 2705 @Override 2706 public Base addChild(String name) throws FHIRException { 2707 if (name.equals("code")) { 2708 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.code"); 2709 } 2710 else if (name.equals("value")) { 2711 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.value"); 2712 } 2713 else 2714 return super.addChild(name); 2715 } 2716 2717 public ImplementationGuideDefinitionParameterComponent copy() { 2718 ImplementationGuideDefinitionParameterComponent dst = new ImplementationGuideDefinitionParameterComponent(); 2719 copyValues(dst); 2720 dst.code = code == null ? null : code.copy(); 2721 dst.value = value == null ? null : value.copy(); 2722 return dst; 2723 } 2724 2725 @Override 2726 public boolean equalsDeep(Base other_) { 2727 if (!super.equalsDeep(other_)) 2728 return false; 2729 if (!(other_ instanceof ImplementationGuideDefinitionParameterComponent)) 2730 return false; 2731 ImplementationGuideDefinitionParameterComponent o = (ImplementationGuideDefinitionParameterComponent) other_; 2732 return compareDeep(code, o.code, true) && compareDeep(value, o.value, true); 2733 } 2734 2735 @Override 2736 public boolean equalsShallow(Base other_) { 2737 if (!super.equalsShallow(other_)) 2738 return false; 2739 if (!(other_ instanceof ImplementationGuideDefinitionParameterComponent)) 2740 return false; 2741 ImplementationGuideDefinitionParameterComponent o = (ImplementationGuideDefinitionParameterComponent) other_; 2742 return compareValues(code, o.code, true) && compareValues(value, o.value, true); 2743 } 2744 2745 public boolean isEmpty() { 2746 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, value); 2747 } 2748 2749 public String fhirType() { 2750 return "ImplementationGuide.definition.parameter"; 2751 2752 } 2753 2754 } 2755 2756 @Block() 2757 public static class ImplementationGuideDefinitionTemplateComponent extends BackboneElement implements IBaseBackboneElement { 2758 /** 2759 * Type of template specified. 2760 */ 2761 @Child(name = "code", type = {CodeType.class}, order=1, min=1, max=1, modifier=false, summary=false) 2762 @Description(shortDefinition="Type of template specified", formalDefinition="Type of template specified." ) 2763 protected CodeType code; 2764 2765 /** 2766 * The source location for the template. 2767 */ 2768 @Child(name = "source", type = {StringType.class}, order=2, min=1, max=1, modifier=false, summary=false) 2769 @Description(shortDefinition="The source location for the template", formalDefinition="The source location for the template." ) 2770 protected StringType source; 2771 2772 /** 2773 * The scope in which the template applies. 2774 */ 2775 @Child(name = "scope", type = {StringType.class}, order=3, min=0, max=1, modifier=false, summary=false) 2776 @Description(shortDefinition="The scope in which the template applies", formalDefinition="The scope in which the template applies." ) 2777 protected StringType scope; 2778 2779 private static final long serialVersionUID = 923832457L; 2780 2781 /** 2782 * Constructor 2783 */ 2784 public ImplementationGuideDefinitionTemplateComponent() { 2785 super(); 2786 } 2787 2788 /** 2789 * Constructor 2790 */ 2791 public ImplementationGuideDefinitionTemplateComponent(CodeType code, StringType source) { 2792 super(); 2793 this.code = code; 2794 this.source = source; 2795 } 2796 2797 /** 2798 * @return {@link #code} (Type of template specified.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 2799 */ 2800 public CodeType getCodeElement() { 2801 if (this.code == null) 2802 if (Configuration.errorOnAutoCreate()) 2803 throw new Error("Attempt to auto-create ImplementationGuideDefinitionTemplateComponent.code"); 2804 else if (Configuration.doAutoCreate()) 2805 this.code = new CodeType(); // bb 2806 return this.code; 2807 } 2808 2809 public boolean hasCodeElement() { 2810 return this.code != null && !this.code.isEmpty(); 2811 } 2812 2813 public boolean hasCode() { 2814 return this.code != null && !this.code.isEmpty(); 2815 } 2816 2817 /** 2818 * @param value {@link #code} (Type of template specified.). This is the underlying object with id, value and extensions. The accessor "getCode" gives direct access to the value 2819 */ 2820 public ImplementationGuideDefinitionTemplateComponent setCodeElement(CodeType value) { 2821 this.code = value; 2822 return this; 2823 } 2824 2825 /** 2826 * @return Type of template specified. 2827 */ 2828 public String getCode() { 2829 return this.code == null ? null : this.code.getValue(); 2830 } 2831 2832 /** 2833 * @param value Type of template specified. 2834 */ 2835 public ImplementationGuideDefinitionTemplateComponent setCode(String value) { 2836 if (this.code == null) 2837 this.code = new CodeType(); 2838 this.code.setValue(value); 2839 return this; 2840 } 2841 2842 /** 2843 * @return {@link #source} (The source location for the template.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value 2844 */ 2845 public StringType getSourceElement() { 2846 if (this.source == null) 2847 if (Configuration.errorOnAutoCreate()) 2848 throw new Error("Attempt to auto-create ImplementationGuideDefinitionTemplateComponent.source"); 2849 else if (Configuration.doAutoCreate()) 2850 this.source = new StringType(); // bb 2851 return this.source; 2852 } 2853 2854 public boolean hasSourceElement() { 2855 return this.source != null && !this.source.isEmpty(); 2856 } 2857 2858 public boolean hasSource() { 2859 return this.source != null && !this.source.isEmpty(); 2860 } 2861 2862 /** 2863 * @param value {@link #source} (The source location for the template.). This is the underlying object with id, value and extensions. The accessor "getSource" gives direct access to the value 2864 */ 2865 public ImplementationGuideDefinitionTemplateComponent setSourceElement(StringType value) { 2866 this.source = value; 2867 return this; 2868 } 2869 2870 /** 2871 * @return The source location for the template. 2872 */ 2873 public String getSource() { 2874 return this.source == null ? null : this.source.getValue(); 2875 } 2876 2877 /** 2878 * @param value The source location for the template. 2879 */ 2880 public ImplementationGuideDefinitionTemplateComponent setSource(String value) { 2881 if (this.source == null) 2882 this.source = new StringType(); 2883 this.source.setValue(value); 2884 return this; 2885 } 2886 2887 /** 2888 * @return {@link #scope} (The scope in which the template applies.). This is the underlying object with id, value and extensions. The accessor "getScope" gives direct access to the value 2889 */ 2890 public StringType getScopeElement() { 2891 if (this.scope == null) 2892 if (Configuration.errorOnAutoCreate()) 2893 throw new Error("Attempt to auto-create ImplementationGuideDefinitionTemplateComponent.scope"); 2894 else if (Configuration.doAutoCreate()) 2895 this.scope = new StringType(); // bb 2896 return this.scope; 2897 } 2898 2899 public boolean hasScopeElement() { 2900 return this.scope != null && !this.scope.isEmpty(); 2901 } 2902 2903 public boolean hasScope() { 2904 return this.scope != null && !this.scope.isEmpty(); 2905 } 2906 2907 /** 2908 * @param value {@link #scope} (The scope in which the template applies.). This is the underlying object with id, value and extensions. The accessor "getScope" gives direct access to the value 2909 */ 2910 public ImplementationGuideDefinitionTemplateComponent setScopeElement(StringType value) { 2911 this.scope = value; 2912 return this; 2913 } 2914 2915 /** 2916 * @return The scope in which the template applies. 2917 */ 2918 public String getScope() { 2919 return this.scope == null ? null : this.scope.getValue(); 2920 } 2921 2922 /** 2923 * @param value The scope in which the template applies. 2924 */ 2925 public ImplementationGuideDefinitionTemplateComponent setScope(String value) { 2926 if (Utilities.noString(value)) 2927 this.scope = null; 2928 else { 2929 if (this.scope == null) 2930 this.scope = new StringType(); 2931 this.scope.setValue(value); 2932 } 2933 return this; 2934 } 2935 2936 protected void listChildren(List<Property> children) { 2937 super.listChildren(children); 2938 children.add(new Property("code", "code", "Type of template specified.", 0, 1, code)); 2939 children.add(new Property("source", "string", "The source location for the template.", 0, 1, source)); 2940 children.add(new Property("scope", "string", "The scope in which the template applies.", 0, 1, scope)); 2941 } 2942 2943 @Override 2944 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 2945 switch (_hash) { 2946 case 3059181: /*code*/ return new Property("code", "code", "Type of template specified.", 0, 1, code); 2947 case -896505829: /*source*/ return new Property("source", "string", "The source location for the template.", 0, 1, source); 2948 case 109264468: /*scope*/ return new Property("scope", "string", "The scope in which the template applies.", 0, 1, scope); 2949 default: return super.getNamedProperty(_hash, _name, _checkValid); 2950 } 2951 2952 } 2953 2954 @Override 2955 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 2956 switch (hash) { 2957 case 3059181: /*code*/ return this.code == null ? new Base[0] : new Base[] {this.code}; // CodeType 2958 case -896505829: /*source*/ return this.source == null ? new Base[0] : new Base[] {this.source}; // StringType 2959 case 109264468: /*scope*/ return this.scope == null ? new Base[0] : new Base[] {this.scope}; // StringType 2960 default: return super.getProperty(hash, name, checkValid); 2961 } 2962 2963 } 2964 2965 @Override 2966 public Base setProperty(int hash, String name, Base value) throws FHIRException { 2967 switch (hash) { 2968 case 3059181: // code 2969 this.code = castToCode(value); // CodeType 2970 return value; 2971 case -896505829: // source 2972 this.source = castToString(value); // StringType 2973 return value; 2974 case 109264468: // scope 2975 this.scope = castToString(value); // StringType 2976 return value; 2977 default: return super.setProperty(hash, name, value); 2978 } 2979 2980 } 2981 2982 @Override 2983 public Base setProperty(String name, Base value) throws FHIRException { 2984 if (name.equals("code")) { 2985 this.code = castToCode(value); // CodeType 2986 } else if (name.equals("source")) { 2987 this.source = castToString(value); // StringType 2988 } else if (name.equals("scope")) { 2989 this.scope = castToString(value); // StringType 2990 } else 2991 return super.setProperty(name, value); 2992 return value; 2993 } 2994 2995 @Override 2996 public Base makeProperty(int hash, String name) throws FHIRException { 2997 switch (hash) { 2998 case 3059181: return getCodeElement(); 2999 case -896505829: return getSourceElement(); 3000 case 109264468: return getScopeElement(); 3001 default: return super.makeProperty(hash, name); 3002 } 3003 3004 } 3005 3006 @Override 3007 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3008 switch (hash) { 3009 case 3059181: /*code*/ return new String[] {"code"}; 3010 case -896505829: /*source*/ return new String[] {"string"}; 3011 case 109264468: /*scope*/ return new String[] {"string"}; 3012 default: return super.getTypesForProperty(hash, name); 3013 } 3014 3015 } 3016 3017 @Override 3018 public Base addChild(String name) throws FHIRException { 3019 if (name.equals("code")) { 3020 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.code"); 3021 } 3022 else if (name.equals("source")) { 3023 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.source"); 3024 } 3025 else if (name.equals("scope")) { 3026 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.scope"); 3027 } 3028 else 3029 return super.addChild(name); 3030 } 3031 3032 public ImplementationGuideDefinitionTemplateComponent copy() { 3033 ImplementationGuideDefinitionTemplateComponent dst = new ImplementationGuideDefinitionTemplateComponent(); 3034 copyValues(dst); 3035 dst.code = code == null ? null : code.copy(); 3036 dst.source = source == null ? null : source.copy(); 3037 dst.scope = scope == null ? null : scope.copy(); 3038 return dst; 3039 } 3040 3041 @Override 3042 public boolean equalsDeep(Base other_) { 3043 if (!super.equalsDeep(other_)) 3044 return false; 3045 if (!(other_ instanceof ImplementationGuideDefinitionTemplateComponent)) 3046 return false; 3047 ImplementationGuideDefinitionTemplateComponent o = (ImplementationGuideDefinitionTemplateComponent) other_; 3048 return compareDeep(code, o.code, true) && compareDeep(source, o.source, true) && compareDeep(scope, o.scope, true) 3049 ; 3050 } 3051 3052 @Override 3053 public boolean equalsShallow(Base other_) { 3054 if (!super.equalsShallow(other_)) 3055 return false; 3056 if (!(other_ instanceof ImplementationGuideDefinitionTemplateComponent)) 3057 return false; 3058 ImplementationGuideDefinitionTemplateComponent o = (ImplementationGuideDefinitionTemplateComponent) other_; 3059 return compareValues(code, o.code, true) && compareValues(source, o.source, true) && compareValues(scope, o.scope, true) 3060 ; 3061 } 3062 3063 public boolean isEmpty() { 3064 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(code, source, scope); 3065 } 3066 3067 public String fhirType() { 3068 return "ImplementationGuide.definition.template"; 3069 3070 } 3071 3072 } 3073 3074 @Block() 3075 public static class ImplementationGuideManifestComponent extends BackboneElement implements IBaseBackboneElement { 3076 /** 3077 * A pointer to official web page, PDF or other rendering of the implementation guide. 3078 */ 3079 @Child(name = "rendering", type = {UrlType.class}, order=1, min=0, max=1, modifier=false, summary=true) 3080 @Description(shortDefinition="Location of rendered implementation guide", formalDefinition="A pointer to official web page, PDF or other rendering of the implementation guide." ) 3081 protected UrlType rendering; 3082 3083 /** 3084 * 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. 3085 */ 3086 @Child(name = "resource", type = {}, order=2, min=1, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 3087 @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." ) 3088 protected List<ImplementationGuideManifestResourceComponent> resource; 3089 3090 /** 3091 * Information about a page within the IG. 3092 */ 3093 @Child(name = "page", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3094 @Description(shortDefinition="HTML page within the parent IG", formalDefinition="Information about a page within the IG." ) 3095 protected List<ImplementationGuideManifestPageComponent> page; 3096 3097 /** 3098 * Indicates a relative path to an image that exists within the IG. 3099 */ 3100 @Child(name = "image", type = {StringType.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3101 @Description(shortDefinition="Image within the IG", formalDefinition="Indicates a relative path to an image that exists within the IG." ) 3102 protected List<StringType> image; 3103 3104 /** 3105 * Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG. 3106 */ 3107 @Child(name = "other", type = {StringType.class}, order=5, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3108 @Description(shortDefinition="Additional linkable file in IG", formalDefinition="Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG." ) 3109 protected List<StringType> other; 3110 3111 private static final long serialVersionUID = -212447764L; 3112 3113 /** 3114 * Constructor 3115 */ 3116 public ImplementationGuideManifestComponent() { 3117 super(); 3118 } 3119 3120 /** 3121 * @return {@link #rendering} (A pointer to official web page, PDF or other rendering of the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getRendering" gives direct access to the value 3122 */ 3123 public UrlType getRenderingElement() { 3124 if (this.rendering == null) 3125 if (Configuration.errorOnAutoCreate()) 3126 throw new Error("Attempt to auto-create ImplementationGuideManifestComponent.rendering"); 3127 else if (Configuration.doAutoCreate()) 3128 this.rendering = new UrlType(); // bb 3129 return this.rendering; 3130 } 3131 3132 public boolean hasRenderingElement() { 3133 return this.rendering != null && !this.rendering.isEmpty(); 3134 } 3135 3136 public boolean hasRendering() { 3137 return this.rendering != null && !this.rendering.isEmpty(); 3138 } 3139 3140 /** 3141 * @param value {@link #rendering} (A pointer to official web page, PDF or other rendering of the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getRendering" gives direct access to the value 3142 */ 3143 public ImplementationGuideManifestComponent setRenderingElement(UrlType value) { 3144 this.rendering = value; 3145 return this; 3146 } 3147 3148 /** 3149 * @return A pointer to official web page, PDF or other rendering of the implementation guide. 3150 */ 3151 public String getRendering() { 3152 return this.rendering == null ? null : this.rendering.getValue(); 3153 } 3154 3155 /** 3156 * @param value A pointer to official web page, PDF or other rendering of the implementation guide. 3157 */ 3158 public ImplementationGuideManifestComponent setRendering(String value) { 3159 if (Utilities.noString(value)) 3160 this.rendering = null; 3161 else { 3162 if (this.rendering == null) 3163 this.rendering = new UrlType(); 3164 this.rendering.setValue(value); 3165 } 3166 return this; 3167 } 3168 3169 /** 3170 * @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.) 3171 */ 3172 public List<ImplementationGuideManifestResourceComponent> getResource() { 3173 if (this.resource == null) 3174 this.resource = new ArrayList<ImplementationGuideManifestResourceComponent>(); 3175 return this.resource; 3176 } 3177 3178 /** 3179 * @return Returns a reference to <code>this</code> for easy method chaining 3180 */ 3181 public ImplementationGuideManifestComponent setResource(List<ImplementationGuideManifestResourceComponent> theResource) { 3182 this.resource = theResource; 3183 return this; 3184 } 3185 3186 public boolean hasResource() { 3187 if (this.resource == null) 3188 return false; 3189 for (ImplementationGuideManifestResourceComponent item : this.resource) 3190 if (!item.isEmpty()) 3191 return true; 3192 return false; 3193 } 3194 3195 public ImplementationGuideManifestResourceComponent addResource() { //3 3196 ImplementationGuideManifestResourceComponent t = new ImplementationGuideManifestResourceComponent(); 3197 if (this.resource == null) 3198 this.resource = new ArrayList<ImplementationGuideManifestResourceComponent>(); 3199 this.resource.add(t); 3200 return t; 3201 } 3202 3203 public ImplementationGuideManifestComponent addResource(ImplementationGuideManifestResourceComponent t) { //3 3204 if (t == null) 3205 return this; 3206 if (this.resource == null) 3207 this.resource = new ArrayList<ImplementationGuideManifestResourceComponent>(); 3208 this.resource.add(t); 3209 return this; 3210 } 3211 3212 /** 3213 * @return The first repetition of repeating field {@link #resource}, creating it if it does not already exist 3214 */ 3215 public ImplementationGuideManifestResourceComponent getResourceFirstRep() { 3216 if (getResource().isEmpty()) { 3217 addResource(); 3218 } 3219 return getResource().get(0); 3220 } 3221 3222 /** 3223 * @return {@link #page} (Information about a page within the IG.) 3224 */ 3225 public List<ImplementationGuideManifestPageComponent> getPage() { 3226 if (this.page == null) 3227 this.page = new ArrayList<ImplementationGuideManifestPageComponent>(); 3228 return this.page; 3229 } 3230 3231 /** 3232 * @return Returns a reference to <code>this</code> for easy method chaining 3233 */ 3234 public ImplementationGuideManifestComponent setPage(List<ImplementationGuideManifestPageComponent> thePage) { 3235 this.page = thePage; 3236 return this; 3237 } 3238 3239 public boolean hasPage() { 3240 if (this.page == null) 3241 return false; 3242 for (ImplementationGuideManifestPageComponent item : this.page) 3243 if (!item.isEmpty()) 3244 return true; 3245 return false; 3246 } 3247 3248 public ImplementationGuideManifestPageComponent addPage() { //3 3249 ImplementationGuideManifestPageComponent t = new ImplementationGuideManifestPageComponent(); 3250 if (this.page == null) 3251 this.page = new ArrayList<ImplementationGuideManifestPageComponent>(); 3252 this.page.add(t); 3253 return t; 3254 } 3255 3256 public ImplementationGuideManifestComponent addPage(ImplementationGuideManifestPageComponent t) { //3 3257 if (t == null) 3258 return this; 3259 if (this.page == null) 3260 this.page = new ArrayList<ImplementationGuideManifestPageComponent>(); 3261 this.page.add(t); 3262 return this; 3263 } 3264 3265 /** 3266 * @return The first repetition of repeating field {@link #page}, creating it if it does not already exist 3267 */ 3268 public ImplementationGuideManifestPageComponent getPageFirstRep() { 3269 if (getPage().isEmpty()) { 3270 addPage(); 3271 } 3272 return getPage().get(0); 3273 } 3274 3275 /** 3276 * @return {@link #image} (Indicates a relative path to an image that exists within the IG.) 3277 */ 3278 public List<StringType> getImage() { 3279 if (this.image == null) 3280 this.image = new ArrayList<StringType>(); 3281 return this.image; 3282 } 3283 3284 /** 3285 * @return Returns a reference to <code>this</code> for easy method chaining 3286 */ 3287 public ImplementationGuideManifestComponent setImage(List<StringType> theImage) { 3288 this.image = theImage; 3289 return this; 3290 } 3291 3292 public boolean hasImage() { 3293 if (this.image == null) 3294 return false; 3295 for (StringType item : this.image) 3296 if (!item.isEmpty()) 3297 return true; 3298 return false; 3299 } 3300 3301 /** 3302 * @return {@link #image} (Indicates a relative path to an image that exists within the IG.) 3303 */ 3304 public StringType addImageElement() {//2 3305 StringType t = new StringType(); 3306 if (this.image == null) 3307 this.image = new ArrayList<StringType>(); 3308 this.image.add(t); 3309 return t; 3310 } 3311 3312 /** 3313 * @param value {@link #image} (Indicates a relative path to an image that exists within the IG.) 3314 */ 3315 public ImplementationGuideManifestComponent addImage(String value) { //1 3316 StringType t = new StringType(); 3317 t.setValue(value); 3318 if (this.image == null) 3319 this.image = new ArrayList<StringType>(); 3320 this.image.add(t); 3321 return this; 3322 } 3323 3324 /** 3325 * @param value {@link #image} (Indicates a relative path to an image that exists within the IG.) 3326 */ 3327 public boolean hasImage(String value) { 3328 if (this.image == null) 3329 return false; 3330 for (StringType v : this.image) 3331 if (v.getValue().equals(value)) // string 3332 return true; 3333 return false; 3334 } 3335 3336 /** 3337 * @return {@link #other} (Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.) 3338 */ 3339 public List<StringType> getOther() { 3340 if (this.other == null) 3341 this.other = new ArrayList<StringType>(); 3342 return this.other; 3343 } 3344 3345 /** 3346 * @return Returns a reference to <code>this</code> for easy method chaining 3347 */ 3348 public ImplementationGuideManifestComponent setOther(List<StringType> theOther) { 3349 this.other = theOther; 3350 return this; 3351 } 3352 3353 public boolean hasOther() { 3354 if (this.other == null) 3355 return false; 3356 for (StringType item : this.other) 3357 if (!item.isEmpty()) 3358 return true; 3359 return false; 3360 } 3361 3362 /** 3363 * @return {@link #other} (Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.) 3364 */ 3365 public StringType addOtherElement() {//2 3366 StringType t = new StringType(); 3367 if (this.other == null) 3368 this.other = new ArrayList<StringType>(); 3369 this.other.add(t); 3370 return t; 3371 } 3372 3373 /** 3374 * @param value {@link #other} (Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.) 3375 */ 3376 public ImplementationGuideManifestComponent addOther(String value) { //1 3377 StringType t = new StringType(); 3378 t.setValue(value); 3379 if (this.other == null) 3380 this.other = new ArrayList<StringType>(); 3381 this.other.add(t); 3382 return this; 3383 } 3384 3385 /** 3386 * @param value {@link #other} (Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.) 3387 */ 3388 public boolean hasOther(String value) { 3389 if (this.other == null) 3390 return false; 3391 for (StringType v : this.other) 3392 if (v.getValue().equals(value)) // string 3393 return true; 3394 return false; 3395 } 3396 3397 protected void listChildren(List<Property> children) { 3398 super.listChildren(children); 3399 children.add(new Property("rendering", "url", "A pointer to official web page, PDF or other rendering of the implementation guide.", 0, 1, rendering)); 3400 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)); 3401 children.add(new Property("page", "", "Information about a page within the IG.", 0, java.lang.Integer.MAX_VALUE, page)); 3402 children.add(new Property("image", "string", "Indicates a relative path to an image that exists within the IG.", 0, java.lang.Integer.MAX_VALUE, image)); 3403 children.add(new Property("other", "string", "Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.", 0, java.lang.Integer.MAX_VALUE, other)); 3404 } 3405 3406 @Override 3407 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3408 switch (_hash) { 3409 case 1839654540: /*rendering*/ return new Property("rendering", "url", "A pointer to official web page, PDF or other rendering of the implementation guide.", 0, 1, rendering); 3410 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); 3411 case 3433103: /*page*/ return new Property("page", "", "Information about a page within the IG.", 0, java.lang.Integer.MAX_VALUE, page); 3412 case 100313435: /*image*/ return new Property("image", "string", "Indicates a relative path to an image that exists within the IG.", 0, java.lang.Integer.MAX_VALUE, image); 3413 case 106069776: /*other*/ return new Property("other", "string", "Indicates the relative path of an additional non-page, non-image file that is part of the IG - e.g. zip, jar and similar files that could be the target of a hyperlink in a derived IG.", 0, java.lang.Integer.MAX_VALUE, other); 3414 default: return super.getNamedProperty(_hash, _name, _checkValid); 3415 } 3416 3417 } 3418 3419 @Override 3420 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3421 switch (hash) { 3422 case 1839654540: /*rendering*/ return this.rendering == null ? new Base[0] : new Base[] {this.rendering}; // UrlType 3423 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : this.resource.toArray(new Base[this.resource.size()]); // ImplementationGuideManifestResourceComponent 3424 case 3433103: /*page*/ return this.page == null ? new Base[0] : this.page.toArray(new Base[this.page.size()]); // ImplementationGuideManifestPageComponent 3425 case 100313435: /*image*/ return this.image == null ? new Base[0] : this.image.toArray(new Base[this.image.size()]); // StringType 3426 case 106069776: /*other*/ return this.other == null ? new Base[0] : this.other.toArray(new Base[this.other.size()]); // StringType 3427 default: return super.getProperty(hash, name, checkValid); 3428 } 3429 3430 } 3431 3432 @Override 3433 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3434 switch (hash) { 3435 case 1839654540: // rendering 3436 this.rendering = castToUrl(value); // UrlType 3437 return value; 3438 case -341064690: // resource 3439 this.getResource().add((ImplementationGuideManifestResourceComponent) value); // ImplementationGuideManifestResourceComponent 3440 return value; 3441 case 3433103: // page 3442 this.getPage().add((ImplementationGuideManifestPageComponent) value); // ImplementationGuideManifestPageComponent 3443 return value; 3444 case 100313435: // image 3445 this.getImage().add(castToString(value)); // StringType 3446 return value; 3447 case 106069776: // other 3448 this.getOther().add(castToString(value)); // StringType 3449 return value; 3450 default: return super.setProperty(hash, name, value); 3451 } 3452 3453 } 3454 3455 @Override 3456 public Base setProperty(String name, Base value) throws FHIRException { 3457 if (name.equals("rendering")) { 3458 this.rendering = castToUrl(value); // UrlType 3459 } else if (name.equals("resource")) { 3460 this.getResource().add((ImplementationGuideManifestResourceComponent) value); 3461 } else if (name.equals("page")) { 3462 this.getPage().add((ImplementationGuideManifestPageComponent) value); 3463 } else if (name.equals("image")) { 3464 this.getImage().add(castToString(value)); 3465 } else if (name.equals("other")) { 3466 this.getOther().add(castToString(value)); 3467 } else 3468 return super.setProperty(name, value); 3469 return value; 3470 } 3471 3472 @Override 3473 public Base makeProperty(int hash, String name) throws FHIRException { 3474 switch (hash) { 3475 case 1839654540: return getRenderingElement(); 3476 case -341064690: return addResource(); 3477 case 3433103: return addPage(); 3478 case 100313435: return addImageElement(); 3479 case 106069776: return addOtherElement(); 3480 default: return super.makeProperty(hash, name); 3481 } 3482 3483 } 3484 3485 @Override 3486 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3487 switch (hash) { 3488 case 1839654540: /*rendering*/ return new String[] {"url"}; 3489 case -341064690: /*resource*/ return new String[] {}; 3490 case 3433103: /*page*/ return new String[] {}; 3491 case 100313435: /*image*/ return new String[] {"string"}; 3492 case 106069776: /*other*/ return new String[] {"string"}; 3493 default: return super.getTypesForProperty(hash, name); 3494 } 3495 3496 } 3497 3498 @Override 3499 public Base addChild(String name) throws FHIRException { 3500 if (name.equals("rendering")) { 3501 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.rendering"); 3502 } 3503 else if (name.equals("resource")) { 3504 return addResource(); 3505 } 3506 else if (name.equals("page")) { 3507 return addPage(); 3508 } 3509 else if (name.equals("image")) { 3510 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.image"); 3511 } 3512 else if (name.equals("other")) { 3513 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.other"); 3514 } 3515 else 3516 return super.addChild(name); 3517 } 3518 3519 public ImplementationGuideManifestComponent copy() { 3520 ImplementationGuideManifestComponent dst = new ImplementationGuideManifestComponent(); 3521 copyValues(dst); 3522 dst.rendering = rendering == null ? null : rendering.copy(); 3523 if (resource != null) { 3524 dst.resource = new ArrayList<ImplementationGuideManifestResourceComponent>(); 3525 for (ImplementationGuideManifestResourceComponent i : resource) 3526 dst.resource.add(i.copy()); 3527 }; 3528 if (page != null) { 3529 dst.page = new ArrayList<ImplementationGuideManifestPageComponent>(); 3530 for (ImplementationGuideManifestPageComponent i : page) 3531 dst.page.add(i.copy()); 3532 }; 3533 if (image != null) { 3534 dst.image = new ArrayList<StringType>(); 3535 for (StringType i : image) 3536 dst.image.add(i.copy()); 3537 }; 3538 if (other != null) { 3539 dst.other = new ArrayList<StringType>(); 3540 for (StringType i : other) 3541 dst.other.add(i.copy()); 3542 }; 3543 return dst; 3544 } 3545 3546 @Override 3547 public boolean equalsDeep(Base other_) { 3548 if (!super.equalsDeep(other_)) 3549 return false; 3550 if (!(other_ instanceof ImplementationGuideManifestComponent)) 3551 return false; 3552 ImplementationGuideManifestComponent o = (ImplementationGuideManifestComponent) other_; 3553 return compareDeep(rendering, o.rendering, true) && compareDeep(resource, o.resource, true) && compareDeep(page, o.page, true) 3554 && compareDeep(image, o.image, true) && compareDeep(other, o.other, true); 3555 } 3556 3557 @Override 3558 public boolean equalsShallow(Base other_) { 3559 if (!super.equalsShallow(other_)) 3560 return false; 3561 if (!(other_ instanceof ImplementationGuideManifestComponent)) 3562 return false; 3563 ImplementationGuideManifestComponent o = (ImplementationGuideManifestComponent) other_; 3564 return compareValues(rendering, o.rendering, true) && compareValues(image, o.image, true) && compareValues(other, o.other, true) 3565 ; 3566 } 3567 3568 public boolean isEmpty() { 3569 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(rendering, resource, page 3570 , image, other); 3571 } 3572 3573 public String fhirType() { 3574 return "ImplementationGuide.manifest"; 3575 3576 } 3577 3578 } 3579 3580 @Block() 3581 public static class ImplementationGuideManifestResourceComponent extends BackboneElement implements IBaseBackboneElement { 3582 /** 3583 * Where this resource is found. 3584 */ 3585 @Child(name = "reference", type = {Reference.class}, order=1, min=1, max=1, modifier=false, summary=true) 3586 @Description(shortDefinition="Location of the resource", formalDefinition="Where this resource is found." ) 3587 protected Reference reference; 3588 3589 /** 3590 * The actual object that is the target of the reference (Where this resource is found.) 3591 */ 3592 protected Resource referenceTarget; 3593 3594 /** 3595 * If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile. 3596 */ 3597 @Child(name = "example", type = {BooleanType.class, CanonicalType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3598 @Description(shortDefinition="Is an example/What is this an example of?", formalDefinition="If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile." ) 3599 protected Type example; 3600 3601 /** 3602 * The relative path for primary page for this resource within the IG. 3603 */ 3604 @Child(name = "relativePath", type = {UrlType.class}, order=3, min=0, max=1, modifier=false, summary=false) 3605 @Description(shortDefinition="Relative path for page in IG", formalDefinition="The relative path for primary page for this resource within the IG." ) 3606 protected UrlType relativePath; 3607 3608 private static final long serialVersionUID = 1150095716L; 3609 3610 /** 3611 * Constructor 3612 */ 3613 public ImplementationGuideManifestResourceComponent() { 3614 super(); 3615 } 3616 3617 /** 3618 * Constructor 3619 */ 3620 public ImplementationGuideManifestResourceComponent(Reference reference) { 3621 super(); 3622 this.reference = reference; 3623 } 3624 3625 /** 3626 * @return {@link #reference} (Where this resource is found.) 3627 */ 3628 public Reference getReference() { 3629 if (this.reference == null) 3630 if (Configuration.errorOnAutoCreate()) 3631 throw new Error("Attempt to auto-create ImplementationGuideManifestResourceComponent.reference"); 3632 else if (Configuration.doAutoCreate()) 3633 this.reference = new Reference(); // cc 3634 return this.reference; 3635 } 3636 3637 public boolean hasReference() { 3638 return this.reference != null && !this.reference.isEmpty(); 3639 } 3640 3641 /** 3642 * @param value {@link #reference} (Where this resource is found.) 3643 */ 3644 public ImplementationGuideManifestResourceComponent setReference(Reference value) { 3645 this.reference = value; 3646 return this; 3647 } 3648 3649 /** 3650 * @return {@link #reference} 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. (Where this resource is found.) 3651 */ 3652 public Resource getReferenceTarget() { 3653 return this.referenceTarget; 3654 } 3655 3656 /** 3657 * @param value {@link #reference} 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. (Where this resource is found.) 3658 */ 3659 public ImplementationGuideManifestResourceComponent setReferenceTarget(Resource value) { 3660 this.referenceTarget = value; 3661 return this; 3662 } 3663 3664 /** 3665 * @return {@link #example} (If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.) 3666 */ 3667 public Type getExample() { 3668 return this.example; 3669 } 3670 3671 /** 3672 * @return {@link #example} (If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.) 3673 */ 3674 public BooleanType getExampleBooleanType() throws FHIRException { 3675 if (this.example == null) 3676 return null; 3677 if (!(this.example instanceof BooleanType)) 3678 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.example.getClass().getName()+" was encountered"); 3679 return (BooleanType) this.example; 3680 } 3681 3682 public boolean hasExampleBooleanType() { 3683 return this != null && this.example instanceof BooleanType; 3684 } 3685 3686 /** 3687 * @return {@link #example} (If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.) 3688 */ 3689 public CanonicalType getExampleCanonicalType() throws FHIRException { 3690 if (this.example == null) 3691 return null; 3692 if (!(this.example instanceof CanonicalType)) 3693 throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.example.getClass().getName()+" was encountered"); 3694 return (CanonicalType) this.example; 3695 } 3696 3697 public boolean hasExampleCanonicalType() { 3698 return this != null && this.example instanceof CanonicalType; 3699 } 3700 3701 public boolean hasExample() { 3702 return this.example != null && !this.example.isEmpty(); 3703 } 3704 3705 /** 3706 * @param value {@link #example} (If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.) 3707 */ 3708 public ImplementationGuideManifestResourceComponent setExample(Type value) { 3709 if (value != null && !(value instanceof BooleanType || value instanceof CanonicalType)) 3710 throw new Error("Not the right type for ImplementationGuide.manifest.resource.example[x]: "+value.fhirType()); 3711 this.example = value; 3712 return this; 3713 } 3714 3715 /** 3716 * @return {@link #relativePath} (The relative path for primary page for this resource within the IG.). This is the underlying object with id, value and extensions. The accessor "getRelativePath" gives direct access to the value 3717 */ 3718 public UrlType getRelativePathElement() { 3719 if (this.relativePath == null) 3720 if (Configuration.errorOnAutoCreate()) 3721 throw new Error("Attempt to auto-create ImplementationGuideManifestResourceComponent.relativePath"); 3722 else if (Configuration.doAutoCreate()) 3723 this.relativePath = new UrlType(); // bb 3724 return this.relativePath; 3725 } 3726 3727 public boolean hasRelativePathElement() { 3728 return this.relativePath != null && !this.relativePath.isEmpty(); 3729 } 3730 3731 public boolean hasRelativePath() { 3732 return this.relativePath != null && !this.relativePath.isEmpty(); 3733 } 3734 3735 /** 3736 * @param value {@link #relativePath} (The relative path for primary page for this resource within the IG.). This is the underlying object with id, value and extensions. The accessor "getRelativePath" gives direct access to the value 3737 */ 3738 public ImplementationGuideManifestResourceComponent setRelativePathElement(UrlType value) { 3739 this.relativePath = value; 3740 return this; 3741 } 3742 3743 /** 3744 * @return The relative path for primary page for this resource within the IG. 3745 */ 3746 public String getRelativePath() { 3747 return this.relativePath == null ? null : this.relativePath.getValue(); 3748 } 3749 3750 /** 3751 * @param value The relative path for primary page for this resource within the IG. 3752 */ 3753 public ImplementationGuideManifestResourceComponent setRelativePath(String value) { 3754 if (Utilities.noString(value)) 3755 this.relativePath = null; 3756 else { 3757 if (this.relativePath == null) 3758 this.relativePath = new UrlType(); 3759 this.relativePath.setValue(value); 3760 } 3761 return this; 3762 } 3763 3764 protected void listChildren(List<Property> children) { 3765 super.listChildren(children); 3766 children.add(new Property("reference", "Reference(Any)", "Where this resource is found.", 0, 1, reference)); 3767 children.add(new Property("example[x]", "boolean|canonical(StructureDefinition)", "If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", 0, 1, example)); 3768 children.add(new Property("relativePath", "url", "The relative path for primary page for this resource within the IG.", 0, 1, relativePath)); 3769 } 3770 3771 @Override 3772 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 3773 switch (_hash) { 3774 case -925155509: /*reference*/ return new Property("reference", "Reference(Any)", "Where this resource is found.", 0, 1, reference); 3775 case -2002328874: /*example[x]*/ return new Property("example[x]", "boolean|canonical(StructureDefinition)", "If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", 0, 1, example); 3776 case -1322970774: /*example*/ return new Property("example[x]", "boolean|canonical(StructureDefinition)", "If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", 0, 1, example); 3777 case 159803230: /*exampleBoolean*/ return new Property("example[x]", "boolean|canonical(StructureDefinition)", "If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", 0, 1, example); 3778 case 2016979626: /*exampleCanonical*/ return new Property("example[x]", "boolean|canonical(StructureDefinition)", "If true or a reference, indicates the resource is an example instance. If a reference is present, indicates that the example is an example of the specified profile.", 0, 1, example); 3779 case -70808303: /*relativePath*/ return new Property("relativePath", "url", "The relative path for primary page for this resource within the IG.", 0, 1, relativePath); 3780 default: return super.getNamedProperty(_hash, _name, _checkValid); 3781 } 3782 3783 } 3784 3785 @Override 3786 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 3787 switch (hash) { 3788 case -925155509: /*reference*/ return this.reference == null ? new Base[0] : new Base[] {this.reference}; // Reference 3789 case -1322970774: /*example*/ return this.example == null ? new Base[0] : new Base[] {this.example}; // Type 3790 case -70808303: /*relativePath*/ return this.relativePath == null ? new Base[0] : new Base[] {this.relativePath}; // UrlType 3791 default: return super.getProperty(hash, name, checkValid); 3792 } 3793 3794 } 3795 3796 @Override 3797 public Base setProperty(int hash, String name, Base value) throws FHIRException { 3798 switch (hash) { 3799 case -925155509: // reference 3800 this.reference = castToReference(value); // Reference 3801 return value; 3802 case -1322970774: // example 3803 this.example = castToType(value); // Type 3804 return value; 3805 case -70808303: // relativePath 3806 this.relativePath = castToUrl(value); // UrlType 3807 return value; 3808 default: return super.setProperty(hash, name, value); 3809 } 3810 3811 } 3812 3813 @Override 3814 public Base setProperty(String name, Base value) throws FHIRException { 3815 if (name.equals("reference")) { 3816 this.reference = castToReference(value); // Reference 3817 } else if (name.equals("example[x]")) { 3818 this.example = castToType(value); // Type 3819 } else if (name.equals("relativePath")) { 3820 this.relativePath = castToUrl(value); // UrlType 3821 } else 3822 return super.setProperty(name, value); 3823 return value; 3824 } 3825 3826 @Override 3827 public Base makeProperty(int hash, String name) throws FHIRException { 3828 switch (hash) { 3829 case -925155509: return getReference(); 3830 case -2002328874: return getExample(); 3831 case -1322970774: return getExample(); 3832 case -70808303: return getRelativePathElement(); 3833 default: return super.makeProperty(hash, name); 3834 } 3835 3836 } 3837 3838 @Override 3839 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 3840 switch (hash) { 3841 case -925155509: /*reference*/ return new String[] {"Reference"}; 3842 case -1322970774: /*example*/ return new String[] {"boolean", "canonical"}; 3843 case -70808303: /*relativePath*/ return new String[] {"url"}; 3844 default: return super.getTypesForProperty(hash, name); 3845 } 3846 3847 } 3848 3849 @Override 3850 public Base addChild(String name) throws FHIRException { 3851 if (name.equals("reference")) { 3852 this.reference = new Reference(); 3853 return this.reference; 3854 } 3855 else if (name.equals("exampleBoolean")) { 3856 this.example = new BooleanType(); 3857 return this.example; 3858 } 3859 else if (name.equals("exampleCanonical")) { 3860 this.example = new CanonicalType(); 3861 return this.example; 3862 } 3863 else if (name.equals("relativePath")) { 3864 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.relativePath"); 3865 } 3866 else 3867 return super.addChild(name); 3868 } 3869 3870 public ImplementationGuideManifestResourceComponent copy() { 3871 ImplementationGuideManifestResourceComponent dst = new ImplementationGuideManifestResourceComponent(); 3872 copyValues(dst); 3873 dst.reference = reference == null ? null : reference.copy(); 3874 dst.example = example == null ? null : example.copy(); 3875 dst.relativePath = relativePath == null ? null : relativePath.copy(); 3876 return dst; 3877 } 3878 3879 @Override 3880 public boolean equalsDeep(Base other_) { 3881 if (!super.equalsDeep(other_)) 3882 return false; 3883 if (!(other_ instanceof ImplementationGuideManifestResourceComponent)) 3884 return false; 3885 ImplementationGuideManifestResourceComponent o = (ImplementationGuideManifestResourceComponent) other_; 3886 return compareDeep(reference, o.reference, true) && compareDeep(example, o.example, true) && compareDeep(relativePath, o.relativePath, true) 3887 ; 3888 } 3889 3890 @Override 3891 public boolean equalsShallow(Base other_) { 3892 if (!super.equalsShallow(other_)) 3893 return false; 3894 if (!(other_ instanceof ImplementationGuideManifestResourceComponent)) 3895 return false; 3896 ImplementationGuideManifestResourceComponent o = (ImplementationGuideManifestResourceComponent) other_; 3897 return compareValues(relativePath, o.relativePath, true); 3898 } 3899 3900 public boolean isEmpty() { 3901 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(reference, example, relativePath 3902 ); 3903 } 3904 3905 public String fhirType() { 3906 return "ImplementationGuide.manifest.resource"; 3907 3908 } 3909 3910 } 3911 3912 @Block() 3913 public static class ImplementationGuideManifestPageComponent extends BackboneElement implements IBaseBackboneElement { 3914 /** 3915 * Relative path to the page. 3916 */ 3917 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=false) 3918 @Description(shortDefinition="HTML page name", formalDefinition="Relative path to the page." ) 3919 protected StringType name; 3920 3921 /** 3922 * Label for the page intended for human display. 3923 */ 3924 @Child(name = "title", type = {StringType.class}, order=2, min=0, max=1, modifier=false, summary=false) 3925 @Description(shortDefinition="Title of the page, for references", formalDefinition="Label for the page intended for human display." ) 3926 protected StringType title; 3927 3928 /** 3929 * The name of an anchor available on the page. 3930 */ 3931 @Child(name = "anchor", type = {StringType.class}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=false) 3932 @Description(shortDefinition="Anchor available on the page", formalDefinition="The name of an anchor available on the page." ) 3933 protected List<StringType> anchor; 3934 3935 private static final long serialVersionUID = 1920576611L; 3936 3937 /** 3938 * Constructor 3939 */ 3940 public ImplementationGuideManifestPageComponent() { 3941 super(); 3942 } 3943 3944 /** 3945 * Constructor 3946 */ 3947 public ImplementationGuideManifestPageComponent(StringType name) { 3948 super(); 3949 this.name = name; 3950 } 3951 3952 /** 3953 * @return {@link #name} (Relative path to the page.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 3954 */ 3955 public StringType getNameElement() { 3956 if (this.name == null) 3957 if (Configuration.errorOnAutoCreate()) 3958 throw new Error("Attempt to auto-create ImplementationGuideManifestPageComponent.name"); 3959 else if (Configuration.doAutoCreate()) 3960 this.name = new StringType(); // bb 3961 return this.name; 3962 } 3963 3964 public boolean hasNameElement() { 3965 return this.name != null && !this.name.isEmpty(); 3966 } 3967 3968 public boolean hasName() { 3969 return this.name != null && !this.name.isEmpty(); 3970 } 3971 3972 /** 3973 * @param value {@link #name} (Relative path to the page.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 3974 */ 3975 public ImplementationGuideManifestPageComponent setNameElement(StringType value) { 3976 this.name = value; 3977 return this; 3978 } 3979 3980 /** 3981 * @return Relative path to the page. 3982 */ 3983 public String getName() { 3984 return this.name == null ? null : this.name.getValue(); 3985 } 3986 3987 /** 3988 * @param value Relative path to the page. 3989 */ 3990 public ImplementationGuideManifestPageComponent setName(String value) { 3991 if (this.name == null) 3992 this.name = new StringType(); 3993 this.name.setValue(value); 3994 return this; 3995 } 3996 3997 /** 3998 * @return {@link #title} (Label for the page intended for human display.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 3999 */ 4000 public StringType getTitleElement() { 4001 if (this.title == null) 4002 if (Configuration.errorOnAutoCreate()) 4003 throw new Error("Attempt to auto-create ImplementationGuideManifestPageComponent.title"); 4004 else if (Configuration.doAutoCreate()) 4005 this.title = new StringType(); // bb 4006 return this.title; 4007 } 4008 4009 public boolean hasTitleElement() { 4010 return this.title != null && !this.title.isEmpty(); 4011 } 4012 4013 public boolean hasTitle() { 4014 return this.title != null && !this.title.isEmpty(); 4015 } 4016 4017 /** 4018 * @param value {@link #title} (Label for the page intended for human display.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 4019 */ 4020 public ImplementationGuideManifestPageComponent setTitleElement(StringType value) { 4021 this.title = value; 4022 return this; 4023 } 4024 4025 /** 4026 * @return Label for the page intended for human display. 4027 */ 4028 public String getTitle() { 4029 return this.title == null ? null : this.title.getValue(); 4030 } 4031 4032 /** 4033 * @param value Label for the page intended for human display. 4034 */ 4035 public ImplementationGuideManifestPageComponent setTitle(String value) { 4036 if (Utilities.noString(value)) 4037 this.title = null; 4038 else { 4039 if (this.title == null) 4040 this.title = new StringType(); 4041 this.title.setValue(value); 4042 } 4043 return this; 4044 } 4045 4046 /** 4047 * @return {@link #anchor} (The name of an anchor available on the page.) 4048 */ 4049 public List<StringType> getAnchor() { 4050 if (this.anchor == null) 4051 this.anchor = new ArrayList<StringType>(); 4052 return this.anchor; 4053 } 4054 4055 /** 4056 * @return Returns a reference to <code>this</code> for easy method chaining 4057 */ 4058 public ImplementationGuideManifestPageComponent setAnchor(List<StringType> theAnchor) { 4059 this.anchor = theAnchor; 4060 return this; 4061 } 4062 4063 public boolean hasAnchor() { 4064 if (this.anchor == null) 4065 return false; 4066 for (StringType item : this.anchor) 4067 if (!item.isEmpty()) 4068 return true; 4069 return false; 4070 } 4071 4072 /** 4073 * @return {@link #anchor} (The name of an anchor available on the page.) 4074 */ 4075 public StringType addAnchorElement() {//2 4076 StringType t = new StringType(); 4077 if (this.anchor == null) 4078 this.anchor = new ArrayList<StringType>(); 4079 this.anchor.add(t); 4080 return t; 4081 } 4082 4083 /** 4084 * @param value {@link #anchor} (The name of an anchor available on the page.) 4085 */ 4086 public ImplementationGuideManifestPageComponent addAnchor(String value) { //1 4087 StringType t = new StringType(); 4088 t.setValue(value); 4089 if (this.anchor == null) 4090 this.anchor = new ArrayList<StringType>(); 4091 this.anchor.add(t); 4092 return this; 4093 } 4094 4095 /** 4096 * @param value {@link #anchor} (The name of an anchor available on the page.) 4097 */ 4098 public boolean hasAnchor(String value) { 4099 if (this.anchor == null) 4100 return false; 4101 for (StringType v : this.anchor) 4102 if (v.getValue().equals(value)) // string 4103 return true; 4104 return false; 4105 } 4106 4107 protected void listChildren(List<Property> children) { 4108 super.listChildren(children); 4109 children.add(new Property("name", "string", "Relative path to the page.", 0, 1, name)); 4110 children.add(new Property("title", "string", "Label for the page intended for human display.", 0, 1, title)); 4111 children.add(new Property("anchor", "string", "The name of an anchor available on the page.", 0, java.lang.Integer.MAX_VALUE, anchor)); 4112 } 4113 4114 @Override 4115 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 4116 switch (_hash) { 4117 case 3373707: /*name*/ return new Property("name", "string", "Relative path to the page.", 0, 1, name); 4118 case 110371416: /*title*/ return new Property("title", "string", "Label for the page intended for human display.", 0, 1, title); 4119 case -1413299531: /*anchor*/ return new Property("anchor", "string", "The name of an anchor available on the page.", 0, java.lang.Integer.MAX_VALUE, anchor); 4120 default: return super.getNamedProperty(_hash, _name, _checkValid); 4121 } 4122 4123 } 4124 4125 @Override 4126 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 4127 switch (hash) { 4128 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 4129 case 110371416: /*title*/ return this.title == null ? new Base[0] : new Base[] {this.title}; // StringType 4130 case -1413299531: /*anchor*/ return this.anchor == null ? new Base[0] : this.anchor.toArray(new Base[this.anchor.size()]); // StringType 4131 default: return super.getProperty(hash, name, checkValid); 4132 } 4133 4134 } 4135 4136 @Override 4137 public Base setProperty(int hash, String name, Base value) throws FHIRException { 4138 switch (hash) { 4139 case 3373707: // name 4140 this.name = castToString(value); // StringType 4141 return value; 4142 case 110371416: // title 4143 this.title = castToString(value); // StringType 4144 return value; 4145 case -1413299531: // anchor 4146 this.getAnchor().add(castToString(value)); // StringType 4147 return value; 4148 default: return super.setProperty(hash, name, value); 4149 } 4150 4151 } 4152 4153 @Override 4154 public Base setProperty(String name, Base value) throws FHIRException { 4155 if (name.equals("name")) { 4156 this.name = castToString(value); // StringType 4157 } else if (name.equals("title")) { 4158 this.title = castToString(value); // StringType 4159 } else if (name.equals("anchor")) { 4160 this.getAnchor().add(castToString(value)); 4161 } else 4162 return super.setProperty(name, value); 4163 return value; 4164 } 4165 4166 @Override 4167 public Base makeProperty(int hash, String name) throws FHIRException { 4168 switch (hash) { 4169 case 3373707: return getNameElement(); 4170 case 110371416: return getTitleElement(); 4171 case -1413299531: return addAnchorElement(); 4172 default: return super.makeProperty(hash, name); 4173 } 4174 4175 } 4176 4177 @Override 4178 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 4179 switch (hash) { 4180 case 3373707: /*name*/ return new String[] {"string"}; 4181 case 110371416: /*title*/ return new String[] {"string"}; 4182 case -1413299531: /*anchor*/ return new String[] {"string"}; 4183 default: return super.getTypesForProperty(hash, name); 4184 } 4185 4186 } 4187 4188 @Override 4189 public Base addChild(String name) throws FHIRException { 4190 if (name.equals("name")) { 4191 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); 4192 } 4193 else if (name.equals("title")) { 4194 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.title"); 4195 } 4196 else if (name.equals("anchor")) { 4197 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.anchor"); 4198 } 4199 else 4200 return super.addChild(name); 4201 } 4202 4203 public ImplementationGuideManifestPageComponent copy() { 4204 ImplementationGuideManifestPageComponent dst = new ImplementationGuideManifestPageComponent(); 4205 copyValues(dst); 4206 dst.name = name == null ? null : name.copy(); 4207 dst.title = title == null ? null : title.copy(); 4208 if (anchor != null) { 4209 dst.anchor = new ArrayList<StringType>(); 4210 for (StringType i : anchor) 4211 dst.anchor.add(i.copy()); 4212 }; 4213 return dst; 4214 } 4215 4216 @Override 4217 public boolean equalsDeep(Base other_) { 4218 if (!super.equalsDeep(other_)) 4219 return false; 4220 if (!(other_ instanceof ImplementationGuideManifestPageComponent)) 4221 return false; 4222 ImplementationGuideManifestPageComponent o = (ImplementationGuideManifestPageComponent) other_; 4223 return compareDeep(name, o.name, true) && compareDeep(title, o.title, true) && compareDeep(anchor, o.anchor, true) 4224 ; 4225 } 4226 4227 @Override 4228 public boolean equalsShallow(Base other_) { 4229 if (!super.equalsShallow(other_)) 4230 return false; 4231 if (!(other_ instanceof ImplementationGuideManifestPageComponent)) 4232 return false; 4233 ImplementationGuideManifestPageComponent o = (ImplementationGuideManifestPageComponent) other_; 4234 return compareValues(name, o.name, true) && compareValues(title, o.title, true) && compareValues(anchor, o.anchor, true) 4235 ; 4236 } 4237 4238 public boolean isEmpty() { 4239 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, title, anchor); 4240 } 4241 4242 public String fhirType() { 4243 return "ImplementationGuide.manifest.page"; 4244 4245 } 4246 4247 } 4248 4249 /** 4250 * 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. 4251 */ 4252 @Child(name = "copyright", type = {MarkdownType.class}, order=0, min=0, max=1, modifier=false, summary=false) 4253 @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." ) 4254 protected MarkdownType copyright; 4255 4256 /** 4257 * 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.4.0 for this version. 4258 */ 4259 @Child(name = "fhirVersion", type = {IdType.class}, order=1, min=0, max=1, modifier=false, summary=true) 4260 @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.4.0 for this version." ) 4261 @ca.uhn.fhir.model.api.annotation.Binding(valueSet="http://hl7.org/fhir/ValueSet/fhir-versions") 4262 protected IdType fhirVersion; 4263 4264 /** 4265 * Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides. 4266 */ 4267 @Child(name = "dependsOn", type = {}, order=2, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4268 @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." ) 4269 protected List<ImplementationGuideDependsOnComponent> dependsOn; 4270 4271 /** 4272 * A set of profiles that all resources covered by this implementation guide must conform to. 4273 */ 4274 @Child(name = "global", type = {}, order=3, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 4275 @Description(shortDefinition="Profiles that apply globally", formalDefinition="A set of profiles that all resources covered by this implementation guide must conform to." ) 4276 protected List<ImplementationGuideGlobalComponent> global; 4277 4278 /** 4279 * The information needed by an IG publisher tool to publish the whole implementation guide. 4280 */ 4281 @Child(name = "definition", type = {}, order=4, min=0, max=1, modifier=false, summary=false) 4282 @Description(shortDefinition="Information needed to build the IG", formalDefinition="The information needed by an IG publisher tool to publish the whole implementation guide." ) 4283 protected ImplementationGuideDefinitionComponent definition; 4284 4285 /** 4286 * Information about an assembled implementation guide, created by the publication tooling. 4287 */ 4288 @Child(name = "manifest", type = {}, order=5, min=0, max=1, modifier=false, summary=false) 4289 @Description(shortDefinition="Information about an assembled IG", formalDefinition="Information about an assembled implementation guide, created by the publication tooling." ) 4290 protected ImplementationGuideManifestComponent manifest; 4291 4292 private static final long serialVersionUID = 1856906052L; 4293 4294 /** 4295 * Constructor 4296 */ 4297 public ImplementationGuide() { 4298 super(); 4299 } 4300 4301 /** 4302 * Constructor 4303 */ 4304 public ImplementationGuide(UriType url, StringType name, Enumeration<PublicationStatus> status) { 4305 super(); 4306 this.url = url; 4307 this.name = name; 4308 this.status = status; 4309 } 4310 4311 /** 4312 * @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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this implementation guide is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 4313 */ 4314 public UriType getUrlElement() { 4315 if (this.url == null) 4316 if (Configuration.errorOnAutoCreate()) 4317 throw new Error("Attempt to auto-create ImplementationGuide.url"); 4318 else if (Configuration.doAutoCreate()) 4319 this.url = new UriType(); // bb 4320 return this.url; 4321 } 4322 4323 public boolean hasUrlElement() { 4324 return this.url != null && !this.url.isEmpty(); 4325 } 4326 4327 public boolean hasUrl() { 4328 return this.url != null && !this.url.isEmpty(); 4329 } 4330 4331 /** 4332 * @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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this implementation guide is (or will be) published.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 4333 */ 4334 public ImplementationGuide setUrlElement(UriType value) { 4335 this.url = value; 4336 return this; 4337 } 4338 4339 /** 4340 * @return An absolute URI that is used to identify this implementation guide when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this implementation guide is (or will be) published. 4341 */ 4342 public String getUrl() { 4343 return this.url == null ? null : this.url.getValue(); 4344 } 4345 4346 /** 4347 * @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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this implementation guide is (or will be) published. 4348 */ 4349 public ImplementationGuide setUrl(String value) { 4350 if (this.url == null) 4351 this.url = new UriType(); 4352 this.url.setValue(value); 4353 return this; 4354 } 4355 4356 /** 4357 * @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 4358 */ 4359 public StringType getVersionElement() { 4360 if (this.version == null) 4361 if (Configuration.errorOnAutoCreate()) 4362 throw new Error("Attempt to auto-create ImplementationGuide.version"); 4363 else if (Configuration.doAutoCreate()) 4364 this.version = new StringType(); // bb 4365 return this.version; 4366 } 4367 4368 public boolean hasVersionElement() { 4369 return this.version != null && !this.version.isEmpty(); 4370 } 4371 4372 public boolean hasVersion() { 4373 return this.version != null && !this.version.isEmpty(); 4374 } 4375 4376 /** 4377 * @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 4378 */ 4379 public ImplementationGuide setVersionElement(StringType value) { 4380 this.version = value; 4381 return this; 4382 } 4383 4384 /** 4385 * @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. 4386 */ 4387 public String getVersion() { 4388 return this.version == null ? null : this.version.getValue(); 4389 } 4390 4391 /** 4392 * @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. 4393 */ 4394 public ImplementationGuide setVersion(String value) { 4395 if (Utilities.noString(value)) 4396 this.version = null; 4397 else { 4398 if (this.version == null) 4399 this.version = new StringType(); 4400 this.version.setValue(value); 4401 } 4402 return this; 4403 } 4404 4405 /** 4406 * @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 4407 */ 4408 public StringType getNameElement() { 4409 if (this.name == null) 4410 if (Configuration.errorOnAutoCreate()) 4411 throw new Error("Attempt to auto-create ImplementationGuide.name"); 4412 else if (Configuration.doAutoCreate()) 4413 this.name = new StringType(); // bb 4414 return this.name; 4415 } 4416 4417 public boolean hasNameElement() { 4418 return this.name != null && !this.name.isEmpty(); 4419 } 4420 4421 public boolean hasName() { 4422 return this.name != null && !this.name.isEmpty(); 4423 } 4424 4425 /** 4426 * @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 4427 */ 4428 public ImplementationGuide setNameElement(StringType value) { 4429 this.name = value; 4430 return this; 4431 } 4432 4433 /** 4434 * @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. 4435 */ 4436 public String getName() { 4437 return this.name == null ? null : this.name.getValue(); 4438 } 4439 4440 /** 4441 * @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. 4442 */ 4443 public ImplementationGuide setName(String value) { 4444 if (this.name == null) 4445 this.name = new StringType(); 4446 this.name.setValue(value); 4447 return this; 4448 } 4449 4450 /** 4451 * @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 4452 */ 4453 public Enumeration<PublicationStatus> getStatusElement() { 4454 if (this.status == null) 4455 if (Configuration.errorOnAutoCreate()) 4456 throw new Error("Attempt to auto-create ImplementationGuide.status"); 4457 else if (Configuration.doAutoCreate()) 4458 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); // bb 4459 return this.status; 4460 } 4461 4462 public boolean hasStatusElement() { 4463 return this.status != null && !this.status.isEmpty(); 4464 } 4465 4466 public boolean hasStatus() { 4467 return this.status != null && !this.status.isEmpty(); 4468 } 4469 4470 /** 4471 * @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 4472 */ 4473 public ImplementationGuide setStatusElement(Enumeration<PublicationStatus> value) { 4474 this.status = value; 4475 return this; 4476 } 4477 4478 /** 4479 * @return The status of this implementation guide. Enables tracking the life-cycle of the content. 4480 */ 4481 public PublicationStatus getStatus() { 4482 return this.status == null ? null : this.status.getValue(); 4483 } 4484 4485 /** 4486 * @param value The status of this implementation guide. Enables tracking the life-cycle of the content. 4487 */ 4488 public ImplementationGuide setStatus(PublicationStatus value) { 4489 if (this.status == null) 4490 this.status = new Enumeration<PublicationStatus>(new PublicationStatusEnumFactory()); 4491 this.status.setValue(value); 4492 return this; 4493 } 4494 4495 /** 4496 * @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 4497 */ 4498 public BooleanType getExperimentalElement() { 4499 if (this.experimental == null) 4500 if (Configuration.errorOnAutoCreate()) 4501 throw new Error("Attempt to auto-create ImplementationGuide.experimental"); 4502 else if (Configuration.doAutoCreate()) 4503 this.experimental = new BooleanType(); // bb 4504 return this.experimental; 4505 } 4506 4507 public boolean hasExperimentalElement() { 4508 return this.experimental != null && !this.experimental.isEmpty(); 4509 } 4510 4511 public boolean hasExperimental() { 4512 return this.experimental != null && !this.experimental.isEmpty(); 4513 } 4514 4515 /** 4516 * @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 4517 */ 4518 public ImplementationGuide setExperimentalElement(BooleanType value) { 4519 this.experimental = value; 4520 return this; 4521 } 4522 4523 /** 4524 * @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. 4525 */ 4526 public boolean getExperimental() { 4527 return this.experimental == null || this.experimental.isEmpty() ? false : this.experimental.getValue(); 4528 } 4529 4530 /** 4531 * @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. 4532 */ 4533 public ImplementationGuide setExperimental(boolean value) { 4534 if (this.experimental == null) 4535 this.experimental = new BooleanType(); 4536 this.experimental.setValue(value); 4537 return this; 4538 } 4539 4540 /** 4541 * @return {@link #date} (The date (and optionally time) when the implementation guide was published. The date must change 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 4542 */ 4543 public DateTimeType getDateElement() { 4544 if (this.date == null) 4545 if (Configuration.errorOnAutoCreate()) 4546 throw new Error("Attempt to auto-create ImplementationGuide.date"); 4547 else if (Configuration.doAutoCreate()) 4548 this.date = new DateTimeType(); // bb 4549 return this.date; 4550 } 4551 4552 public boolean hasDateElement() { 4553 return this.date != null && !this.date.isEmpty(); 4554 } 4555 4556 public boolean hasDate() { 4557 return this.date != null && !this.date.isEmpty(); 4558 } 4559 4560 /** 4561 * @param value {@link #date} (The date (and optionally time) when the implementation guide was published. The date must change 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 4562 */ 4563 public ImplementationGuide setDateElement(DateTimeType value) { 4564 this.date = value; 4565 return this; 4566 } 4567 4568 /** 4569 * @return The date (and optionally time) when the implementation guide was published. The date must change 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. 4570 */ 4571 public Date getDate() { 4572 return this.date == null ? null : this.date.getValue(); 4573 } 4574 4575 /** 4576 * @param value The date (and optionally time) when the implementation guide was published. The date must change 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. 4577 */ 4578 public ImplementationGuide setDate(Date value) { 4579 if (value == null) 4580 this.date = null; 4581 else { 4582 if (this.date == null) 4583 this.date = new DateTimeType(); 4584 this.date.setValue(value); 4585 } 4586 return this; 4587 } 4588 4589 /** 4590 * @return {@link #publisher} (The name of the organization or individual that published the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 4591 */ 4592 public StringType getPublisherElement() { 4593 if (this.publisher == null) 4594 if (Configuration.errorOnAutoCreate()) 4595 throw new Error("Attempt to auto-create ImplementationGuide.publisher"); 4596 else if (Configuration.doAutoCreate()) 4597 this.publisher = new StringType(); // bb 4598 return this.publisher; 4599 } 4600 4601 public boolean hasPublisherElement() { 4602 return this.publisher != null && !this.publisher.isEmpty(); 4603 } 4604 4605 public boolean hasPublisher() { 4606 return this.publisher != null && !this.publisher.isEmpty(); 4607 } 4608 4609 /** 4610 * @param value {@link #publisher} (The name of the organization or individual that published the implementation guide.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 4611 */ 4612 public ImplementationGuide setPublisherElement(StringType value) { 4613 this.publisher = value; 4614 return this; 4615 } 4616 4617 /** 4618 * @return The name of the organization or individual that published the implementation guide. 4619 */ 4620 public String getPublisher() { 4621 return this.publisher == null ? null : this.publisher.getValue(); 4622 } 4623 4624 /** 4625 * @param value The name of the organization or individual that published the implementation guide. 4626 */ 4627 public ImplementationGuide setPublisher(String value) { 4628 if (Utilities.noString(value)) 4629 this.publisher = null; 4630 else { 4631 if (this.publisher == null) 4632 this.publisher = new StringType(); 4633 this.publisher.setValue(value); 4634 } 4635 return this; 4636 } 4637 4638 /** 4639 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 4640 */ 4641 public List<ContactDetail> getContact() { 4642 if (this.contact == null) 4643 this.contact = new ArrayList<ContactDetail>(); 4644 return this.contact; 4645 } 4646 4647 /** 4648 * @return Returns a reference to <code>this</code> for easy method chaining 4649 */ 4650 public ImplementationGuide setContact(List<ContactDetail> theContact) { 4651 this.contact = theContact; 4652 return this; 4653 } 4654 4655 public boolean hasContact() { 4656 if (this.contact == null) 4657 return false; 4658 for (ContactDetail item : this.contact) 4659 if (!item.isEmpty()) 4660 return true; 4661 return false; 4662 } 4663 4664 public ContactDetail addContact() { //3 4665 ContactDetail t = new ContactDetail(); 4666 if (this.contact == null) 4667 this.contact = new ArrayList<ContactDetail>(); 4668 this.contact.add(t); 4669 return t; 4670 } 4671 4672 public ImplementationGuide addContact(ContactDetail t) { //3 4673 if (t == null) 4674 return this; 4675 if (this.contact == null) 4676 this.contact = new ArrayList<ContactDetail>(); 4677 this.contact.add(t); 4678 return this; 4679 } 4680 4681 /** 4682 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist 4683 */ 4684 public ContactDetail getContactFirstRep() { 4685 if (getContact().isEmpty()) { 4686 addContact(); 4687 } 4688 return getContact().get(0); 4689 } 4690 4691 /** 4692 * @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 4693 */ 4694 public MarkdownType getDescriptionElement() { 4695 if (this.description == null) 4696 if (Configuration.errorOnAutoCreate()) 4697 throw new Error("Attempt to auto-create ImplementationGuide.description"); 4698 else if (Configuration.doAutoCreate()) 4699 this.description = new MarkdownType(); // bb 4700 return this.description; 4701 } 4702 4703 public boolean hasDescriptionElement() { 4704 return this.description != null && !this.description.isEmpty(); 4705 } 4706 4707 public boolean hasDescription() { 4708 return this.description != null && !this.description.isEmpty(); 4709 } 4710 4711 /** 4712 * @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 4713 */ 4714 public ImplementationGuide setDescriptionElement(MarkdownType value) { 4715 this.description = value; 4716 return this; 4717 } 4718 4719 /** 4720 * @return A free text natural language description of the implementation guide from a consumer's perspective. 4721 */ 4722 public String getDescription() { 4723 return this.description == null ? null : this.description.getValue(); 4724 } 4725 4726 /** 4727 * @param value A free text natural language description of the implementation guide from a consumer's perspective. 4728 */ 4729 public ImplementationGuide setDescription(String value) { 4730 if (value == null) 4731 this.description = null; 4732 else { 4733 if (this.description == null) 4734 this.description = new MarkdownType(); 4735 this.description.setValue(value); 4736 } 4737 return this; 4738 } 4739 4740 /** 4741 * @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.) 4742 */ 4743 public List<UsageContext> getUseContext() { 4744 if (this.useContext == null) 4745 this.useContext = new ArrayList<UsageContext>(); 4746 return this.useContext; 4747 } 4748 4749 /** 4750 * @return Returns a reference to <code>this</code> for easy method chaining 4751 */ 4752 public ImplementationGuide setUseContext(List<UsageContext> theUseContext) { 4753 this.useContext = theUseContext; 4754 return this; 4755 } 4756 4757 public boolean hasUseContext() { 4758 if (this.useContext == null) 4759 return false; 4760 for (UsageContext item : this.useContext) 4761 if (!item.isEmpty()) 4762 return true; 4763 return false; 4764 } 4765 4766 public UsageContext addUseContext() { //3 4767 UsageContext t = new UsageContext(); 4768 if (this.useContext == null) 4769 this.useContext = new ArrayList<UsageContext>(); 4770 this.useContext.add(t); 4771 return t; 4772 } 4773 4774 public ImplementationGuide addUseContext(UsageContext t) { //3 4775 if (t == null) 4776 return this; 4777 if (this.useContext == null) 4778 this.useContext = new ArrayList<UsageContext>(); 4779 this.useContext.add(t); 4780 return this; 4781 } 4782 4783 /** 4784 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist 4785 */ 4786 public UsageContext getUseContextFirstRep() { 4787 if (getUseContext().isEmpty()) { 4788 addUseContext(); 4789 } 4790 return getUseContext().get(0); 4791 } 4792 4793 /** 4794 * @return {@link #jurisdiction} (A legal or geographic region in which the implementation guide is intended to be used.) 4795 */ 4796 public List<CodeableConcept> getJurisdiction() { 4797 if (this.jurisdiction == null) 4798 this.jurisdiction = new ArrayList<CodeableConcept>(); 4799 return this.jurisdiction; 4800 } 4801 4802 /** 4803 * @return Returns a reference to <code>this</code> for easy method chaining 4804 */ 4805 public ImplementationGuide setJurisdiction(List<CodeableConcept> theJurisdiction) { 4806 this.jurisdiction = theJurisdiction; 4807 return this; 4808 } 4809 4810 public boolean hasJurisdiction() { 4811 if (this.jurisdiction == null) 4812 return false; 4813 for (CodeableConcept item : this.jurisdiction) 4814 if (!item.isEmpty()) 4815 return true; 4816 return false; 4817 } 4818 4819 public CodeableConcept addJurisdiction() { //3 4820 CodeableConcept t = new CodeableConcept(); 4821 if (this.jurisdiction == null) 4822 this.jurisdiction = new ArrayList<CodeableConcept>(); 4823 this.jurisdiction.add(t); 4824 return t; 4825 } 4826 4827 public ImplementationGuide addJurisdiction(CodeableConcept t) { //3 4828 if (t == null) 4829 return this; 4830 if (this.jurisdiction == null) 4831 this.jurisdiction = new ArrayList<CodeableConcept>(); 4832 this.jurisdiction.add(t); 4833 return this; 4834 } 4835 4836 /** 4837 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist 4838 */ 4839 public CodeableConcept getJurisdictionFirstRep() { 4840 if (getJurisdiction().isEmpty()) { 4841 addJurisdiction(); 4842 } 4843 return getJurisdiction().get(0); 4844 } 4845 4846 /** 4847 * @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 4848 */ 4849 public MarkdownType getCopyrightElement() { 4850 if (this.copyright == null) 4851 if (Configuration.errorOnAutoCreate()) 4852 throw new Error("Attempt to auto-create ImplementationGuide.copyright"); 4853 else if (Configuration.doAutoCreate()) 4854 this.copyright = new MarkdownType(); // bb 4855 return this.copyright; 4856 } 4857 4858 public boolean hasCopyrightElement() { 4859 return this.copyright != null && !this.copyright.isEmpty(); 4860 } 4861 4862 public boolean hasCopyright() { 4863 return this.copyright != null && !this.copyright.isEmpty(); 4864 } 4865 4866 /** 4867 * @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 4868 */ 4869 public ImplementationGuide setCopyrightElement(MarkdownType value) { 4870 this.copyright = value; 4871 return this; 4872 } 4873 4874 /** 4875 * @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. 4876 */ 4877 public String getCopyright() { 4878 return this.copyright == null ? null : this.copyright.getValue(); 4879 } 4880 4881 /** 4882 * @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. 4883 */ 4884 public ImplementationGuide setCopyright(String value) { 4885 if (value == null) 4886 this.copyright = null; 4887 else { 4888 if (this.copyright == null) 4889 this.copyright = new MarkdownType(); 4890 this.copyright.setValue(value); 4891 } 4892 return this; 4893 } 4894 4895 /** 4896 * @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.4.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value 4897 */ 4898 public IdType getFhirVersionElement() { 4899 if (this.fhirVersion == null) 4900 if (Configuration.errorOnAutoCreate()) 4901 throw new Error("Attempt to auto-create ImplementationGuide.fhirVersion"); 4902 else if (Configuration.doAutoCreate()) 4903 this.fhirVersion = new IdType(); // bb 4904 return this.fhirVersion; 4905 } 4906 4907 public boolean hasFhirVersionElement() { 4908 return this.fhirVersion != null && !this.fhirVersion.isEmpty(); 4909 } 4910 4911 public boolean hasFhirVersion() { 4912 return this.fhirVersion != null && !this.fhirVersion.isEmpty(); 4913 } 4914 4915 /** 4916 * @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.4.0 for this version.). This is the underlying object with id, value and extensions. The accessor "getFhirVersion" gives direct access to the value 4917 */ 4918 public ImplementationGuide setFhirVersionElement(IdType value) { 4919 this.fhirVersion = value; 4920 return this; 4921 } 4922 4923 /** 4924 * @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.4.0 for this version. 4925 */ 4926 public String getFhirVersion() { 4927 return this.fhirVersion == null ? null : this.fhirVersion.getValue(); 4928 } 4929 4930 /** 4931 * @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.4.0 for this version. 4932 */ 4933 public ImplementationGuide setFhirVersion(String value) { 4934 if (Utilities.noString(value)) 4935 this.fhirVersion = null; 4936 else { 4937 if (this.fhirVersion == null) 4938 this.fhirVersion = new IdType(); 4939 this.fhirVersion.setValue(value); 4940 } 4941 return this; 4942 } 4943 4944 /** 4945 * @return {@link #dependsOn} (Another implementation guide that this implementation depends on. Typically, an implementation guide uses value sets, profiles etc.defined in other implementation guides.) 4946 */ 4947 public List<ImplementationGuideDependsOnComponent> getDependsOn() { 4948 if (this.dependsOn == null) 4949 this.dependsOn = new ArrayList<ImplementationGuideDependsOnComponent>(); 4950 return this.dependsOn; 4951 } 4952 4953 /** 4954 * @return Returns a reference to <code>this</code> for easy method chaining 4955 */ 4956 public ImplementationGuide setDependsOn(List<ImplementationGuideDependsOnComponent> theDependsOn) { 4957 this.dependsOn = theDependsOn; 4958 return this; 4959 } 4960 4961 public boolean hasDependsOn() { 4962 if (this.dependsOn == null) 4963 return false; 4964 for (ImplementationGuideDependsOnComponent item : this.dependsOn) 4965 if (!item.isEmpty()) 4966 return true; 4967 return false; 4968 } 4969 4970 public ImplementationGuideDependsOnComponent addDependsOn() { //3 4971 ImplementationGuideDependsOnComponent t = new ImplementationGuideDependsOnComponent(); 4972 if (this.dependsOn == null) 4973 this.dependsOn = new ArrayList<ImplementationGuideDependsOnComponent>(); 4974 this.dependsOn.add(t); 4975 return t; 4976 } 4977 4978 public ImplementationGuide addDependsOn(ImplementationGuideDependsOnComponent t) { //3 4979 if (t == null) 4980 return this; 4981 if (this.dependsOn == null) 4982 this.dependsOn = new ArrayList<ImplementationGuideDependsOnComponent>(); 4983 this.dependsOn.add(t); 4984 return this; 4985 } 4986 4987 /** 4988 * @return The first repetition of repeating field {@link #dependsOn}, creating it if it does not already exist 4989 */ 4990 public ImplementationGuideDependsOnComponent getDependsOnFirstRep() { 4991 if (getDependsOn().isEmpty()) { 4992 addDependsOn(); 4993 } 4994 return getDependsOn().get(0); 4995 } 4996 4997 /** 4998 * @return {@link #global} (A set of profiles that all resources covered by this implementation guide must conform to.) 4999 */ 5000 public List<ImplementationGuideGlobalComponent> getGlobal() { 5001 if (this.global == null) 5002 this.global = new ArrayList<ImplementationGuideGlobalComponent>(); 5003 return this.global; 5004 } 5005 5006 /** 5007 * @return Returns a reference to <code>this</code> for easy method chaining 5008 */ 5009 public ImplementationGuide setGlobal(List<ImplementationGuideGlobalComponent> theGlobal) { 5010 this.global = theGlobal; 5011 return this; 5012 } 5013 5014 public boolean hasGlobal() { 5015 if (this.global == null) 5016 return false; 5017 for (ImplementationGuideGlobalComponent item : this.global) 5018 if (!item.isEmpty()) 5019 return true; 5020 return false; 5021 } 5022 5023 public ImplementationGuideGlobalComponent addGlobal() { //3 5024 ImplementationGuideGlobalComponent t = new ImplementationGuideGlobalComponent(); 5025 if (this.global == null) 5026 this.global = new ArrayList<ImplementationGuideGlobalComponent>(); 5027 this.global.add(t); 5028 return t; 5029 } 5030 5031 public ImplementationGuide addGlobal(ImplementationGuideGlobalComponent t) { //3 5032 if (t == null) 5033 return this; 5034 if (this.global == null) 5035 this.global = new ArrayList<ImplementationGuideGlobalComponent>(); 5036 this.global.add(t); 5037 return this; 5038 } 5039 5040 /** 5041 * @return The first repetition of repeating field {@link #global}, creating it if it does not already exist 5042 */ 5043 public ImplementationGuideGlobalComponent getGlobalFirstRep() { 5044 if (getGlobal().isEmpty()) { 5045 addGlobal(); 5046 } 5047 return getGlobal().get(0); 5048 } 5049 5050 /** 5051 * @return {@link #definition} (The information needed by an IG publisher tool to publish the whole implementation guide.) 5052 */ 5053 public ImplementationGuideDefinitionComponent getDefinition() { 5054 if (this.definition == null) 5055 if (Configuration.errorOnAutoCreate()) 5056 throw new Error("Attempt to auto-create ImplementationGuide.definition"); 5057 else if (Configuration.doAutoCreate()) 5058 this.definition = new ImplementationGuideDefinitionComponent(); // cc 5059 return this.definition; 5060 } 5061 5062 public boolean hasDefinition() { 5063 return this.definition != null && !this.definition.isEmpty(); 5064 } 5065 5066 /** 5067 * @param value {@link #definition} (The information needed by an IG publisher tool to publish the whole implementation guide.) 5068 */ 5069 public ImplementationGuide setDefinition(ImplementationGuideDefinitionComponent value) { 5070 this.definition = value; 5071 return this; 5072 } 5073 5074 /** 5075 * @return {@link #manifest} (Information about an assembled implementation guide, created by the publication tooling.) 5076 */ 5077 public ImplementationGuideManifestComponent getManifest() { 5078 if (this.manifest == null) 5079 if (Configuration.errorOnAutoCreate()) 5080 throw new Error("Attempt to auto-create ImplementationGuide.manifest"); 5081 else if (Configuration.doAutoCreate()) 5082 this.manifest = new ImplementationGuideManifestComponent(); // cc 5083 return this.manifest; 5084 } 5085 5086 public boolean hasManifest() { 5087 return this.manifest != null && !this.manifest.isEmpty(); 5088 } 5089 5090 /** 5091 * @param value {@link #manifest} (Information about an assembled implementation guide, created by the publication tooling.) 5092 */ 5093 public ImplementationGuide setManifest(ImplementationGuideManifestComponent value) { 5094 this.manifest = value; 5095 return this; 5096 } 5097 5098 protected void listChildren(List<Property> children) { 5099 super.listChildren(children); 5100 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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this implementation guide is (or will be) published.", 0, 1, url)); 5101 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)); 5102 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)); 5103 children.add(new Property("status", "code", "The status of this implementation guide. Enables tracking the life-cycle of the content.", 0, 1, status)); 5104 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)); 5105 children.add(new Property("date", "dateTime", "The date (and optionally time) when the implementation guide was published. The date must change 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)); 5106 children.add(new Property("publisher", "string", "The name of the organization or individual that published the implementation guide.", 0, 1, publisher)); 5107 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)); 5108 children.add(new Property("description", "markdown", "A free text natural language description of the implementation guide from a consumer's perspective.", 0, 1, description)); 5109 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)); 5110 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)); 5111 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)); 5112 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.4.0 for this version.", 0, 1, fhirVersion)); 5113 children.add(new Property("dependsOn", "", "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, dependsOn)); 5114 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)); 5115 children.add(new Property("definition", "", "The information needed by an IG publisher tool to publish the whole implementation guide.", 0, 1, definition)); 5116 children.add(new Property("manifest", "", "Information about an assembled implementation guide, created by the publication tooling.", 0, 1, manifest)); 5117 } 5118 5119 @Override 5120 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 5121 switch (_hash) { 5122 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; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which this implementation guide is (or will be) published.", 0, 1, url); 5123 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); 5124 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); 5125 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); 5126 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); 5127 case 3076014: /*date*/ return new Property("date", "dateTime", "The date (and optionally time) when the implementation guide was published. The date must change 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); 5128 case 1447404028: /*publisher*/ return new Property("publisher", "string", "The name of the organization or individual that published the implementation guide.", 0, 1, publisher); 5129 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); 5130 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); 5131 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); 5132 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); 5133 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); 5134 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.4.0 for this version.", 0, 1, fhirVersion); 5135 case -1109214266: /*dependsOn*/ return new Property("dependsOn", "", "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, dependsOn); 5136 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); 5137 case -1014418093: /*definition*/ return new Property("definition", "", "The information needed by an IG publisher tool to publish the whole implementation guide.", 0, 1, definition); 5138 case 130625071: /*manifest*/ return new Property("manifest", "", "Information about an assembled implementation guide, created by the publication tooling.", 0, 1, manifest); 5139 default: return super.getNamedProperty(_hash, _name, _checkValid); 5140 } 5141 5142 } 5143 5144 @Override 5145 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 5146 switch (hash) { 5147 case 116079: /*url*/ return this.url == null ? new Base[0] : new Base[] {this.url}; // UriType 5148 case 351608024: /*version*/ return this.version == null ? new Base[0] : new Base[] {this.version}; // StringType 5149 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 5150 case -892481550: /*status*/ return this.status == null ? new Base[0] : new Base[] {this.status}; // Enumeration<PublicationStatus> 5151 case -404562712: /*experimental*/ return this.experimental == null ? new Base[0] : new Base[] {this.experimental}; // BooleanType 5152 case 3076014: /*date*/ return this.date == null ? new Base[0] : new Base[] {this.date}; // DateTimeType 5153 case 1447404028: /*publisher*/ return this.publisher == null ? new Base[0] : new Base[] {this.publisher}; // StringType 5154 case 951526432: /*contact*/ return this.contact == null ? new Base[0] : this.contact.toArray(new Base[this.contact.size()]); // ContactDetail 5155 case -1724546052: /*description*/ return this.description == null ? new Base[0] : new Base[] {this.description}; // MarkdownType 5156 case -669707736: /*useContext*/ return this.useContext == null ? new Base[0] : this.useContext.toArray(new Base[this.useContext.size()]); // UsageContext 5157 case -507075711: /*jurisdiction*/ return this.jurisdiction == null ? new Base[0] : this.jurisdiction.toArray(new Base[this.jurisdiction.size()]); // CodeableConcept 5158 case 1522889671: /*copyright*/ return this.copyright == null ? new Base[0] : new Base[] {this.copyright}; // MarkdownType 5159 case 461006061: /*fhirVersion*/ return this.fhirVersion == null ? new Base[0] : new Base[] {this.fhirVersion}; // IdType 5160 case -1109214266: /*dependsOn*/ return this.dependsOn == null ? new Base[0] : this.dependsOn.toArray(new Base[this.dependsOn.size()]); // ImplementationGuideDependsOnComponent 5161 case -1243020381: /*global*/ return this.global == null ? new Base[0] : this.global.toArray(new Base[this.global.size()]); // ImplementationGuideGlobalComponent 5162 case -1014418093: /*definition*/ return this.definition == null ? new Base[0] : new Base[] {this.definition}; // ImplementationGuideDefinitionComponent 5163 case 130625071: /*manifest*/ return this.manifest == null ? new Base[0] : new Base[] {this.manifest}; // ImplementationGuideManifestComponent 5164 default: return super.getProperty(hash, name, checkValid); 5165 } 5166 5167 } 5168 5169 @Override 5170 public Base setProperty(int hash, String name, Base value) throws FHIRException { 5171 switch (hash) { 5172 case 116079: // url 5173 this.url = castToUri(value); // UriType 5174 return value; 5175 case 351608024: // version 5176 this.version = castToString(value); // StringType 5177 return value; 5178 case 3373707: // name 5179 this.name = castToString(value); // StringType 5180 return value; 5181 case -892481550: // status 5182 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 5183 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 5184 return value; 5185 case -404562712: // experimental 5186 this.experimental = castToBoolean(value); // BooleanType 5187 return value; 5188 case 3076014: // date 5189 this.date = castToDateTime(value); // DateTimeType 5190 return value; 5191 case 1447404028: // publisher 5192 this.publisher = castToString(value); // StringType 5193 return value; 5194 case 951526432: // contact 5195 this.getContact().add(castToContactDetail(value)); // ContactDetail 5196 return value; 5197 case -1724546052: // description 5198 this.description = castToMarkdown(value); // MarkdownType 5199 return value; 5200 case -669707736: // useContext 5201 this.getUseContext().add(castToUsageContext(value)); // UsageContext 5202 return value; 5203 case -507075711: // jurisdiction 5204 this.getJurisdiction().add(castToCodeableConcept(value)); // CodeableConcept 5205 return value; 5206 case 1522889671: // copyright 5207 this.copyright = castToMarkdown(value); // MarkdownType 5208 return value; 5209 case 461006061: // fhirVersion 5210 this.fhirVersion = castToId(value); // IdType 5211 return value; 5212 case -1109214266: // dependsOn 5213 this.getDependsOn().add((ImplementationGuideDependsOnComponent) value); // ImplementationGuideDependsOnComponent 5214 return value; 5215 case -1243020381: // global 5216 this.getGlobal().add((ImplementationGuideGlobalComponent) value); // ImplementationGuideGlobalComponent 5217 return value; 5218 case -1014418093: // definition 5219 this.definition = (ImplementationGuideDefinitionComponent) value; // ImplementationGuideDefinitionComponent 5220 return value; 5221 case 130625071: // manifest 5222 this.manifest = (ImplementationGuideManifestComponent) value; // ImplementationGuideManifestComponent 5223 return value; 5224 default: return super.setProperty(hash, name, value); 5225 } 5226 5227 } 5228 5229 @Override 5230 public Base setProperty(String name, Base value) throws FHIRException { 5231 if (name.equals("url")) { 5232 this.url = castToUri(value); // UriType 5233 } else if (name.equals("version")) { 5234 this.version = castToString(value); // StringType 5235 } else if (name.equals("name")) { 5236 this.name = castToString(value); // StringType 5237 } else if (name.equals("status")) { 5238 value = new PublicationStatusEnumFactory().fromType(castToCode(value)); 5239 this.status = (Enumeration) value; // Enumeration<PublicationStatus> 5240 } else if (name.equals("experimental")) { 5241 this.experimental = castToBoolean(value); // BooleanType 5242 } else if (name.equals("date")) { 5243 this.date = castToDateTime(value); // DateTimeType 5244 } else if (name.equals("publisher")) { 5245 this.publisher = castToString(value); // StringType 5246 } else if (name.equals("contact")) { 5247 this.getContact().add(castToContactDetail(value)); 5248 } else if (name.equals("description")) { 5249 this.description = castToMarkdown(value); // MarkdownType 5250 } else if (name.equals("useContext")) { 5251 this.getUseContext().add(castToUsageContext(value)); 5252 } else if (name.equals("jurisdiction")) { 5253 this.getJurisdiction().add(castToCodeableConcept(value)); 5254 } else if (name.equals("copyright")) { 5255 this.copyright = castToMarkdown(value); // MarkdownType 5256 } else if (name.equals("fhirVersion")) { 5257 this.fhirVersion = castToId(value); // IdType 5258 } else if (name.equals("dependsOn")) { 5259 this.getDependsOn().add((ImplementationGuideDependsOnComponent) value); 5260 } else if (name.equals("global")) { 5261 this.getGlobal().add((ImplementationGuideGlobalComponent) value); 5262 } else if (name.equals("definition")) { 5263 this.definition = (ImplementationGuideDefinitionComponent) value; // ImplementationGuideDefinitionComponent 5264 } else if (name.equals("manifest")) { 5265 this.manifest = (ImplementationGuideManifestComponent) value; // ImplementationGuideManifestComponent 5266 } else 5267 return super.setProperty(name, value); 5268 return value; 5269 } 5270 5271 @Override 5272 public Base makeProperty(int hash, String name) throws FHIRException { 5273 switch (hash) { 5274 case 116079: return getUrlElement(); 5275 case 351608024: return getVersionElement(); 5276 case 3373707: return getNameElement(); 5277 case -892481550: return getStatusElement(); 5278 case -404562712: return getExperimentalElement(); 5279 case 3076014: return getDateElement(); 5280 case 1447404028: return getPublisherElement(); 5281 case 951526432: return addContact(); 5282 case -1724546052: return getDescriptionElement(); 5283 case -669707736: return addUseContext(); 5284 case -507075711: return addJurisdiction(); 5285 case 1522889671: return getCopyrightElement(); 5286 case 461006061: return getFhirVersionElement(); 5287 case -1109214266: return addDependsOn(); 5288 case -1243020381: return addGlobal(); 5289 case -1014418093: return getDefinition(); 5290 case 130625071: return getManifest(); 5291 default: return super.makeProperty(hash, name); 5292 } 5293 5294 } 5295 5296 @Override 5297 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 5298 switch (hash) { 5299 case 116079: /*url*/ return new String[] {"uri"}; 5300 case 351608024: /*version*/ return new String[] {"string"}; 5301 case 3373707: /*name*/ return new String[] {"string"}; 5302 case -892481550: /*status*/ return new String[] {"code"}; 5303 case -404562712: /*experimental*/ return new String[] {"boolean"}; 5304 case 3076014: /*date*/ return new String[] {"dateTime"}; 5305 case 1447404028: /*publisher*/ return new String[] {"string"}; 5306 case 951526432: /*contact*/ return new String[] {"ContactDetail"}; 5307 case -1724546052: /*description*/ return new String[] {"markdown"}; 5308 case -669707736: /*useContext*/ return new String[] {"UsageContext"}; 5309 case -507075711: /*jurisdiction*/ return new String[] {"CodeableConcept"}; 5310 case 1522889671: /*copyright*/ return new String[] {"markdown"}; 5311 case 461006061: /*fhirVersion*/ return new String[] {"id"}; 5312 case -1109214266: /*dependsOn*/ return new String[] {}; 5313 case -1243020381: /*global*/ return new String[] {}; 5314 case -1014418093: /*definition*/ return new String[] {}; 5315 case 130625071: /*manifest*/ return new String[] {}; 5316 default: return super.getTypesForProperty(hash, name); 5317 } 5318 5319 } 5320 5321 @Override 5322 public Base addChild(String name) throws FHIRException { 5323 if (name.equals("url")) { 5324 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.url"); 5325 } 5326 else if (name.equals("version")) { 5327 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.version"); 5328 } 5329 else if (name.equals("name")) { 5330 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.name"); 5331 } 5332 else if (name.equals("status")) { 5333 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.status"); 5334 } 5335 else if (name.equals("experimental")) { 5336 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.experimental"); 5337 } 5338 else if (name.equals("date")) { 5339 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.date"); 5340 } 5341 else if (name.equals("publisher")) { 5342 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.publisher"); 5343 } 5344 else if (name.equals("contact")) { 5345 return addContact(); 5346 } 5347 else if (name.equals("description")) { 5348 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.description"); 5349 } 5350 else if (name.equals("useContext")) { 5351 return addUseContext(); 5352 } 5353 else if (name.equals("jurisdiction")) { 5354 return addJurisdiction(); 5355 } 5356 else if (name.equals("copyright")) { 5357 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.copyright"); 5358 } 5359 else if (name.equals("fhirVersion")) { 5360 throw new FHIRException("Cannot call addChild on a primitive type ImplementationGuide.fhirVersion"); 5361 } 5362 else if (name.equals("dependsOn")) { 5363 return addDependsOn(); 5364 } 5365 else if (name.equals("global")) { 5366 return addGlobal(); 5367 } 5368 else if (name.equals("definition")) { 5369 this.definition = new ImplementationGuideDefinitionComponent(); 5370 return this.definition; 5371 } 5372 else if (name.equals("manifest")) { 5373 this.manifest = new ImplementationGuideManifestComponent(); 5374 return this.manifest; 5375 } 5376 else 5377 return super.addChild(name); 5378 } 5379 5380 public String fhirType() { 5381 return "ImplementationGuide"; 5382 5383 } 5384 5385 public ImplementationGuide copy() { 5386 ImplementationGuide dst = new ImplementationGuide(); 5387 copyValues(dst); 5388 dst.url = url == null ? null : url.copy(); 5389 dst.version = version == null ? null : version.copy(); 5390 dst.name = name == null ? null : name.copy(); 5391 dst.status = status == null ? null : status.copy(); 5392 dst.experimental = experimental == null ? null : experimental.copy(); 5393 dst.date = date == null ? null : date.copy(); 5394 dst.publisher = publisher == null ? null : publisher.copy(); 5395 if (contact != null) { 5396 dst.contact = new ArrayList<ContactDetail>(); 5397 for (ContactDetail i : contact) 5398 dst.contact.add(i.copy()); 5399 }; 5400 dst.description = description == null ? null : description.copy(); 5401 if (useContext != null) { 5402 dst.useContext = new ArrayList<UsageContext>(); 5403 for (UsageContext i : useContext) 5404 dst.useContext.add(i.copy()); 5405 }; 5406 if (jurisdiction != null) { 5407 dst.jurisdiction = new ArrayList<CodeableConcept>(); 5408 for (CodeableConcept i : jurisdiction) 5409 dst.jurisdiction.add(i.copy()); 5410 }; 5411 dst.copyright = copyright == null ? null : copyright.copy(); 5412 dst.fhirVersion = fhirVersion == null ? null : fhirVersion.copy(); 5413 if (dependsOn != null) { 5414 dst.dependsOn = new ArrayList<ImplementationGuideDependsOnComponent>(); 5415 for (ImplementationGuideDependsOnComponent i : dependsOn) 5416 dst.dependsOn.add(i.copy()); 5417 }; 5418 if (global != null) { 5419 dst.global = new ArrayList<ImplementationGuideGlobalComponent>(); 5420 for (ImplementationGuideGlobalComponent i : global) 5421 dst.global.add(i.copy()); 5422 }; 5423 dst.definition = definition == null ? null : definition.copy(); 5424 dst.manifest = manifest == null ? null : manifest.copy(); 5425 return dst; 5426 } 5427 5428 protected ImplementationGuide typedCopy() { 5429 return copy(); 5430 } 5431 5432 @Override 5433 public boolean equalsDeep(Base other_) { 5434 if (!super.equalsDeep(other_)) 5435 return false; 5436 if (!(other_ instanceof ImplementationGuide)) 5437 return false; 5438 ImplementationGuide o = (ImplementationGuide) other_; 5439 return compareDeep(copyright, o.copyright, true) && compareDeep(fhirVersion, o.fhirVersion, true) 5440 && compareDeep(dependsOn, o.dependsOn, true) && compareDeep(global, o.global, true) && compareDeep(definition, o.definition, true) 5441 && compareDeep(manifest, o.manifest, true); 5442 } 5443 5444 @Override 5445 public boolean equalsShallow(Base other_) { 5446 if (!super.equalsShallow(other_)) 5447 return false; 5448 if (!(other_ instanceof ImplementationGuide)) 5449 return false; 5450 ImplementationGuide o = (ImplementationGuide) other_; 5451 return compareValues(copyright, o.copyright, true) && compareValues(fhirVersion, o.fhirVersion, true) 5452 ; 5453 } 5454 5455 public boolean isEmpty() { 5456 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(copyright, fhirVersion, dependsOn 5457 , global, definition, manifest); 5458 } 5459 5460 @Override 5461 public ResourceType getResourceType() { 5462 return ResourceType.ImplementationGuide; 5463 } 5464 5465 /** 5466 * Search parameter: <b>date</b> 5467 * <p> 5468 * Description: <b>The implementation guide publication date</b><br> 5469 * Type: <b>date</b><br> 5470 * Path: <b>ImplementationGuide.date</b><br> 5471 * </p> 5472 */ 5473 @SearchParamDefinition(name="date", path="ImplementationGuide.date", description="The implementation guide publication date", type="date" ) 5474 public static final String SP_DATE = "date"; 5475 /** 5476 * <b>Fluent Client</b> search parameter constant for <b>date</b> 5477 * <p> 5478 * Description: <b>The implementation guide publication date</b><br> 5479 * Type: <b>date</b><br> 5480 * Path: <b>ImplementationGuide.date</b><br> 5481 * </p> 5482 */ 5483 public static final ca.uhn.fhir.rest.gclient.DateClientParam DATE = new ca.uhn.fhir.rest.gclient.DateClientParam(SP_DATE); 5484 5485 /** 5486 * Search parameter: <b>depends-on</b> 5487 * <p> 5488 * Description: <b>Identity of the IG that this depends on</b><br> 5489 * Type: <b>reference</b><br> 5490 * Path: <b>ImplementationGuide.dependsOn.uri</b><br> 5491 * </p> 5492 */ 5493 @SearchParamDefinition(name="depends-on", path="ImplementationGuide.dependsOn.uri", description="Identity of the IG that this depends on", type="reference" ) 5494 public static final String SP_DEPENDS_ON = "depends-on"; 5495 /** 5496 * <b>Fluent Client</b> search parameter constant for <b>depends-on</b> 5497 * <p> 5498 * Description: <b>Identity of the IG that this depends on</b><br> 5499 * Type: <b>reference</b><br> 5500 * Path: <b>ImplementationGuide.dependsOn.uri</b><br> 5501 * </p> 5502 */ 5503 public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam DEPENDS_ON = new ca.uhn.fhir.rest.gclient.ReferenceClientParam(SP_DEPENDS_ON); 5504 5505/** 5506 * Constant for fluent queries to be used to add include statements. Specifies 5507 * the path value of "<b>ImplementationGuide:depends-on</b>". 5508 */ 5509 public static final ca.uhn.fhir.model.api.Include INCLUDE_DEPENDS_ON = new ca.uhn.fhir.model.api.Include("ImplementationGuide:depends-on").toLocked(); 5510 5511 /** 5512 * Search parameter: <b>jurisdiction</b> 5513 * <p> 5514 * Description: <b>Intended jurisdiction for the implementation guide</b><br> 5515 * Type: <b>token</b><br> 5516 * Path: <b>ImplementationGuide.jurisdiction</b><br> 5517 * </p> 5518 */ 5519 @SearchParamDefinition(name="jurisdiction", path="ImplementationGuide.jurisdiction", description="Intended jurisdiction for the implementation guide", type="token" ) 5520 public static final String SP_JURISDICTION = "jurisdiction"; 5521 /** 5522 * <b>Fluent Client</b> search parameter constant for <b>jurisdiction</b> 5523 * <p> 5524 * Description: <b>Intended jurisdiction for the implementation guide</b><br> 5525 * Type: <b>token</b><br> 5526 * Path: <b>ImplementationGuide.jurisdiction</b><br> 5527 * </p> 5528 */ 5529 public static final ca.uhn.fhir.rest.gclient.TokenClientParam JURISDICTION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_JURISDICTION); 5530 5531 /** 5532 * Search parameter: <b>name</b> 5533 * <p> 5534 * Description: <b>Computationally friendly name of the implementation guide</b><br> 5535 * Type: <b>string</b><br> 5536 * Path: <b>ImplementationGuide.name</b><br> 5537 * </p> 5538 */ 5539 @SearchParamDefinition(name="name", path="ImplementationGuide.name", description="Computationally friendly name of the implementation guide", type="string" ) 5540 public static final String SP_NAME = "name"; 5541 /** 5542 * <b>Fluent Client</b> search parameter constant for <b>name</b> 5543 * <p> 5544 * Description: <b>Computationally friendly name of the implementation guide</b><br> 5545 * Type: <b>string</b><br> 5546 * Path: <b>ImplementationGuide.name</b><br> 5547 * </p> 5548 */ 5549 public static final ca.uhn.fhir.rest.gclient.StringClientParam NAME = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_NAME); 5550 5551 /** 5552 * Search parameter: <b>description</b> 5553 * <p> 5554 * Description: <b>The description of the implementation guide</b><br> 5555 * Type: <b>string</b><br> 5556 * Path: <b>ImplementationGuide.description</b><br> 5557 * </p> 5558 */ 5559 @SearchParamDefinition(name="description", path="ImplementationGuide.description", description="The description of the implementation guide", type="string" ) 5560 public static final String SP_DESCRIPTION = "description"; 5561 /** 5562 * <b>Fluent Client</b> search parameter constant for <b>description</b> 5563 * <p> 5564 * Description: <b>The description of the implementation guide</b><br> 5565 * Type: <b>string</b><br> 5566 * Path: <b>ImplementationGuide.description</b><br> 5567 * </p> 5568 */ 5569 public static final ca.uhn.fhir.rest.gclient.StringClientParam DESCRIPTION = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_DESCRIPTION); 5570 5571 /** 5572 * Search parameter: <b>publisher</b> 5573 * <p> 5574 * Description: <b>Name of the publisher of the implementation guide</b><br> 5575 * Type: <b>string</b><br> 5576 * Path: <b>ImplementationGuide.publisher</b><br> 5577 * </p> 5578 */ 5579 @SearchParamDefinition(name="publisher", path="ImplementationGuide.publisher", description="Name of the publisher of the implementation guide", type="string" ) 5580 public static final String SP_PUBLISHER = "publisher"; 5581 /** 5582 * <b>Fluent Client</b> search parameter constant for <b>publisher</b> 5583 * <p> 5584 * Description: <b>Name of the publisher of the implementation guide</b><br> 5585 * Type: <b>string</b><br> 5586 * Path: <b>ImplementationGuide.publisher</b><br> 5587 * </p> 5588 */ 5589 public static final ca.uhn.fhir.rest.gclient.StringClientParam PUBLISHER = new ca.uhn.fhir.rest.gclient.StringClientParam(SP_PUBLISHER); 5590 5591 /** 5592 * Search parameter: <b>experimental</b> 5593 * <p> 5594 * Description: <b>For testing purposes, not real usage</b><br> 5595 * Type: <b>token</b><br> 5596 * Path: <b>ImplementationGuide.experimental</b><br> 5597 * </p> 5598 */ 5599 @SearchParamDefinition(name="experimental", path="ImplementationGuide.experimental", description="For testing purposes, not real usage", type="token" ) 5600 public static final String SP_EXPERIMENTAL = "experimental"; 5601 /** 5602 * <b>Fluent Client</b> search parameter constant for <b>experimental</b> 5603 * <p> 5604 * Description: <b>For testing purposes, not real usage</b><br> 5605 * Type: <b>token</b><br> 5606 * Path: <b>ImplementationGuide.experimental</b><br> 5607 * </p> 5608 */ 5609 public static final ca.uhn.fhir.rest.gclient.TokenClientParam EXPERIMENTAL = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_EXPERIMENTAL); 5610 5611 /** 5612 * Search parameter: <b>version</b> 5613 * <p> 5614 * Description: <b>The business version of the implementation guide</b><br> 5615 * Type: <b>token</b><br> 5616 * Path: <b>ImplementationGuide.version</b><br> 5617 * </p> 5618 */ 5619 @SearchParamDefinition(name="version", path="ImplementationGuide.version", description="The business version of the implementation guide", type="token" ) 5620 public static final String SP_VERSION = "version"; 5621 /** 5622 * <b>Fluent Client</b> search parameter constant for <b>version</b> 5623 * <p> 5624 * Description: <b>The business version of the implementation guide</b><br> 5625 * Type: <b>token</b><br> 5626 * Path: <b>ImplementationGuide.version</b><br> 5627 * </p> 5628 */ 5629 public static final ca.uhn.fhir.rest.gclient.TokenClientParam VERSION = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_VERSION); 5630 5631 /** 5632 * Search parameter: <b>url</b> 5633 * <p> 5634 * Description: <b>The uri that identifies the implementation guide</b><br> 5635 * Type: <b>uri</b><br> 5636 * Path: <b>ImplementationGuide.url</b><br> 5637 * </p> 5638 */ 5639 @SearchParamDefinition(name="url", path="ImplementationGuide.url", description="The uri that identifies the implementation guide", type="uri" ) 5640 public static final String SP_URL = "url"; 5641 /** 5642 * <b>Fluent Client</b> search parameter constant for <b>url</b> 5643 * <p> 5644 * Description: <b>The uri that identifies the implementation guide</b><br> 5645 * Type: <b>uri</b><br> 5646 * Path: <b>ImplementationGuide.url</b><br> 5647 * </p> 5648 */ 5649 public static final ca.uhn.fhir.rest.gclient.UriClientParam URL = new ca.uhn.fhir.rest.gclient.UriClientParam(SP_URL); 5650 5651 /** 5652 * Search parameter: <b>status</b> 5653 * <p> 5654 * Description: <b>The current status of the implementation guide</b><br> 5655 * Type: <b>token</b><br> 5656 * Path: <b>ImplementationGuide.status</b><br> 5657 * </p> 5658 */ 5659 @SearchParamDefinition(name="status", path="ImplementationGuide.status", description="The current status of the implementation guide", type="token" ) 5660 public static final String SP_STATUS = "status"; 5661 /** 5662 * <b>Fluent Client</b> search parameter constant for <b>status</b> 5663 * <p> 5664 * Description: <b>The current status of the implementation guide</b><br> 5665 * Type: <b>token</b><br> 5666 * Path: <b>ImplementationGuide.status</b><br> 5667 * </p> 5668 */ 5669 public static final ca.uhn.fhir.rest.gclient.TokenClientParam STATUS = new ca.uhn.fhir.rest.gclient.TokenClientParam(SP_STATUS); 5670 5671 5672} 5673