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