
001package org.hl7.fhir.r5.model; 002 003 004/* 005 Copyright (c) 2011+, HL7, Inc. 006 All rights reserved. 007 008 Redistribution and use in source and binary forms, with or without modification, \ 009 are permitted provided that the following conditions are met: 010 011 * Redistributions of source code must retain the above copyright notice, this \ 012 list of conditions and the following disclaimer. 013 * Redistributions in binary form must reproduce the above copyright notice, \ 014 this list of conditions and the following disclaimer in the documentation \ 015 and/or other materials provided with the distribution. 016 * Neither the name of HL7 nor the names of its contributors may be used to 017 endorse or promote products derived from this software without specific 018 prior written permission. 019 020 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \ 021 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \ 022 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. \ 023 IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, \ 024 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT \ 025 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR \ 026 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, \ 027 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) \ 028 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE \ 029 POSSIBILITY OF SUCH DAMAGE. 030 */ 031 032// Generated on Thu, Mar 23, 2023 19:59+1100 for FHIR v5.0.0 033 034import java.util.ArrayList; 035import java.util.Date; 036import java.util.List; 037import org.hl7.fhir.utilities.Utilities; 038import org.hl7.fhir.r5.model.Enumerations.*; 039import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 040import org.hl7.fhir.exceptions.FHIRException; 041import org.hl7.fhir.instance.model.api.ICompositeType; 042import ca.uhn.fhir.model.api.annotation.ResourceDef; 043import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import ca.uhn.fhir.model.api.annotation.Child; 046import ca.uhn.fhir.model.api.annotation.ChildOrder; 047import ca.uhn.fhir.model.api.annotation.Description; 048import ca.uhn.fhir.model.api.annotation.Block; 049 050import org.hl7.fhir.instance.model.api.IBaseParameters; 051import org.hl7.fhir.utilities.CommaSeparatedStringBuilder; 052/** 053 * This resource is used to pass information into and back from an operation (whether invoked directly from REST or within a messaging environment). It is not persisted or allowed to be referenced by other resources except as described in the definition of the Parameters resource. 054 */ 055@ResourceDef(name="Parameters", profile="http://hl7.org/fhir/StructureDefinition/Parameters") 056public class Parameters extends Resource implements IBaseParameters { 057 058 @Block() 059 public static class ParametersParameterComponent extends BackboneElement implements IBaseBackboneElement { 060 /** 061 * The name of the parameter (reference to the operation definition). 062 */ 063 @Child(name = "name", type = {StringType.class}, order=1, min=1, max=1, modifier=false, summary=true) 064 @Description(shortDefinition="Name from the definition", formalDefinition="The name of the parameter (reference to the operation definition)." ) 065 protected StringType name; 066 067 /** 068 * Conveys the content if the parameter is a data type. 069 */ 070 @Child(name = "value", type = {Base64BinaryType.class, BooleanType.class, CanonicalType.class, CodeType.class, DateType.class, DateTimeType.class, DecimalType.class, IdType.class, InstantType.class, IntegerType.class, Integer64Type.class, MarkdownType.class, OidType.class, PositiveIntType.class, StringType.class, TimeType.class, UnsignedIntType.class, UriType.class, UrlType.class, UuidType.class, Address.class, Age.class, Annotation.class, Attachment.class, CodeableConcept.class, CodeableReference.class, Coding.class, ContactPoint.class, Count.class, Distance.class, Duration.class, HumanName.class, Identifier.class, Money.class, Period.class, Quantity.class, Range.class, Ratio.class, RatioRange.class, Reference.class, SampledData.class, Signature.class, Timing.class, ContactDetail.class, DataRequirement.class, Expression.class, ParameterDefinition.class, RelatedArtifact.class, TriggerDefinition.class, UsageContext.class, Availability.class, ExtendedContactDetail.class, Dosage.class, Meta.class}, order=2, min=0, max=1, modifier=false, summary=true) 071 @Description(shortDefinition="If parameter is a data type", formalDefinition="Conveys the content if the parameter is a data type." ) 072 protected DataType value; 073 074 /** 075 * Conveys the content if the parameter is a whole resource. 076 */ 077 @Child(name = "resource", type = {Resource.class}, order=3, min=0, max=1, modifier=false, summary=true) 078 @Description(shortDefinition="If parameter is a whole resource", formalDefinition="Conveys the content if the parameter is a whole resource." ) 079 protected Resource resource; 080 081 /** 082 * A named part of a multi-part parameter. 083 */ 084 @Child(name = "part", type = {ParametersParameterComponent.class}, order=4, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 085 @Description(shortDefinition="Named part of a multi-part parameter", formalDefinition="A named part of a multi-part parameter." ) 086 protected List<ParametersParameterComponent> part; 087 088 private static final long serialVersionUID = -1755858390L; 089 090 /** 091 * Constructor 092 */ 093 public ParametersParameterComponent() { 094 super(); 095 } 096 097 /** 098 * Constructor 099 */ 100 public ParametersParameterComponent(String name) { 101 super(); 102 this.setName(name); 103 } 104 105 /** 106 * @return {@link #name} (The name of the parameter (reference to the operation definition).). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 107 */ 108 public StringType getNameElement() { 109 if (this.name == null) 110 if (Configuration.errorOnAutoCreate()) 111 throw new Error("Attempt to auto-create ParametersParameterComponent.name"); 112 else if (Configuration.doAutoCreate()) 113 this.name = new StringType(); // bb 114 return this.name; 115 } 116 117 public boolean hasNameElement() { 118 return this.name != null && !this.name.isEmpty(); 119 } 120 121 public boolean hasName() { 122 return this.name != null && !this.name.isEmpty(); 123 } 124 125 /** 126 * @param value {@link #name} (The name of the parameter (reference to the operation definition).). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 127 */ 128 public ParametersParameterComponent setNameElement(StringType value) { 129 this.name = value; 130 return this; 131 } 132 133 /** 134 * @return The name of the parameter (reference to the operation definition). 135 */ 136 public String getName() { 137 return this.name == null ? null : this.name.getValue(); 138 } 139 140 /** 141 * @param value The name of the parameter (reference to the operation definition). 142 */ 143 public ParametersParameterComponent setName(String value) { 144 if (this.name == null) 145 this.name = new StringType(); 146 this.name.setValue(value); 147 return this; 148 } 149 150 /** 151 * @return {@link #value} (Conveys the content if the parameter is a data type.) 152 */ 153 public DataType getValue() { 154 return this.value; 155 } 156 157 /** 158 * @return {@link #value} (Conveys the content if the parameter is a data type.) 159 */ 160 public Base64BinaryType getValueBase64BinaryType() throws FHIRException { 161 if (this.value == null) 162 this.value = new Base64BinaryType(); 163 if (!(this.value instanceof Base64BinaryType)) 164 throw new FHIRException("Type mismatch: the type Base64BinaryType was expected, but "+this.value.getClass().getName()+" was encountered"); 165 return (Base64BinaryType) this.value; 166 } 167 168 public boolean hasValueBase64BinaryType() { 169 return this != null && this.value instanceof Base64BinaryType; 170 } 171 172 /** 173 * @return {@link #value} (Conveys the content if the parameter is a data type.) 174 */ 175 public BooleanType getValueBooleanType() throws FHIRException { 176 if (this.value == null) 177 this.value = new BooleanType(); 178 if (!(this.value instanceof BooleanType)) 179 throw new FHIRException("Type mismatch: the type BooleanType was expected, but "+this.value.getClass().getName()+" was encountered"); 180 return (BooleanType) this.value; 181 } 182 183 public boolean hasValueBooleanType() { 184 return this != null && this.value instanceof BooleanType; 185 } 186 187 /** 188 * @return {@link #value} (Conveys the content if the parameter is a data type.) 189 */ 190 public CanonicalType getValueCanonicalType() throws FHIRException { 191 if (this.value == null) 192 this.value = new CanonicalType(); 193 if (!(this.value instanceof CanonicalType)) 194 throw new FHIRException("Type mismatch: the type CanonicalType was expected, but "+this.value.getClass().getName()+" was encountered"); 195 return (CanonicalType) this.value; 196 } 197 198 public boolean hasValueCanonicalType() { 199 return this != null && this.value instanceof CanonicalType; 200 } 201 202 /** 203 * @return {@link #value} (Conveys the content if the parameter is a data type.) 204 */ 205 public CodeType getValueCodeType() throws FHIRException { 206 if (this.value == null) 207 this.value = new CodeType(); 208 if (!(this.value instanceof CodeType)) 209 throw new FHIRException("Type mismatch: the type CodeType was expected, but "+this.value.getClass().getName()+" was encountered"); 210 return (CodeType) this.value; 211 } 212 213 public boolean hasValueCodeType() { 214 return this != null && this.value instanceof CodeType; 215 } 216 217 /** 218 * @return {@link #value} (Conveys the content if the parameter is a data type.) 219 */ 220 public DateType getValueDateType() throws FHIRException { 221 if (this.value == null) 222 this.value = new DateType(); 223 if (!(this.value instanceof DateType)) 224 throw new FHIRException("Type mismatch: the type DateType was expected, but "+this.value.getClass().getName()+" was encountered"); 225 return (DateType) this.value; 226 } 227 228 public boolean hasValueDateType() { 229 return this != null && this.value instanceof DateType; 230 } 231 232 /** 233 * @return {@link #value} (Conveys the content if the parameter is a data type.) 234 */ 235 public DateTimeType getValueDateTimeType() throws FHIRException { 236 if (this.value == null) 237 this.value = new DateTimeType(); 238 if (!(this.value instanceof DateTimeType)) 239 throw new FHIRException("Type mismatch: the type DateTimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 240 return (DateTimeType) this.value; 241 } 242 243 public boolean hasValueDateTimeType() { 244 return this != null && this.value instanceof DateTimeType; 245 } 246 247 /** 248 * @return {@link #value} (Conveys the content if the parameter is a data type.) 249 */ 250 public DecimalType getValueDecimalType() throws FHIRException { 251 if (this.value == null) 252 this.value = new DecimalType(); 253 if (!(this.value instanceof DecimalType)) 254 throw new FHIRException("Type mismatch: the type DecimalType was expected, but "+this.value.getClass().getName()+" was encountered"); 255 return (DecimalType) this.value; 256 } 257 258 public boolean hasValueDecimalType() { 259 return this != null && this.value instanceof DecimalType; 260 } 261 262 /** 263 * @return {@link #value} (Conveys the content if the parameter is a data type.) 264 */ 265 public IdType getValueIdType() throws FHIRException { 266 if (this.value == null) 267 this.value = new IdType(); 268 if (!(this.value instanceof IdType)) 269 throw new FHIRException("Type mismatch: the type IdType was expected, but "+this.value.getClass().getName()+" was encountered"); 270 return (IdType) this.value; 271 } 272 273 public boolean hasValueIdType() { 274 return this != null && this.value instanceof IdType; 275 } 276 277 /** 278 * @return {@link #value} (Conveys the content if the parameter is a data type.) 279 */ 280 public InstantType getValueInstantType() throws FHIRException { 281 if (this.value == null) 282 this.value = new InstantType(); 283 if (!(this.value instanceof InstantType)) 284 throw new FHIRException("Type mismatch: the type InstantType was expected, but "+this.value.getClass().getName()+" was encountered"); 285 return (InstantType) this.value; 286 } 287 288 public boolean hasValueInstantType() { 289 return this != null && this.value instanceof InstantType; 290 } 291 292 /** 293 * @return {@link #value} (Conveys the content if the parameter is a data type.) 294 */ 295 public IntegerType getValueIntegerType() throws FHIRException { 296 if (this.value == null) 297 this.value = new IntegerType(); 298 if (!(this.value instanceof IntegerType)) 299 throw new FHIRException("Type mismatch: the type IntegerType was expected, but "+this.value.getClass().getName()+" was encountered"); 300 return (IntegerType) this.value; 301 } 302 303 public boolean hasValueIntegerType() { 304 return this != null && this.value instanceof IntegerType; 305 } 306 307 /** 308 * @return {@link #value} (Conveys the content if the parameter is a data type.) 309 */ 310 public Integer64Type getValueInteger64Type() throws FHIRException { 311 if (this.value == null) 312 this.value = new Integer64Type(); 313 if (!(this.value instanceof Integer64Type)) 314 throw new FHIRException("Type mismatch: the type Integer64Type was expected, but "+this.value.getClass().getName()+" was encountered"); 315 return (Integer64Type) this.value; 316 } 317 318 public boolean hasValueInteger64Type() { 319 return this != null && this.value instanceof Integer64Type; 320 } 321 322 /** 323 * @return {@link #value} (Conveys the content if the parameter is a data type.) 324 */ 325 public MarkdownType getValueMarkdownType() throws FHIRException { 326 if (this.value == null) 327 this.value = new MarkdownType(); 328 if (!(this.value instanceof MarkdownType)) 329 throw new FHIRException("Type mismatch: the type MarkdownType was expected, but "+this.value.getClass().getName()+" was encountered"); 330 return (MarkdownType) this.value; 331 } 332 333 public boolean hasValueMarkdownType() { 334 return this != null && this.value instanceof MarkdownType; 335 } 336 337 /** 338 * @return {@link #value} (Conveys the content if the parameter is a data type.) 339 */ 340 public OidType getValueOidType() throws FHIRException { 341 if (this.value == null) 342 this.value = new OidType(); 343 if (!(this.value instanceof OidType)) 344 throw new FHIRException("Type mismatch: the type OidType was expected, but "+this.value.getClass().getName()+" was encountered"); 345 return (OidType) this.value; 346 } 347 348 public boolean hasValueOidType() { 349 return this != null && this.value instanceof OidType; 350 } 351 352 /** 353 * @return {@link #value} (Conveys the content if the parameter is a data type.) 354 */ 355 public PositiveIntType getValuePositiveIntType() throws FHIRException { 356 if (this.value == null) 357 this.value = new PositiveIntType(); 358 if (!(this.value instanceof PositiveIntType)) 359 throw new FHIRException("Type mismatch: the type PositiveIntType was expected, but "+this.value.getClass().getName()+" was encountered"); 360 return (PositiveIntType) this.value; 361 } 362 363 public boolean hasValuePositiveIntType() { 364 return this != null && this.value instanceof PositiveIntType; 365 } 366 367 /** 368 * @return {@link #value} (Conveys the content if the parameter is a data type.) 369 */ 370 public StringType getValueStringType() throws FHIRException { 371 if (this.value == null) 372 this.value = new StringType(); 373 if (!(this.value instanceof StringType)) 374 throw new FHIRException("Type mismatch: the type StringType was expected, but "+this.value.getClass().getName()+" was encountered"); 375 return (StringType) this.value; 376 } 377 378 public boolean hasValueStringType() { 379 return this != null && this.value instanceof StringType; 380 } 381 382 /** 383 * @return {@link #value} (Conveys the content if the parameter is a data type.) 384 */ 385 public TimeType getValueTimeType() throws FHIRException { 386 if (this.value == null) 387 this.value = new TimeType(); 388 if (!(this.value instanceof TimeType)) 389 throw new FHIRException("Type mismatch: the type TimeType was expected, but "+this.value.getClass().getName()+" was encountered"); 390 return (TimeType) this.value; 391 } 392 393 public boolean hasValueTimeType() { 394 return this != null && this.value instanceof TimeType; 395 } 396 397 /** 398 * @return {@link #value} (Conveys the content if the parameter is a data type.) 399 */ 400 public UnsignedIntType getValueUnsignedIntType() throws FHIRException { 401 if (this.value == null) 402 this.value = new UnsignedIntType(); 403 if (!(this.value instanceof UnsignedIntType)) 404 throw new FHIRException("Type mismatch: the type UnsignedIntType was expected, but "+this.value.getClass().getName()+" was encountered"); 405 return (UnsignedIntType) this.value; 406 } 407 408 public boolean hasValueUnsignedIntType() { 409 return this != null && this.value instanceof UnsignedIntType; 410 } 411 412 /** 413 * @return {@link #value} (Conveys the content if the parameter is a data type.) 414 */ 415 public UriType getValueUriType() throws FHIRException { 416 if (this.value == null) 417 this.value = new UriType(); 418 if (!(this.value instanceof UriType)) 419 throw new FHIRException("Type mismatch: the type UriType was expected, but "+this.value.getClass().getName()+" was encountered"); 420 return (UriType) this.value; 421 } 422 423 public boolean hasValueUriType() { 424 return this != null && this.value instanceof UriType; 425 } 426 427 /** 428 * @return {@link #value} (Conveys the content if the parameter is a data type.) 429 */ 430 public UrlType getValueUrlType() throws FHIRException { 431 if (this.value == null) 432 this.value = new UrlType(); 433 if (!(this.value instanceof UrlType)) 434 throw new FHIRException("Type mismatch: the type UrlType was expected, but "+this.value.getClass().getName()+" was encountered"); 435 return (UrlType) this.value; 436 } 437 438 public boolean hasValueUrlType() { 439 return this != null && this.value instanceof UrlType; 440 } 441 442 /** 443 * @return {@link #value} (Conveys the content if the parameter is a data type.) 444 */ 445 public UuidType getValueUuidType() throws FHIRException { 446 if (this.value == null) 447 this.value = new UuidType(); 448 if (!(this.value instanceof UuidType)) 449 throw new FHIRException("Type mismatch: the type UuidType was expected, but "+this.value.getClass().getName()+" was encountered"); 450 return (UuidType) this.value; 451 } 452 453 public boolean hasValueUuidType() { 454 return this != null && this.value instanceof UuidType; 455 } 456 457 /** 458 * @return {@link #value} (Conveys the content if the parameter is a data type.) 459 */ 460 public Address getValueAddress() throws FHIRException { 461 if (this.value == null) 462 this.value = new Address(); 463 if (!(this.value instanceof Address)) 464 throw new FHIRException("Type mismatch: the type Address was expected, but "+this.value.getClass().getName()+" was encountered"); 465 return (Address) this.value; 466 } 467 468 public boolean hasValueAddress() { 469 return this != null && this.value instanceof Address; 470 } 471 472 /** 473 * @return {@link #value} (Conveys the content if the parameter is a data type.) 474 */ 475 public Age getValueAge() throws FHIRException { 476 if (this.value == null) 477 this.value = new Age(); 478 if (!(this.value instanceof Age)) 479 throw new FHIRException("Type mismatch: the type Age was expected, but "+this.value.getClass().getName()+" was encountered"); 480 return (Age) this.value; 481 } 482 483 public boolean hasValueAge() { 484 return this != null && this.value instanceof Age; 485 } 486 487 /** 488 * @return {@link #value} (Conveys the content if the parameter is a data type.) 489 */ 490 public Annotation getValueAnnotation() throws FHIRException { 491 if (this.value == null) 492 this.value = new Annotation(); 493 if (!(this.value instanceof Annotation)) 494 throw new FHIRException("Type mismatch: the type Annotation was expected, but "+this.value.getClass().getName()+" was encountered"); 495 return (Annotation) this.value; 496 } 497 498 public boolean hasValueAnnotation() { 499 return this != null && this.value instanceof Annotation; 500 } 501 502 /** 503 * @return {@link #value} (Conveys the content if the parameter is a data type.) 504 */ 505 public Attachment getValueAttachment() throws FHIRException { 506 if (this.value == null) 507 this.value = new Attachment(); 508 if (!(this.value instanceof Attachment)) 509 throw new FHIRException("Type mismatch: the type Attachment was expected, but "+this.value.getClass().getName()+" was encountered"); 510 return (Attachment) this.value; 511 } 512 513 public boolean hasValueAttachment() { 514 return this != null && this.value instanceof Attachment; 515 } 516 517 /** 518 * @return {@link #value} (Conveys the content if the parameter is a data type.) 519 */ 520 public CodeableConcept getValueCodeableConcept() throws FHIRException { 521 if (this.value == null) 522 this.value = new CodeableConcept(); 523 if (!(this.value instanceof CodeableConcept)) 524 throw new FHIRException("Type mismatch: the type CodeableConcept was expected, but "+this.value.getClass().getName()+" was encountered"); 525 return (CodeableConcept) this.value; 526 } 527 528 public boolean hasValueCodeableConcept() { 529 return this != null && this.value instanceof CodeableConcept; 530 } 531 532 /** 533 * @return {@link #value} (Conveys the content if the parameter is a data type.) 534 */ 535 public CodeableReference getValueCodeableReference() throws FHIRException { 536 if (this.value == null) 537 this.value = new CodeableReference(); 538 if (!(this.value instanceof CodeableReference)) 539 throw new FHIRException("Type mismatch: the type CodeableReference was expected, but "+this.value.getClass().getName()+" was encountered"); 540 return (CodeableReference) this.value; 541 } 542 543 public boolean hasValueCodeableReference() { 544 return this != null && this.value instanceof CodeableReference; 545 } 546 547 /** 548 * @return {@link #value} (Conveys the content if the parameter is a data type.) 549 */ 550 public Coding getValueCoding() throws FHIRException { 551 if (this.value == null) 552 this.value = new Coding(); 553 if (!(this.value instanceof Coding)) 554 throw new FHIRException("Type mismatch: the type Coding was expected, but "+this.value.getClass().getName()+" was encountered"); 555 return (Coding) this.value; 556 } 557 558 public boolean hasValueCoding() { 559 return this != null && this.value instanceof Coding; 560 } 561 562 /** 563 * @return {@link #value} (Conveys the content if the parameter is a data type.) 564 */ 565 public ContactPoint getValueContactPoint() throws FHIRException { 566 if (this.value == null) 567 this.value = new ContactPoint(); 568 if (!(this.value instanceof ContactPoint)) 569 throw new FHIRException("Type mismatch: the type ContactPoint was expected, but "+this.value.getClass().getName()+" was encountered"); 570 return (ContactPoint) this.value; 571 } 572 573 public boolean hasValueContactPoint() { 574 return this != null && this.value instanceof ContactPoint; 575 } 576 577 /** 578 * @return {@link #value} (Conveys the content if the parameter is a data type.) 579 */ 580 public Count getValueCount() throws FHIRException { 581 if (this.value == null) 582 this.value = new Count(); 583 if (!(this.value instanceof Count)) 584 throw new FHIRException("Type mismatch: the type Count was expected, but "+this.value.getClass().getName()+" was encountered"); 585 return (Count) this.value; 586 } 587 588 public boolean hasValueCount() { 589 return this != null && this.value instanceof Count; 590 } 591 592 /** 593 * @return {@link #value} (Conveys the content if the parameter is a data type.) 594 */ 595 public Distance getValueDistance() throws FHIRException { 596 if (this.value == null) 597 this.value = new Distance(); 598 if (!(this.value instanceof Distance)) 599 throw new FHIRException("Type mismatch: the type Distance was expected, but "+this.value.getClass().getName()+" was encountered"); 600 return (Distance) this.value; 601 } 602 603 public boolean hasValueDistance() { 604 return this != null && this.value instanceof Distance; 605 } 606 607 /** 608 * @return {@link #value} (Conveys the content if the parameter is a data type.) 609 */ 610 public Duration getValueDuration() throws FHIRException { 611 if (this.value == null) 612 this.value = new Duration(); 613 if (!(this.value instanceof Duration)) 614 throw new FHIRException("Type mismatch: the type Duration was expected, but "+this.value.getClass().getName()+" was encountered"); 615 return (Duration) this.value; 616 } 617 618 public boolean hasValueDuration() { 619 return this != null && this.value instanceof Duration; 620 } 621 622 /** 623 * @return {@link #value} (Conveys the content if the parameter is a data type.) 624 */ 625 public HumanName getValueHumanName() throws FHIRException { 626 if (this.value == null) 627 this.value = new HumanName(); 628 if (!(this.value instanceof HumanName)) 629 throw new FHIRException("Type mismatch: the type HumanName was expected, but "+this.value.getClass().getName()+" was encountered"); 630 return (HumanName) this.value; 631 } 632 633 public boolean hasValueHumanName() { 634 return this != null && this.value instanceof HumanName; 635 } 636 637 /** 638 * @return {@link #value} (Conveys the content if the parameter is a data type.) 639 */ 640 public Identifier getValueIdentifier() throws FHIRException { 641 if (this.value == null) 642 this.value = new Identifier(); 643 if (!(this.value instanceof Identifier)) 644 throw new FHIRException("Type mismatch: the type Identifier was expected, but "+this.value.getClass().getName()+" was encountered"); 645 return (Identifier) this.value; 646 } 647 648 public boolean hasValueIdentifier() { 649 return this != null && this.value instanceof Identifier; 650 } 651 652 /** 653 * @return {@link #value} (Conveys the content if the parameter is a data type.) 654 */ 655 public Money getValueMoney() throws FHIRException { 656 if (this.value == null) 657 this.value = new Money(); 658 if (!(this.value instanceof Money)) 659 throw new FHIRException("Type mismatch: the type Money was expected, but "+this.value.getClass().getName()+" was encountered"); 660 return (Money) this.value; 661 } 662 663 public boolean hasValueMoney() { 664 return this != null && this.value instanceof Money; 665 } 666 667 /** 668 * @return {@link #value} (Conveys the content if the parameter is a data type.) 669 */ 670 public Period getValuePeriod() throws FHIRException { 671 if (this.value == null) 672 this.value = new Period(); 673 if (!(this.value instanceof Period)) 674 throw new FHIRException("Type mismatch: the type Period was expected, but "+this.value.getClass().getName()+" was encountered"); 675 return (Period) this.value; 676 } 677 678 public boolean hasValuePeriod() { 679 return this != null && this.value instanceof Period; 680 } 681 682 /** 683 * @return {@link #value} (Conveys the content if the parameter is a data type.) 684 */ 685 public Quantity getValueQuantity() throws FHIRException { 686 if (this.value == null) 687 this.value = new Quantity(); 688 if (!(this.value instanceof Quantity)) 689 throw new FHIRException("Type mismatch: the type Quantity was expected, but "+this.value.getClass().getName()+" was encountered"); 690 return (Quantity) this.value; 691 } 692 693 public boolean hasValueQuantity() { 694 return this != null && this.value instanceof Quantity; 695 } 696 697 /** 698 * @return {@link #value} (Conveys the content if the parameter is a data type.) 699 */ 700 public Range getValueRange() throws FHIRException { 701 if (this.value == null) 702 this.value = new Range(); 703 if (!(this.value instanceof Range)) 704 throw new FHIRException("Type mismatch: the type Range was expected, but "+this.value.getClass().getName()+" was encountered"); 705 return (Range) this.value; 706 } 707 708 public boolean hasValueRange() { 709 return this != null && this.value instanceof Range; 710 } 711 712 /** 713 * @return {@link #value} (Conveys the content if the parameter is a data type.) 714 */ 715 public Ratio getValueRatio() throws FHIRException { 716 if (this.value == null) 717 this.value = new Ratio(); 718 if (!(this.value instanceof Ratio)) 719 throw new FHIRException("Type mismatch: the type Ratio was expected, but "+this.value.getClass().getName()+" was encountered"); 720 return (Ratio) this.value; 721 } 722 723 public boolean hasValueRatio() { 724 return this != null && this.value instanceof Ratio; 725 } 726 727 /** 728 * @return {@link #value} (Conveys the content if the parameter is a data type.) 729 */ 730 public RatioRange getValueRatioRange() throws FHIRException { 731 if (this.value == null) 732 this.value = new RatioRange(); 733 if (!(this.value instanceof RatioRange)) 734 throw new FHIRException("Type mismatch: the type RatioRange was expected, but "+this.value.getClass().getName()+" was encountered"); 735 return (RatioRange) this.value; 736 } 737 738 public boolean hasValueRatioRange() { 739 return this != null && this.value instanceof RatioRange; 740 } 741 742 /** 743 * @return {@link #value} (Conveys the content if the parameter is a data type.) 744 */ 745 public Reference getValueReference() throws FHIRException { 746 if (this.value == null) 747 this.value = new Reference(); 748 if (!(this.value instanceof Reference)) 749 throw new FHIRException("Type mismatch: the type Reference was expected, but "+this.value.getClass().getName()+" was encountered"); 750 return (Reference) this.value; 751 } 752 753 public boolean hasValueReference() { 754 return this != null && this.value instanceof Reference; 755 } 756 757 /** 758 * @return {@link #value} (Conveys the content if the parameter is a data type.) 759 */ 760 public SampledData getValueSampledData() throws FHIRException { 761 if (this.value == null) 762 this.value = new SampledData(); 763 if (!(this.value instanceof SampledData)) 764 throw new FHIRException("Type mismatch: the type SampledData was expected, but "+this.value.getClass().getName()+" was encountered"); 765 return (SampledData) this.value; 766 } 767 768 public boolean hasValueSampledData() { 769 return this != null && this.value instanceof SampledData; 770 } 771 772 /** 773 * @return {@link #value} (Conveys the content if the parameter is a data type.) 774 */ 775 public Signature getValueSignature() throws FHIRException { 776 if (this.value == null) 777 this.value = new Signature(); 778 if (!(this.value instanceof Signature)) 779 throw new FHIRException("Type mismatch: the type Signature was expected, but "+this.value.getClass().getName()+" was encountered"); 780 return (Signature) this.value; 781 } 782 783 public boolean hasValueSignature() { 784 return this != null && this.value instanceof Signature; 785 } 786 787 /** 788 * @return {@link #value} (Conveys the content if the parameter is a data type.) 789 */ 790 public Timing getValueTiming() throws FHIRException { 791 if (this.value == null) 792 this.value = new Timing(); 793 if (!(this.value instanceof Timing)) 794 throw new FHIRException("Type mismatch: the type Timing was expected, but "+this.value.getClass().getName()+" was encountered"); 795 return (Timing) this.value; 796 } 797 798 public boolean hasValueTiming() { 799 return this != null && this.value instanceof Timing; 800 } 801 802 /** 803 * @return {@link #value} (Conveys the content if the parameter is a data type.) 804 */ 805 public ContactDetail getValueContactDetail() throws FHIRException { 806 if (this.value == null) 807 this.value = new ContactDetail(); 808 if (!(this.value instanceof ContactDetail)) 809 throw new FHIRException("Type mismatch: the type ContactDetail was expected, but "+this.value.getClass().getName()+" was encountered"); 810 return (ContactDetail) this.value; 811 } 812 813 public boolean hasValueContactDetail() { 814 return this != null && this.value instanceof ContactDetail; 815 } 816 817 /** 818 * @return {@link #value} (Conveys the content if the parameter is a data type.) 819 */ 820 public DataRequirement getValueDataRequirement() throws FHIRException { 821 if (this.value == null) 822 this.value = new DataRequirement(); 823 if (!(this.value instanceof DataRequirement)) 824 throw new FHIRException("Type mismatch: the type DataRequirement was expected, but "+this.value.getClass().getName()+" was encountered"); 825 return (DataRequirement) this.value; 826 } 827 828 public boolean hasValueDataRequirement() { 829 return this != null && this.value instanceof DataRequirement; 830 } 831 832 /** 833 * @return {@link #value} (Conveys the content if the parameter is a data type.) 834 */ 835 public Expression getValueExpression() throws FHIRException { 836 if (this.value == null) 837 this.value = new Expression(); 838 if (!(this.value instanceof Expression)) 839 throw new FHIRException("Type mismatch: the type Expression was expected, but "+this.value.getClass().getName()+" was encountered"); 840 return (Expression) this.value; 841 } 842 843 public boolean hasValueExpression() { 844 return this != null && this.value instanceof Expression; 845 } 846 847 /** 848 * @return {@link #value} (Conveys the content if the parameter is a data type.) 849 */ 850 public ParameterDefinition getValueParameterDefinition() throws FHIRException { 851 if (this.value == null) 852 this.value = new ParameterDefinition(); 853 if (!(this.value instanceof ParameterDefinition)) 854 throw new FHIRException("Type mismatch: the type ParameterDefinition was expected, but "+this.value.getClass().getName()+" was encountered"); 855 return (ParameterDefinition) this.value; 856 } 857 858 public boolean hasValueParameterDefinition() { 859 return this != null && this.value instanceof ParameterDefinition; 860 } 861 862 /** 863 * @return {@link #value} (Conveys the content if the parameter is a data type.) 864 */ 865 public RelatedArtifact getValueRelatedArtifact() throws FHIRException { 866 if (this.value == null) 867 this.value = new RelatedArtifact(); 868 if (!(this.value instanceof RelatedArtifact)) 869 throw new FHIRException("Type mismatch: the type RelatedArtifact was expected, but "+this.value.getClass().getName()+" was encountered"); 870 return (RelatedArtifact) this.value; 871 } 872 873 public boolean hasValueRelatedArtifact() { 874 return this != null && this.value instanceof RelatedArtifact; 875 } 876 877 /** 878 * @return {@link #value} (Conveys the content if the parameter is a data type.) 879 */ 880 public TriggerDefinition getValueTriggerDefinition() throws FHIRException { 881 if (this.value == null) 882 this.value = new TriggerDefinition(); 883 if (!(this.value instanceof TriggerDefinition)) 884 throw new FHIRException("Type mismatch: the type TriggerDefinition was expected, but "+this.value.getClass().getName()+" was encountered"); 885 return (TriggerDefinition) this.value; 886 } 887 888 public boolean hasValueTriggerDefinition() { 889 return this != null && this.value instanceof TriggerDefinition; 890 } 891 892 /** 893 * @return {@link #value} (Conveys the content if the parameter is a data type.) 894 */ 895 public UsageContext getValueUsageContext() throws FHIRException { 896 if (this.value == null) 897 this.value = new UsageContext(); 898 if (!(this.value instanceof UsageContext)) 899 throw new FHIRException("Type mismatch: the type UsageContext was expected, but "+this.value.getClass().getName()+" was encountered"); 900 return (UsageContext) this.value; 901 } 902 903 public boolean hasValueUsageContext() { 904 return this != null && this.value instanceof UsageContext; 905 } 906 907 /** 908 * @return {@link #value} (Conveys the content if the parameter is a data type.) 909 */ 910 public Availability getValueAvailability() throws FHIRException { 911 if (this.value == null) 912 this.value = new Availability(); 913 if (!(this.value instanceof Availability)) 914 throw new FHIRException("Type mismatch: the type Availability was expected, but "+this.value.getClass().getName()+" was encountered"); 915 return (Availability) this.value; 916 } 917 918 public boolean hasValueAvailability() { 919 return this != null && this.value instanceof Availability; 920 } 921 922 /** 923 * @return {@link #value} (Conveys the content if the parameter is a data type.) 924 */ 925 public ExtendedContactDetail getValueExtendedContactDetail() throws FHIRException { 926 if (this.value == null) 927 this.value = new ExtendedContactDetail(); 928 if (!(this.value instanceof ExtendedContactDetail)) 929 throw new FHIRException("Type mismatch: the type ExtendedContactDetail was expected, but "+this.value.getClass().getName()+" was encountered"); 930 return (ExtendedContactDetail) this.value; 931 } 932 933 public boolean hasValueExtendedContactDetail() { 934 return this != null && this.value instanceof ExtendedContactDetail; 935 } 936 937 /** 938 * @return {@link #value} (Conveys the content if the parameter is a data type.) 939 */ 940 public Dosage getValueDosage() throws FHIRException { 941 if (this.value == null) 942 this.value = new Dosage(); 943 if (!(this.value instanceof Dosage)) 944 throw new FHIRException("Type mismatch: the type Dosage was expected, but "+this.value.getClass().getName()+" was encountered"); 945 return (Dosage) this.value; 946 } 947 948 public boolean hasValueDosage() { 949 return this != null && this.value instanceof Dosage; 950 } 951 952 /** 953 * @return {@link #value} (Conveys the content if the parameter is a data type.) 954 */ 955 public Meta getValueMeta() throws FHIRException { 956 if (this.value == null) 957 this.value = new Meta(); 958 if (!(this.value instanceof Meta)) 959 throw new FHIRException("Type mismatch: the type Meta was expected, but "+this.value.getClass().getName()+" was encountered"); 960 return (Meta) this.value; 961 } 962 963 public boolean hasValueMeta() { 964 return this != null && this.value instanceof Meta; 965 } 966 967 public boolean hasValue() { 968 return this.value != null && !this.value.isEmpty(); 969 } 970 971 /** 972 * @param value {@link #value} (Conveys the content if the parameter is a data type.) 973 */ 974 public ParametersParameterComponent setValue(DataType value) { 975 if (value != null && !(value instanceof Base64BinaryType || value instanceof BooleanType || value instanceof CanonicalType || value instanceof CodeType || value instanceof DateType || value instanceof DateTimeType || value instanceof DecimalType || value instanceof IdType || value instanceof InstantType || value instanceof IntegerType || value instanceof Integer64Type || value instanceof MarkdownType || value instanceof OidType || value instanceof PositiveIntType || value instanceof StringType || value instanceof TimeType || value instanceof UnsignedIntType || value instanceof UriType || value instanceof UrlType || value instanceof UuidType || value instanceof Address || value instanceof Age || value instanceof Annotation || value instanceof Attachment || value instanceof CodeableConcept || value instanceof CodeableReference || value instanceof Coding || value instanceof ContactPoint || value instanceof Count || value instanceof Distance || value instanceof Duration || value instanceof HumanName || value instanceof Identifier || value instanceof Money || value instanceof Period || value instanceof Quantity || value instanceof Range || value instanceof Ratio || value instanceof RatioRange || value instanceof Reference || value instanceof SampledData || value instanceof Signature || value instanceof Timing || value instanceof ContactDetail || value instanceof DataRequirement || value instanceof Expression || value instanceof ParameterDefinition || value instanceof RelatedArtifact || value instanceof TriggerDefinition || value instanceof UsageContext || value instanceof Availability || value instanceof ExtendedContactDetail || value instanceof Dosage || value instanceof Meta)) 976 throw new FHIRException("Not the right type for Parameters.parameter.value[x]: "+value.fhirType()); 977 this.value = value; 978 return this; 979 } 980 981 /** 982 * @return {@link #resource} (Conveys the content if the parameter is a whole resource.) 983 */ 984 public Resource getResource() { 985 return this.resource; 986 } 987 988 public boolean hasResource() { 989 return this.resource != null && !this.resource.isEmpty(); 990 } 991 992 /** 993 * @param value {@link #resource} (Conveys the content if the parameter is a whole resource.) 994 */ 995 public ParametersParameterComponent setResource(Resource value) { 996 this.resource = value; 997 return this; 998 } 999 1000 /** 1001 * @return {@link #part} (A named part of a multi-part parameter.) 1002 */ 1003 public List<ParametersParameterComponent> getPart() { 1004 if (this.part == null) 1005 this.part = new ArrayList<ParametersParameterComponent>(); 1006 return this.part; 1007 } 1008 1009 /** 1010 * @return Returns a reference to <code>this</code> for easy method chaining 1011 */ 1012 public ParametersParameterComponent setPart(List<ParametersParameterComponent> thePart) { 1013 this.part = thePart; 1014 return this; 1015 } 1016 1017 public boolean hasPart() { 1018 if (this.part == null) 1019 return false; 1020 for (ParametersParameterComponent item : this.part) 1021 if (!item.isEmpty()) 1022 return true; 1023 return false; 1024 } 1025 1026 public ParametersParameterComponent addPart() { //3 1027 ParametersParameterComponent t = new ParametersParameterComponent(); 1028 if (this.part == null) 1029 this.part = new ArrayList<ParametersParameterComponent>(); 1030 this.part.add(t); 1031 return t; 1032 } 1033 1034 public ParametersParameterComponent addPart(ParametersParameterComponent t) { //3 1035 if (t == null) 1036 return this; 1037 if (this.part == null) 1038 this.part = new ArrayList<ParametersParameterComponent>(); 1039 this.part.add(t); 1040 return this; 1041 } 1042 1043 /** 1044 * @return The first repetition of repeating field {@link #part}, creating it if it does not already exist {3} 1045 */ 1046 public ParametersParameterComponent getPartFirstRep() { 1047 if (getPart().isEmpty()) { 1048 addPart(); 1049 } 1050 return getPart().get(0); 1051 } 1052 1053 protected void listChildren(List<Property> children) { 1054 super.listChildren(children); 1055 children.add(new Property("name", "string", "The name of the parameter (reference to the operation definition).", 0, 1, name)); 1056 children.add(new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "Conveys the content if the parameter is a data type.", 0, 1, value)); 1057 children.add(new Property("resource", "Resource", "Conveys the content if the parameter is a whole resource.", 0, 1, resource)); 1058 children.add(new Property("part", "@Parameters.parameter", "A named part of a multi-part parameter.", 0, java.lang.Integer.MAX_VALUE, part)); 1059 } 1060 1061 @Override 1062 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1063 switch (_hash) { 1064 case 3373707: /*name*/ return new Property("name", "string", "The name of the parameter (reference to the operation definition).", 0, 1, name); 1065 case -1410166417: /*value[x]*/ return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "Conveys the content if the parameter is a data type.", 0, 1, value); 1066 case 111972721: /*value*/ return new Property("value[x]", "base64Binary|boolean|canonical|code|date|dateTime|decimal|id|instant|integer|integer64|markdown|oid|positiveInt|string|time|unsignedInt|uri|url|uuid|Address|Age|Annotation|Attachment|CodeableConcept|CodeableReference|Coding|ContactPoint|Count|Distance|Duration|HumanName|Identifier|Money|Period|Quantity|Range|Ratio|RatioRange|Reference|SampledData|Signature|Timing|ContactDetail|DataRequirement|Expression|ParameterDefinition|RelatedArtifact|TriggerDefinition|UsageContext|Availability|ExtendedContactDetail|Dosage|Meta", "Conveys the content if the parameter is a data type.", 0, 1, value); 1067 case -1535024575: /*valueBase64Binary*/ return new Property("value[x]", "base64Binary", "Conveys the content if the parameter is a data type.", 0, 1, value); 1068 case 733421943: /*valueBoolean*/ return new Property("value[x]", "boolean", "Conveys the content if the parameter is a data type.", 0, 1, value); 1069 case -786218365: /*valueCanonical*/ return new Property("value[x]", "canonical", "Conveys the content if the parameter is a data type.", 0, 1, value); 1070 case -766209282: /*valueCode*/ return new Property("value[x]", "code", "Conveys the content if the parameter is a data type.", 0, 1, value); 1071 case -766192449: /*valueDate*/ return new Property("value[x]", "date", "Conveys the content if the parameter is a data type.", 0, 1, value); 1072 case 1047929900: /*valueDateTime*/ return new Property("value[x]", "dateTime", "Conveys the content if the parameter is a data type.", 0, 1, value); 1073 case -2083993440: /*valueDecimal*/ return new Property("value[x]", "decimal", "Conveys the content if the parameter is a data type.", 0, 1, value); 1074 case 231604844: /*valueId*/ return new Property("value[x]", "id", "Conveys the content if the parameter is a data type.", 0, 1, value); 1075 case -1668687056: /*valueInstant*/ return new Property("value[x]", "instant", "Conveys the content if the parameter is a data type.", 0, 1, value); 1076 case -1668204915: /*valueInteger*/ return new Property("value[x]", "integer", "Conveys the content if the parameter is a data type.", 0, 1, value); 1077 case -1122120181: /*valueInteger64*/ return new Property("value[x]", "integer64", "Conveys the content if the parameter is a data type.", 0, 1, value); 1078 case -497880704: /*valueMarkdown*/ return new Property("value[x]", "markdown", "Conveys the content if the parameter is a data type.", 0, 1, value); 1079 case -1410178407: /*valueOid*/ return new Property("value[x]", "oid", "Conveys the content if the parameter is a data type.", 0, 1, value); 1080 case -1249932027: /*valuePositiveInt*/ return new Property("value[x]", "positiveInt", "Conveys the content if the parameter is a data type.", 0, 1, value); 1081 case -1424603934: /*valueString*/ return new Property("value[x]", "string", "Conveys the content if the parameter is a data type.", 0, 1, value); 1082 case -765708322: /*valueTime*/ return new Property("value[x]", "time", "Conveys the content if the parameter is a data type.", 0, 1, value); 1083 case 26529417: /*valueUnsignedInt*/ return new Property("value[x]", "unsignedInt", "Conveys the content if the parameter is a data type.", 0, 1, value); 1084 case -1410172357: /*valueUri*/ return new Property("value[x]", "uri", "Conveys the content if the parameter is a data type.", 0, 1, value); 1085 case -1410172354: /*valueUrl*/ return new Property("value[x]", "url", "Conveys the content if the parameter is a data type.", 0, 1, value); 1086 case -765667124: /*valueUuid*/ return new Property("value[x]", "uuid", "Conveys the content if the parameter is a data type.", 0, 1, value); 1087 case -478981821: /*valueAddress*/ return new Property("value[x]", "Address", "Conveys the content if the parameter is a data type.", 0, 1, value); 1088 case -1410191922: /*valueAge*/ return new Property("value[x]", "Age", "Conveys the content if the parameter is a data type.", 0, 1, value); 1089 case -67108992: /*valueAnnotation*/ return new Property("value[x]", "Annotation", "Conveys the content if the parameter is a data type.", 0, 1, value); 1090 case -475566732: /*valueAttachment*/ return new Property("value[x]", "Attachment", "Conveys the content if the parameter is a data type.", 0, 1, value); 1091 case 924902896: /*valueCodeableConcept*/ return new Property("value[x]", "CodeableConcept", "Conveys the content if the parameter is a data type.", 0, 1, value); 1092 case -257955629: /*valueCodeableReference*/ return new Property("value[x]", "CodeableReference", "Conveys the content if the parameter is a data type.", 0, 1, value); 1093 case -1887705029: /*valueCoding*/ return new Property("value[x]", "Coding", "Conveys the content if the parameter is a data type.", 0, 1, value); 1094 case 944904545: /*valueContactPoint*/ return new Property("value[x]", "ContactPoint", "Conveys the content if the parameter is a data type.", 0, 1, value); 1095 case 2017332766: /*valueCount*/ return new Property("value[x]", "Count", "Conveys the content if the parameter is a data type.", 0, 1, value); 1096 case -456359802: /*valueDistance*/ return new Property("value[x]", "Distance", "Conveys the content if the parameter is a data type.", 0, 1, value); 1097 case 1558135333: /*valueDuration*/ return new Property("value[x]", "Duration", "Conveys the content if the parameter is a data type.", 0, 1, value); 1098 case -2026205465: /*valueHumanName*/ return new Property("value[x]", "HumanName", "Conveys the content if the parameter is a data type.", 0, 1, value); 1099 case -130498310: /*valueIdentifier*/ return new Property("value[x]", "Identifier", "Conveys the content if the parameter is a data type.", 0, 1, value); 1100 case 2026560975: /*valueMoney*/ return new Property("value[x]", "Money", "Conveys the content if the parameter is a data type.", 0, 1, value); 1101 case -1524344174: /*valuePeriod*/ return new Property("value[x]", "Period", "Conveys the content if the parameter is a data type.", 0, 1, value); 1102 case -2029823716: /*valueQuantity*/ return new Property("value[x]", "Quantity", "Conveys the content if the parameter is a data type.", 0, 1, value); 1103 case 2030761548: /*valueRange*/ return new Property("value[x]", "Range", "Conveys the content if the parameter is a data type.", 0, 1, value); 1104 case 2030767386: /*valueRatio*/ return new Property("value[x]", "Ratio", "Conveys the content if the parameter is a data type.", 0, 1, value); 1105 case -706454461: /*valueRatioRange*/ return new Property("value[x]", "RatioRange", "Conveys the content if the parameter is a data type.", 0, 1, value); 1106 case 1755241690: /*valueReference*/ return new Property("value[x]", "Reference", "Conveys the content if the parameter is a data type.", 0, 1, value); 1107 case -962229101: /*valueSampledData*/ return new Property("value[x]", "SampledData", "Conveys the content if the parameter is a data type.", 0, 1, value); 1108 case -540985785: /*valueSignature*/ return new Property("value[x]", "Signature", "Conveys the content if the parameter is a data type.", 0, 1, value); 1109 case -1406282469: /*valueTiming*/ return new Property("value[x]", "Timing", "Conveys the content if the parameter is a data type.", 0, 1, value); 1110 case -1125200224: /*valueContactDetail*/ return new Property("value[x]", "ContactDetail", "Conveys the content if the parameter is a data type.", 0, 1, value); 1111 case 1710554248: /*valueDataRequirement*/ return new Property("value[x]", "DataRequirement", "Conveys the content if the parameter is a data type.", 0, 1, value); 1112 case -307517719: /*valueExpression*/ return new Property("value[x]", "Expression", "Conveys the content if the parameter is a data type.", 0, 1, value); 1113 case 1387478187: /*valueParameterDefinition*/ return new Property("value[x]", "ParameterDefinition", "Conveys the content if the parameter is a data type.", 0, 1, value); 1114 case 1748214124: /*valueRelatedArtifact*/ return new Property("value[x]", "RelatedArtifact", "Conveys the content if the parameter is a data type.", 0, 1, value); 1115 case 976830394: /*valueTriggerDefinition*/ return new Property("value[x]", "TriggerDefinition", "Conveys the content if the parameter is a data type.", 0, 1, value); 1116 case 588000479: /*valueUsageContext*/ return new Property("value[x]", "UsageContext", "Conveys the content if the parameter is a data type.", 0, 1, value); 1117 case 1678530924: /*valueAvailability*/ return new Property("value[x]", "Availability", "Conveys the content if the parameter is a data type.", 0, 1, value); 1118 case -1567222041: /*valueExtendedContactDetail*/ return new Property("value[x]", "ExtendedContactDetail", "Conveys the content if the parameter is a data type.", 0, 1, value); 1119 case -1858636920: /*valueDosage*/ return new Property("value[x]", "Dosage", "Conveys the content if the parameter is a data type.", 0, 1, value); 1120 case -765920490: /*valueMeta*/ return new Property("value[x]", "Meta", "Conveys the content if the parameter is a data type.", 0, 1, value); 1121 case -341064690: /*resource*/ return new Property("resource", "Resource", "Conveys the content if the parameter is a whole resource.", 0, 1, resource); 1122 case 3433459: /*part*/ return new Property("part", "@Parameters.parameter", "A named part of a multi-part parameter.", 0, java.lang.Integer.MAX_VALUE, part); 1123 default: return super.getNamedProperty(_hash, _name, _checkValid); 1124 } 1125 1126 } 1127 1128 @Override 1129 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1130 switch (hash) { 1131 case 3373707: /*name*/ return this.name == null ? new Base[0] : new Base[] {this.name}; // StringType 1132 case 111972721: /*value*/ return this.value == null ? new Base[0] : new Base[] {this.value}; // DataType 1133 case -341064690: /*resource*/ return this.resource == null ? new Base[0] : new Base[] {this.resource}; // Resource 1134 case 3433459: /*part*/ return this.part == null ? new Base[0] : this.part.toArray(new Base[this.part.size()]); // ParametersParameterComponent 1135 default: return super.getProperty(hash, name, checkValid); 1136 } 1137 1138 } 1139 1140 @Override 1141 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1142 switch (hash) { 1143 case 3373707: // name 1144 this.name = TypeConvertor.castToString(value); // StringType 1145 return value; 1146 case 111972721: // value 1147 this.value = TypeConvertor.castToType(value); // DataType 1148 return value; 1149 case -341064690: // resource 1150 this.resource = TypeConvertor.castToResource(value); // Resource 1151 return value; 1152 case 3433459: // part 1153 this.getPart().add((ParametersParameterComponent) value); // ParametersParameterComponent 1154 return value; 1155 default: return super.setProperty(hash, name, value); 1156 } 1157 1158 } 1159 1160 @Override 1161 public Base setProperty(String name, Base value) throws FHIRException { 1162 if (name.equals("name")) { 1163 this.name = TypeConvertor.castToString(value); // StringType 1164 } else if (name.equals("value[x]")) { 1165 this.value = TypeConvertor.castToType(value); // DataType 1166 } else if (name.equals("resource")) { 1167 this.resource = TypeConvertor.castToResource(value); // Resource 1168 } else if (name.equals("part")) { 1169 this.getPart().add((ParametersParameterComponent) value); 1170 } else 1171 return super.setProperty(name, value); 1172 return value; 1173 } 1174 1175 @Override 1176 public Base makeProperty(int hash, String name) throws FHIRException { 1177 switch (hash) { 1178 case 3373707: return getNameElement(); 1179 case -1410166417: return getValue(); 1180 case 111972721: return getValue(); 1181 case -341064690: throw new FHIRException("Cannot make property resource as it is not a complex type"); // Resource 1182 case 3433459: return addPart(); 1183 default: return super.makeProperty(hash, name); 1184 } 1185 1186 } 1187 1188 @Override 1189 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1190 switch (hash) { 1191 case 3373707: /*name*/ return new String[] {"string"}; 1192 case 111972721: /*value*/ return new String[] {"base64Binary", "boolean", "canonical", "code", "date", "dateTime", "decimal", "id", "instant", "integer", "integer64", "markdown", "oid", "positiveInt", "string", "time", "unsignedInt", "uri", "url", "uuid", "Address", "Age", "Annotation", "Attachment", "CodeableConcept", "CodeableReference", "Coding", "ContactPoint", "Count", "Distance", "Duration", "HumanName", "Identifier", "Money", "Period", "Quantity", "Range", "Ratio", "RatioRange", "Reference", "SampledData", "Signature", "Timing", "ContactDetail", "DataRequirement", "Expression", "ParameterDefinition", "RelatedArtifact", "TriggerDefinition", "UsageContext", "Availability", "ExtendedContactDetail", "Dosage", "Meta"}; 1193 case -341064690: /*resource*/ return new String[] {"Resource"}; 1194 case 3433459: /*part*/ return new String[] {"@Parameters.parameter"}; 1195 default: return super.getTypesForProperty(hash, name); 1196 } 1197 1198 } 1199 1200 @Override 1201 public Base addChild(String name) throws FHIRException { 1202 if (name.equals("name")) { 1203 throw new FHIRException("Cannot call addChild on a singleton property Parameters.parameter.name"); 1204 } 1205 else if (name.equals("valueBase64Binary")) { 1206 this.value = new Base64BinaryType(); 1207 return this.value; 1208 } 1209 else if (name.equals("valueBoolean")) { 1210 this.value = new BooleanType(); 1211 return this.value; 1212 } 1213 else if (name.equals("valueCanonical")) { 1214 this.value = new CanonicalType(); 1215 return this.value; 1216 } 1217 else if (name.equals("valueCode")) { 1218 this.value = new CodeType(); 1219 return this.value; 1220 } 1221 else if (name.equals("valueDate")) { 1222 this.value = new DateType(); 1223 return this.value; 1224 } 1225 else if (name.equals("valueDateTime")) { 1226 this.value = new DateTimeType(); 1227 return this.value; 1228 } 1229 else if (name.equals("valueDecimal")) { 1230 this.value = new DecimalType(); 1231 return this.value; 1232 } 1233 else if (name.equals("valueId")) { 1234 this.value = new IdType(); 1235 return this.value; 1236 } 1237 else if (name.equals("valueInstant")) { 1238 this.value = new InstantType(); 1239 return this.value; 1240 } 1241 else if (name.equals("valueInteger")) { 1242 this.value = new IntegerType(); 1243 return this.value; 1244 } 1245 else if (name.equals("valueInteger64")) { 1246 this.value = new Integer64Type(); 1247 return this.value; 1248 } 1249 else if (name.equals("valueMarkdown")) { 1250 this.value = new MarkdownType(); 1251 return this.value; 1252 } 1253 else if (name.equals("valueOid")) { 1254 this.value = new OidType(); 1255 return this.value; 1256 } 1257 else if (name.equals("valuePositiveInt")) { 1258 this.value = new PositiveIntType(); 1259 return this.value; 1260 } 1261 else if (name.equals("valueString")) { 1262 this.value = new StringType(); 1263 return this.value; 1264 } 1265 else if (name.equals("valueTime")) { 1266 this.value = new TimeType(); 1267 return this.value; 1268 } 1269 else if (name.equals("valueUnsignedInt")) { 1270 this.value = new UnsignedIntType(); 1271 return this.value; 1272 } 1273 else if (name.equals("valueUri")) { 1274 this.value = new UriType(); 1275 return this.value; 1276 } 1277 else if (name.equals("valueUrl")) { 1278 this.value = new UrlType(); 1279 return this.value; 1280 } 1281 else if (name.equals("valueUuid")) { 1282 this.value = new UuidType(); 1283 return this.value; 1284 } 1285 else if (name.equals("valueAddress")) { 1286 this.value = new Address(); 1287 return this.value; 1288 } 1289 else if (name.equals("valueAge")) { 1290 this.value = new Age(); 1291 return this.value; 1292 } 1293 else if (name.equals("valueAnnotation")) { 1294 this.value = new Annotation(); 1295 return this.value; 1296 } 1297 else if (name.equals("valueAttachment")) { 1298 this.value = new Attachment(); 1299 return this.value; 1300 } 1301 else if (name.equals("valueCodeableConcept")) { 1302 this.value = new CodeableConcept(); 1303 return this.value; 1304 } 1305 else if (name.equals("valueCodeableReference")) { 1306 this.value = new CodeableReference(); 1307 return this.value; 1308 } 1309 else if (name.equals("valueCoding")) { 1310 this.value = new Coding(); 1311 return this.value; 1312 } 1313 else if (name.equals("valueContactPoint")) { 1314 this.value = new ContactPoint(); 1315 return this.value; 1316 } 1317 else if (name.equals("valueCount")) { 1318 this.value = new Count(); 1319 return this.value; 1320 } 1321 else if (name.equals("valueDistance")) { 1322 this.value = new Distance(); 1323 return this.value; 1324 } 1325 else if (name.equals("valueDuration")) { 1326 this.value = new Duration(); 1327 return this.value; 1328 } 1329 else if (name.equals("valueHumanName")) { 1330 this.value = new HumanName(); 1331 return this.value; 1332 } 1333 else if (name.equals("valueIdentifier")) { 1334 this.value = new Identifier(); 1335 return this.value; 1336 } 1337 else if (name.equals("valueMoney")) { 1338 this.value = new Money(); 1339 return this.value; 1340 } 1341 else if (name.equals("valuePeriod")) { 1342 this.value = new Period(); 1343 return this.value; 1344 } 1345 else if (name.equals("valueQuantity")) { 1346 this.value = new Quantity(); 1347 return this.value; 1348 } 1349 else if (name.equals("valueRange")) { 1350 this.value = new Range(); 1351 return this.value; 1352 } 1353 else if (name.equals("valueRatio")) { 1354 this.value = new Ratio(); 1355 return this.value; 1356 } 1357 else if (name.equals("valueRatioRange")) { 1358 this.value = new RatioRange(); 1359 return this.value; 1360 } 1361 else if (name.equals("valueReference")) { 1362 this.value = new Reference(); 1363 return this.value; 1364 } 1365 else if (name.equals("valueSampledData")) { 1366 this.value = new SampledData(); 1367 return this.value; 1368 } 1369 else if (name.equals("valueSignature")) { 1370 this.value = new Signature(); 1371 return this.value; 1372 } 1373 else if (name.equals("valueTiming")) { 1374 this.value = new Timing(); 1375 return this.value; 1376 } 1377 else if (name.equals("valueContactDetail")) { 1378 this.value = new ContactDetail(); 1379 return this.value; 1380 } 1381 else if (name.equals("valueDataRequirement")) { 1382 this.value = new DataRequirement(); 1383 return this.value; 1384 } 1385 else if (name.equals("valueExpression")) { 1386 this.value = new Expression(); 1387 return this.value; 1388 } 1389 else if (name.equals("valueParameterDefinition")) { 1390 this.value = new ParameterDefinition(); 1391 return this.value; 1392 } 1393 else if (name.equals("valueRelatedArtifact")) { 1394 this.value = new RelatedArtifact(); 1395 return this.value; 1396 } 1397 else if (name.equals("valueTriggerDefinition")) { 1398 this.value = new TriggerDefinition(); 1399 return this.value; 1400 } 1401 else if (name.equals("valueUsageContext")) { 1402 this.value = new UsageContext(); 1403 return this.value; 1404 } 1405 else if (name.equals("valueAvailability")) { 1406 this.value = new Availability(); 1407 return this.value; 1408 } 1409 else if (name.equals("valueExtendedContactDetail")) { 1410 this.value = new ExtendedContactDetail(); 1411 return this.value; 1412 } 1413 else if (name.equals("valueDosage")) { 1414 this.value = new Dosage(); 1415 return this.value; 1416 } 1417 else if (name.equals("valueMeta")) { 1418 this.value = new Meta(); 1419 return this.value; 1420 } 1421 else if (name.equals("resource")) { 1422 throw new FHIRException("Cannot call addChild on an abstract type Parameters.parameter.resource"); 1423 } 1424 else if (name.equals("part")) { 1425 return addPart(); 1426 } 1427 else 1428 return super.addChild(name); 1429 } 1430 1431 public ParametersParameterComponent copy() { 1432 ParametersParameterComponent dst = new ParametersParameterComponent(); 1433 copyValues(dst); 1434 return dst; 1435 } 1436 1437 public void copyValues(ParametersParameterComponent dst) { 1438 super.copyValues(dst); 1439 dst.name = name == null ? null : name.copy(); 1440 dst.value = value == null ? null : value.copy(); 1441 dst.resource = resource == null ? null : resource.copy(); 1442 if (part != null) { 1443 dst.part = new ArrayList<ParametersParameterComponent>(); 1444 for (ParametersParameterComponent i : part) 1445 dst.part.add(i.copy()); 1446 }; 1447 } 1448 1449 @Override 1450 public boolean equalsDeep(Base other_) { 1451 if (!super.equalsDeep(other_)) 1452 return false; 1453 if (!(other_ instanceof ParametersParameterComponent)) 1454 return false; 1455 ParametersParameterComponent o = (ParametersParameterComponent) other_; 1456 return compareDeep(name, o.name, true) && compareDeep(value, o.value, true) && compareDeep(resource, o.resource, true) 1457 && compareDeep(part, o.part, true); 1458 } 1459 1460 @Override 1461 public boolean equalsShallow(Base other_) { 1462 if (!super.equalsShallow(other_)) 1463 return false; 1464 if (!(other_ instanceof ParametersParameterComponent)) 1465 return false; 1466 ParametersParameterComponent o = (ParametersParameterComponent) other_; 1467 return compareValues(name, o.name, true); 1468 } 1469 1470 public boolean isEmpty() { 1471 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(name, value, resource, part 1472 ); 1473 } 1474 1475 public String fhirType() { 1476 return "Parameters.parameter"; 1477 1478 } 1479 1480// added from java-adornments.txt: 1481public String toString() { 1482 String s = getName() + " = "; 1483 if (hasValue()) { 1484 if (getValue().isPrimitive()) { 1485 s = s + getValue().primitiveValue(); 1486 } else { 1487 s = s + "["+getValue().fhirType()+"]"; 1488 } 1489 } else if (hasResource()) { 1490 s = s + "["+getResource().fhirType()+"]"; 1491 } else { 1492 CommaSeparatedStringBuilder b = new CommaSeparatedStringBuilder(); 1493 for (ParametersParameterComponent p : getPart()) { 1494 b.append(p.getName()); 1495 } 1496 s = s + "{"+b.toString()+"}"; 1497 } 1498 return s; 1499 } 1500// end addition 1501 } 1502 1503 /** 1504 * A parameter passed to or received from the operation. 1505 */ 1506 @Child(name = "parameter", type = {}, order=0, min=0, max=Child.MAX_UNLIMITED, modifier=false, summary=true) 1507 @Description(shortDefinition="Operation Parameter", formalDefinition="A parameter passed to or received from the operation." ) 1508 protected List<ParametersParameterComponent> parameter; 1509 1510 private static final long serialVersionUID = -1495940293L; 1511 1512 /** 1513 * Constructor 1514 */ 1515 public Parameters() { 1516 super(); 1517 } 1518 1519 /** 1520 * @return {@link #parameter} (A parameter passed to or received from the operation.) 1521 */ 1522 public List<ParametersParameterComponent> getParameter() { 1523 if (this.parameter == null) 1524 this.parameter = new ArrayList<ParametersParameterComponent>(); 1525 return this.parameter; 1526 } 1527 1528 /** 1529 * @return Returns a reference to <code>this</code> for easy method chaining 1530 */ 1531 public Parameters setParameter(List<ParametersParameterComponent> theParameter) { 1532 this.parameter = theParameter; 1533 return this; 1534 } 1535 1536 public boolean hasParameter() { 1537 if (this.parameter == null) 1538 return false; 1539 for (ParametersParameterComponent item : this.parameter) 1540 if (!item.isEmpty()) 1541 return true; 1542 return false; 1543 } 1544 1545 public ParametersParameterComponent addParameter() { //3 1546 ParametersParameterComponent t = new ParametersParameterComponent(); 1547 if (this.parameter == null) 1548 this.parameter = new ArrayList<ParametersParameterComponent>(); 1549 this.parameter.add(t); 1550 return t; 1551 } 1552 1553 public Parameters addParameter(ParametersParameterComponent t) { //3 1554 if (t == null) 1555 return this; 1556 if (this.parameter == null) 1557 this.parameter = new ArrayList<ParametersParameterComponent>(); 1558 this.parameter.add(t); 1559 return this; 1560 } 1561 1562 /** 1563 * @return The first repetition of repeating field {@link #parameter}, creating it if it does not already exist {3} 1564 */ 1565 public ParametersParameterComponent getParameterFirstRep() { 1566 if (getParameter().isEmpty()) { 1567 addParameter(); 1568 } 1569 return getParameter().get(0); 1570 } 1571 1572 protected void listChildren(List<Property> children) { 1573 super.listChildren(children); 1574 children.add(new Property("parameter", "", "A parameter passed to or received from the operation.", 0, java.lang.Integer.MAX_VALUE, parameter)); 1575 } 1576 1577 @Override 1578 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 1579 switch (_hash) { 1580 case 1954460585: /*parameter*/ return new Property("parameter", "", "A parameter passed to or received from the operation.", 0, java.lang.Integer.MAX_VALUE, parameter); 1581 default: return super.getNamedProperty(_hash, _name, _checkValid); 1582 } 1583 1584 } 1585 1586 @Override 1587 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 1588 switch (hash) { 1589 case 1954460585: /*parameter*/ return this.parameter == null ? new Base[0] : this.parameter.toArray(new Base[this.parameter.size()]); // ParametersParameterComponent 1590 default: return super.getProperty(hash, name, checkValid); 1591 } 1592 1593 } 1594 1595 @Override 1596 public Base setProperty(int hash, String name, Base value) throws FHIRException { 1597 switch (hash) { 1598 case 1954460585: // parameter 1599 this.getParameter().add((ParametersParameterComponent) value); // ParametersParameterComponent 1600 return value; 1601 default: return super.setProperty(hash, name, value); 1602 } 1603 1604 } 1605 1606 @Override 1607 public Base setProperty(String name, Base value) throws FHIRException { 1608 if (name.equals("parameter")) { 1609 this.getParameter().add((ParametersParameterComponent) value); 1610 } else 1611 return super.setProperty(name, value); 1612 return value; 1613 } 1614 1615 @Override 1616 public Base makeProperty(int hash, String name) throws FHIRException { 1617 switch (hash) { 1618 case 1954460585: return addParameter(); 1619 default: return super.makeProperty(hash, name); 1620 } 1621 1622 } 1623 1624 @Override 1625 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 1626 switch (hash) { 1627 case 1954460585: /*parameter*/ return new String[] {}; 1628 default: return super.getTypesForProperty(hash, name); 1629 } 1630 1631 } 1632 1633 @Override 1634 public Base addChild(String name) throws FHIRException { 1635 if (name.equals("parameter")) { 1636 return addParameter(); 1637 } 1638 else 1639 return super.addChild(name); 1640 } 1641 1642 public String fhirType() { 1643 return "Parameters"; 1644 1645 } 1646 1647 public Parameters copy() { 1648 Parameters dst = new Parameters(); 1649 copyValues(dst); 1650 return dst; 1651 } 1652 1653 public void copyValues(Parameters dst) { 1654 super.copyValues(dst); 1655 if (parameter != null) { 1656 dst.parameter = new ArrayList<ParametersParameterComponent>(); 1657 for (ParametersParameterComponent i : parameter) 1658 dst.parameter.add(i.copy()); 1659 }; 1660 } 1661 1662 protected Parameters typedCopy() { 1663 return copy(); 1664 } 1665 1666 @Override 1667 public boolean equalsDeep(Base other_) { 1668 if (!super.equalsDeep(other_)) 1669 return false; 1670 if (!(other_ instanceof Parameters)) 1671 return false; 1672 Parameters o = (Parameters) other_; 1673 return compareDeep(parameter, o.parameter, true); 1674 } 1675 1676 @Override 1677 public boolean equalsShallow(Base other_) { 1678 if (!super.equalsShallow(other_)) 1679 return false; 1680 if (!(other_ instanceof Parameters)) 1681 return false; 1682 Parameters o = (Parameters) other_; 1683 return true; 1684 } 1685 1686 public boolean isEmpty() { 1687 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(parameter); 1688 } 1689 1690 @Override 1691 public ResourceType getResourceType() { 1692 return ResourceType.Parameters; 1693 } 1694 1695 // Manual code (from Configuration.txt): 1696 public Parameters addParameter(String name, boolean b) { 1697 addParameter().setName(name).setValue(new BooleanType(b)); 1698 return this; 1699 } 1700 1701 public Parameters addParameter(String name, String s) { 1702 if (s != null) 1703 addParameter().setName(name).setValue(new StringType(s)); 1704 return this; 1705 } 1706 1707 public Parameters addParameter(String name, DataType v) { 1708 if (v != null) 1709 addParameter().setName(name).setValue(v); 1710 return this; 1711 } 1712 1713 public Parameters setParameter(String name, boolean b) { 1714 for (ParametersParameterComponent p : getParameter()) { 1715 if (p.getName().equals(name)) { 1716 p.setValue(new BooleanType(b)); 1717 return this; 1718 } 1719 } 1720 addParameter().setName(name).setValue(new BooleanType(b)); 1721 return this; 1722 } 1723 1724 public Parameters setParameter(String name, String s) { 1725 if (s != null) { 1726 for (ParametersParameterComponent p : getParameter()) { 1727 if (p.getName().equals(name)) { 1728 p.setValue(new StringType(s)); 1729 return this; 1730 } 1731 } 1732 addParameter().setName(name).setValue(new StringType(s)); 1733 } 1734 return this; 1735 } 1736 1737 public Parameters setParameter(String name, DataType v) { 1738 if (v != null) { 1739 for (ParametersParameterComponent p : getParameter() ) { 1740 if (p.getName().equals(name)) { 1741 p.setValue(v); 1742 return this; 1743 } 1744 } 1745 addParameter().setName(name).setValue(v); 1746 } 1747 return this; 1748 } 1749 1750 public boolean hasParameterValue(String name) { 1751 for (ParametersParameterComponent p : getParameter()) { 1752 if (p.getName().equals(name) && p.hasValue()) 1753 return true; 1754 } 1755 return false; 1756 } 1757 1758 public boolean hasParameterValue(String name, String value) { 1759 for (ParametersParameterComponent p : getParameter()) { 1760 if (p.getName().equals(name) && p.hasValue() && value.equals(p.getValue().primitiveValue())) 1761 return true; 1762 } 1763 return false; 1764 } 1765 1766 public boolean hasParameter(String name) { 1767 for (ParametersParameterComponent p : getParameter()) { 1768 if (p.getName().equals(name)) 1769 return true; 1770 } 1771 return false; 1772 } 1773 1774 public DataType getParameterValue(String name) { 1775 for (ParametersParameterComponent p : getParameter()) { 1776 if (p.getName().equals(name)) 1777 return p.getValue(); 1778 } 1779 return null; 1780 } 1781 1782 public ParametersParameterComponent getParameter(String name) { 1783 for (ParametersParameterComponent p : getParameter()) { 1784 if (p.getName().equals(name)) 1785 return p; 1786 } 1787 return null; 1788 } 1789 1790 public List<DataType> getParameterValues(String name) { 1791 List<DataType> res = new ArrayList<>(); 1792 for (ParametersParameterComponent p : getParameter()) { 1793 if (p.getName().equals(name)) 1794 res.add(p.getValue()); 1795 } 1796 return res; 1797 } 1798 1799 public List<ParametersParameterComponent> getParameters(String name) { 1800 List<ParametersParameterComponent> res = new ArrayList<ParametersParameterComponent>(); 1801 for (ParametersParameterComponent p : getParameter()) { 1802 if (p.getName().equals(name)) 1803 res.add(p); 1804 } 1805 return res; 1806 } 1807 1808 public boolean getParameterBool(String name) { 1809 for (ParametersParameterComponent p : getParameter()) { 1810 if (p.getName().equals(name)) { 1811 if (p.getValue() instanceof BooleanType) 1812 return ((BooleanType) p.getValue()).booleanValue(); 1813 boolean ok = Boolean.getBoolean(p.getValue().primitiveValue()); 1814 return ok; 1815 } 1816 } 1817 return false; 1818 } 1819 1820 1821 public String getParameterString(String name) { 1822 for (ParametersParameterComponent p : getParameter()) { 1823 if (p.getName().equals(name)) { 1824 if (p.getValue() instanceof PrimitiveType) 1825 return ((PrimitiveType) p.getValue()).primitiveValue(); 1826 } 1827 } 1828 return null; 1829 } 1830 1831 public void clearParameters(String name) { 1832 getParameter().removeIf(p -> name.equals(p.getName())); 1833 } 1834 1835 // end addition 1836 1837} 1838