
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 java.util.Locale; 038import java.util.Map.Entry; 039 040import org.hl7.fhir.utilities.Utilities; 041import org.hl7.fhir.r5.model.Enumerations.*; 042import org.hl7.fhir.r5.utils.ToolingExtensions; 043import org.hl7.fhir.r5.utils.UserDataNames; 044import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 045import org.hl7.fhir.exceptions.FHIRException; 046import org.hl7.fhir.instance.model.api.ICompositeType; 047import ca.uhn.fhir.model.api.annotation.ResourceDef; 048import ca.uhn.fhir.model.api.annotation.SearchParamDefinition; 049import org.hl7.fhir.instance.model.api.IBaseBackboneElement; 050import ca.uhn.fhir.model.api.annotation.Child; 051import ca.uhn.fhir.model.api.annotation.ChildOrder; 052import ca.uhn.fhir.model.api.annotation.Description; 053import ca.uhn.fhir.model.api.annotation.Block; 054 055/** 056 * Common Interface declaration for conformance and knowledge artifact resources. 057 */ 058public abstract class CanonicalResource extends DomainResource { 059 060 private static final long serialVersionUID = 0L; 061 062 /** 063 * Constructor 064 */ 065 public CanonicalResource() { 066 super(); 067 } 068 069 /** 070 * Constructor 071 */ 072 public CanonicalResource(PublicationStatus status) { 073 super(); 074 this.setStatus(status); 075 } 076 077 /** 078 * How many allowed for this property by the implementation 079 */ 080 public int getUrlMax() { 081 return 1; 082 } 083 /** 084 * @return {@link #url} (An absolute URI that is used to identify this canonical resource when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this canonical resource is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the canonical resource is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 085 */ 086 public abstract UriType getUrlElement(); 087 088 public abstract boolean hasUrlElement(); 089 public abstract boolean hasUrl(); 090 091 /** 092 * @param value {@link #url} (An absolute URI that is used to identify this canonical resource when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this canonical resource is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the canonical resource is stored on different servers.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value 093 */ 094 public abstract CanonicalResource setUrlElement(UriType value); 095 /** 096 * @return An absolute URI that is used to identify this canonical resource when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this canonical resource is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the canonical resource is stored on different servers. 097 */ 098 public abstract String getUrl(); 099 /** 100 * @param value An absolute URI that is used to identify this canonical resource when it is referenced in a specification, model, design or an instance; also called its canonical identifier. This SHOULD be globally unique and SHOULD be a literal address at which an authoritative instance of this canonical resource is (or will be) published. This URL can be the target of a canonical reference. It SHALL remain the same when the canonical resource is stored on different servers. 101 */ 102 public abstract CanonicalResource setUrl(String value); 103 /** 104 * How many allowed for this property by the implementation 105 */ 106 public int getIdentifierMax() { 107 return Integer.MAX_VALUE; 108 } 109 /** 110 * @return {@link #identifier} (A formal identifier that is used to identify this canonical resource when it is represented in other formats, or referenced in a specification, model, design or an instance.) 111 */ 112 public abstract List<Identifier> getIdentifier(); 113 /** 114 * @return Returns a reference to <code>this</code> for easy method chaining 115 */ 116 public abstract CanonicalResource setIdentifier(List<Identifier> theIdentifier); 117 public abstract boolean hasIdentifier(); 118 119 public abstract Identifier addIdentifier(); //3 120 public abstract CanonicalResource addIdentifier(Identifier t); //3 121 /** 122 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {1} 123 */ 124 public abstract Identifier getIdentifierFirstRep(); 125 /** 126 * How many allowed for this property by the implementation 127 */ 128 public int getVersionMax() { 129 return 1; 130 } 131 /** 132 * @return {@link #version} (The identifier that is used to identify this version of the canonical resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the canonical resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence without additional knowledge. (See the versionAlgorithm element.)). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 133 */ 134 public abstract StringType getVersionElement(); 135 136 public abstract boolean hasVersionElement(); 137 public abstract boolean hasVersion(); 138 139 /** 140 * @param value {@link #version} (The identifier that is used to identify this version of the canonical resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the canonical resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence without additional knowledge. (See the versionAlgorithm element.)). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 141 */ 142 public abstract CanonicalResource setVersionElement(StringType value); 143 /** 144 * @return The identifier that is used to identify this version of the canonical resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the canonical resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence without additional knowledge. (See the versionAlgorithm element.) 145 */ 146 public abstract String getVersion(); 147 /** 148 * @param value The identifier that is used to identify this version of the canonical resource when it is referenced in a specification, model, design or instance. This is an arbitrary value managed by the canonical resource author and is not expected to be globally unique. For example, it might be a timestamp (e.g. yyyymmdd) if a managed version is not available. There is also no expectation that versions can be placed in a lexicographical sequence without additional knowledge. (See the versionAlgorithm element.) 149 */ 150 public abstract CanonicalResource setVersion(String value); 151 /** 152 * How many allowed for this property by the implementation 153 */ 154 public int getVersionAlgorithmMax() { 155 return 1; 156 } 157 /** 158 * @return {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.) 159 */ 160 public abstract DataType getVersionAlgorithm(); 161 /** 162 * @return {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.) 163 */ 164 public abstract StringType getVersionAlgorithmStringType() throws FHIRException; 165 public abstract boolean hasVersionAlgorithmStringType(); 166 /** 167 * @return {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.) 168 */ 169 public abstract Coding getVersionAlgorithmCoding() throws FHIRException; 170 public abstract boolean hasVersionAlgorithmCoding(); 171 public abstract boolean hasVersionAlgorithm(); 172 /** 173 * @param value {@link #versionAlgorithm} (Indicates the mechanism used to compare versions to determine which is more current.) 174 */ 175 public abstract CanonicalResource setVersionAlgorithm(DataType value); 176 177 /** 178 * How many allowed for this property by the implementation 179 */ 180 public int getNameMax() { 181 return 1; 182 } 183 /** 184 * @return {@link #name} (A natural language name identifying the canonical resource. This name should be usable as an identifier for the resource by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 185 */ 186 public abstract StringType getNameElement(); 187 188 public abstract boolean hasNameElement(); 189 public abstract boolean hasName(); 190 191 /** 192 * @param value {@link #name} (A natural language name identifying the canonical resource. This name should be usable as an identifier for the resource by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 193 */ 194 public abstract CanonicalResource setNameElement(StringType value); 195 /** 196 * @return A natural language name identifying the canonical resource. This name should be usable as an identifier for the resource by machine processing applications such as code generation. 197 */ 198 public abstract String getName(); 199 /** 200 * @param value A natural language name identifying the canonical resource. This name should be usable as an identifier for the resource by machine processing applications such as code generation. 201 */ 202 public abstract CanonicalResource setName(String value); 203 /** 204 * How many allowed for this property by the implementation 205 */ 206 public int getTitleMax() { 207 return 1; 208 } 209 /** 210 * @return {@link #title} (A short, descriptive, user-friendly title for the canonical resource.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 211 */ 212 public abstract StringType getTitleElement(); 213 214 public abstract boolean hasTitleElement(); 215 public abstract boolean hasTitle(); 216 217 /** 218 * @param value {@link #title} (A short, descriptive, user-friendly title for the canonical resource.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value 219 */ 220 public abstract CanonicalResource setTitleElement(StringType value); 221 /** 222 * @return A short, descriptive, user-friendly title for the canonical resource. 223 */ 224 public abstract String getTitle(); 225 /** 226 * @param value A short, descriptive, user-friendly title for the canonical resource. 227 */ 228 public abstract CanonicalResource setTitle(String value); 229 /** 230 * How many allowed for this property by the implementation 231 */ 232 public int getStatusMax() { 233 return 1; 234 } 235 /** 236 * @return {@link #status} (The current state of this canonical resource. ). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 237 */ 238 public abstract Enumeration<PublicationStatus> getStatusElement(); 239 240 public abstract boolean hasStatusElement(); 241 public abstract boolean hasStatus(); 242 243 /** 244 * @param value {@link #status} (The current state of this canonical resource. ). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 245 */ 246 public abstract CanonicalResource setStatusElement(Enumeration<PublicationStatus> value); 247 /** 248 * @return The current state of this canonical resource. 249 */ 250 public abstract PublicationStatus getStatus(); 251 /** 252 * @param value The current state of this canonical resource. 253 */ 254 public abstract CanonicalResource setStatus(PublicationStatus value); 255 /** 256 * How many allowed for this property by the implementation 257 */ 258 public int getExperimentalMax() { 259 return 1; 260 } 261 /** 262 * @return {@link #experimental} (A Boolean value to indicate that this canonical resource is authored for testing purposes (or education/evaluation/marketing) and is not intended for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 263 */ 264 public abstract BooleanType getExperimentalElement(); 265 266 public abstract boolean hasExperimentalElement(); 267 public abstract boolean hasExperimental(); 268 269 /** 270 * @param value {@link #experimental} (A Boolean value to indicate that this canonical resource is authored for testing purposes (or education/evaluation/marketing) and is not intended for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 271 */ 272 public abstract CanonicalResource setExperimentalElement(BooleanType value); 273 /** 274 * @return A Boolean value to indicate that this canonical resource is authored for testing purposes (or education/evaluation/marketing) and is not intended for genuine usage. 275 */ 276 public abstract boolean getExperimental(); 277 /** 278 * @param value A Boolean value to indicate that this canonical resource is authored for testing purposes (or education/evaluation/marketing) and is not intended for genuine usage. 279 */ 280 public abstract CanonicalResource setExperimental(boolean value); 281 /** 282 * How many allowed for this property by the implementation 283 */ 284 public int getDateMax() { 285 return 1; 286 } 287 /** 288 * @return {@link #date} (The date (and optionally time) when the canonical resource was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the canonical resource changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 289 */ 290 public abstract DateTimeType getDateElement(); 291 292 public abstract boolean hasDateElement(); 293 public abstract boolean hasDate(); 294 295 /** 296 * @param value {@link #date} (The date (and optionally time) when the canonical resource was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the canonical resource changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 297 */ 298 public abstract CanonicalResource setDateElement(DateTimeType value); 299 /** 300 * @return The date (and optionally time) when the canonical resource was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the canonical resource changes. 301 */ 302 public abstract Date getDate(); 303 /** 304 * @param value The date (and optionally time) when the canonical resource was last significantly changed. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the canonical resource changes. 305 */ 306 public abstract CanonicalResource setDate(Date value); 307 /** 308 * How many allowed for this property by the implementation 309 */ 310 public int getPublisherMax() { 311 return 1; 312 } 313 /** 314 * @return {@link #publisher} (The name of the organization or individual responsible for the release and ongoing maintenance of the canonical resource.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 315 */ 316 public abstract StringType getPublisherElement(); 317 318 public abstract boolean hasPublisherElement(); 319 public abstract boolean hasPublisher(); 320 321 /** 322 * @param value {@link #publisher} (The name of the organization or individual responsible for the release and ongoing maintenance of the canonical resource.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 323 */ 324 public abstract CanonicalResource setPublisherElement(StringType value); 325 /** 326 * @return The name of the organization or individual responsible for the release and ongoing maintenance of the canonical resource. 327 */ 328 public abstract String getPublisher(); 329 /** 330 * @param value The name of the organization or individual responsible for the release and ongoing maintenance of the canonical resource. 331 */ 332 public abstract CanonicalResource setPublisher(String value); 333 /** 334 * How many allowed for this property by the implementation 335 */ 336 public int getContactMax() { 337 return Integer.MAX_VALUE; 338 } 339 /** 340 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 341 */ 342 public abstract List<ContactDetail> getContact(); 343 /** 344 * @return Returns a reference to <code>this</code> for easy method chaining 345 */ 346 public abstract CanonicalResource setContact(List<ContactDetail> theContact); 347 public abstract boolean hasContact(); 348 349 public abstract ContactDetail addContact(); //3 350 public abstract CanonicalResource addContact(ContactDetail t); //3 351 /** 352 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {1} 353 */ 354 public abstract ContactDetail getContactFirstRep(); 355 /** 356 * How many allowed for this property by the implementation 357 */ 358 public int getDescriptionMax() { 359 return 1; 360 } 361 /** 362 * @return {@link #description} (A free text natural language description of the canonical resource from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 363 */ 364 public abstract MarkdownType getDescriptionElement(); 365 366 public abstract boolean hasDescriptionElement(); 367 public abstract boolean hasDescription(); 368 369 /** 370 * @param value {@link #description} (A free text natural language description of the canonical resource from a consumer's perspective.). This is the underlying object with id, value and extensions. The accessor "getDescription" gives direct access to the value 371 */ 372 public abstract CanonicalResource setDescriptionElement(MarkdownType value); 373 /** 374 * @return A free text natural language description of the canonical resource from a consumer's perspective. 375 */ 376 public abstract String getDescription(); 377 /** 378 * @param value A free text natural language description of the canonical resource from a consumer's perspective. 379 */ 380 public abstract CanonicalResource setDescription(String value); 381 /** 382 * How many allowed for this property by the implementation 383 */ 384 public int getUseContextMax() { 385 return Integer.MAX_VALUE; 386 } 387 /** 388 * @return {@link #useContext} (The content was developed with a focus and intent of supporting the contexts that are listed. These contexts may be general categories (gender, age, ...) or may be references to specific programs (insurance plans, studies, ...) and may be used to assist with indexing and searching for appropriate canonical resources.) 389 */ 390 public abstract List<UsageContext> getUseContext(); 391 /** 392 * @return Returns a reference to <code>this</code> for easy method chaining 393 */ 394 public abstract CanonicalResource setUseContext(List<UsageContext> theUseContext); 395 public abstract boolean hasUseContext(); 396 397 public abstract UsageContext addUseContext(); //3 398 public abstract CanonicalResource addUseContext(UsageContext t); //3 399 /** 400 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {1} 401 */ 402 public abstract UsageContext getUseContextFirstRep(); 403 /** 404 * How many allowed for this property by the implementation 405 */ 406 public int getJurisdictionMax() { 407 return Integer.MAX_VALUE; 408 } 409 /** 410 * @return {@link #jurisdiction} (A legal or geographic region in which the canonical resource is intended to be used.) 411 */ 412 public abstract List<CodeableConcept> getJurisdiction(); 413 /** 414 * @return Returns a reference to <code>this</code> for easy method chaining 415 */ 416 public abstract CanonicalResource setJurisdiction(List<CodeableConcept> theJurisdiction); 417 public abstract boolean hasJurisdiction(); 418 419 public abstract CodeableConcept addJurisdiction(); //3 420 public abstract CanonicalResource addJurisdiction(CodeableConcept t); //3 421 /** 422 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {1} 423 */ 424 public abstract CodeableConcept getJurisdictionFirstRep(); 425 /** 426 * How many allowed for this property by the implementation 427 */ 428 public int getPurposeMax() { 429 return 1; 430 } 431 /** 432 * @return {@link #purpose} (Explanation of why this canonical resource is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 433 */ 434 public abstract MarkdownType getPurposeElement(); 435 436 public abstract boolean hasPurposeElement(); 437 public abstract boolean hasPurpose(); 438 439 /** 440 * @param value {@link #purpose} (Explanation of why this canonical resource is needed and why it has been designed as it has.). This is the underlying object with id, value and extensions. The accessor "getPurpose" gives direct access to the value 441 */ 442 public abstract CanonicalResource setPurposeElement(MarkdownType value); 443 /** 444 * @return Explanation of why this canonical resource is needed and why it has been designed as it has. 445 */ 446 public abstract String getPurpose(); 447 /** 448 * @param value Explanation of why this canonical resource is needed and why it has been designed as it has. 449 */ 450 public abstract CanonicalResource setPurpose(String value); 451 /** 452 * How many allowed for this property by the implementation 453 */ 454 public int getCopyrightMax() { 455 return 1; 456 } 457 /** 458 * @return {@link #copyright} (A copyright statement relating to the canonical resource and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the canonical resource.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 459 */ 460 public abstract MarkdownType getCopyrightElement(); 461 462 public abstract boolean hasCopyrightElement(); 463 public abstract boolean hasCopyright(); 464 465 /** 466 * @param value {@link #copyright} (A copyright statement relating to the canonical resource and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the canonical resource.). This is the underlying object with id, value and extensions. The accessor "getCopyright" gives direct access to the value 467 */ 468 public abstract CanonicalResource setCopyrightElement(MarkdownType value); 469 /** 470 * @return A copyright statement relating to the canonical resource and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the canonical resource. 471 */ 472 public abstract String getCopyright(); 473 /** 474 * @param value A copyright statement relating to the canonical resource and/or its contents. Copyright statements are generally legal restrictions on the use and publishing of the canonical resource. 475 */ 476 public abstract CanonicalResource setCopyright(String value); 477 /** 478 * How many allowed for this property by the implementation 479 */ 480 public int getCopyrightLabelMax() { 481 return 1; 482 } 483 /** 484 * @return {@link #copyrightLabel} (A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved').). This is the underlying object with id, value and extensions. The accessor "getCopyrightLabel" gives direct access to the value 485 */ 486 public abstract StringType getCopyrightLabelElement(); 487 488 public abstract boolean hasCopyrightLabelElement(); 489 public abstract boolean hasCopyrightLabel(); 490 491 /** 492 * @param value {@link #copyrightLabel} (A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved').). This is the underlying object with id, value and extensions. The accessor "getCopyrightLabel" gives direct access to the value 493 */ 494 public abstract CanonicalResource setCopyrightLabelElement(StringType value); 495 /** 496 * @return A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved'). 497 */ 498 public abstract String getCopyrightLabel(); 499 /** 500 * @param value A short string (<50 characters), suitable for inclusion in a page footer that identifies the copyright holder, effective period, and optionally whether rights are resctricted. (e.g. 'All rights reserved', 'Some rights reserved'). 501 */ 502 public abstract CanonicalResource setCopyrightLabel(String value); 503 protected void listChildren(List<Property> children) { 504 super.listChildren(children); 505 } 506 507 @Override 508 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 509 switch (_hash) { 510 default: return super.getNamedProperty(_hash, _name, _checkValid); 511 } 512 513 } 514 515 @Override 516 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 517 switch (hash) { 518 default: return super.getProperty(hash, name, checkValid); 519 } 520 521 } 522 523 @Override 524 public Base setProperty(int hash, String name, Base value) throws FHIRException { 525 switch (hash) { 526 default: return super.setProperty(hash, name, value); 527 } 528 529 } 530 531 @Override 532 public Base setProperty(String name, Base value) throws FHIRException { 533 return super.setProperty(name, value); 534 } 535 536 @Override 537 public void removeChild(String name, Base value) throws FHIRException { 538 super.removeChild(name, value); 539 } 540 541 @Override 542 public Base makeProperty(int hash, String name) throws FHIRException { 543 switch (hash) { 544 default: return super.makeProperty(hash, name); 545 } 546 547 } 548 549 @Override 550 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 551 switch (hash) { 552 default: return super.getTypesForProperty(hash, name); 553 } 554 555 } 556 557 @Override 558 public Base addChild(String name) throws FHIRException { 559 return super.addChild(name); 560 } 561 562 public String fhirType() { 563 return "CanonicalResource"; 564 565 } 566 567 public abstract CanonicalResource copy(); 568 569 public void copyValues(CanonicalResource dst) { 570 super.copyValues(dst); 571 } 572 573 @Override 574 public boolean equalsDeep(Base other_) { 575 if (!super.equalsDeep(other_)) 576 return false; 577 if (!(other_ instanceof CanonicalResource)) 578 return false; 579 CanonicalResource o = (CanonicalResource) other_; 580 return true; 581 } 582 583 @Override 584 public boolean equalsShallow(Base other_) { 585 if (!super.equalsShallow(other_)) 586 return false; 587 if (!(other_ instanceof CanonicalResource)) 588 return false; 589 CanonicalResource o = (CanonicalResource) other_; 590 return true; 591 } 592 593 public boolean isEmpty() { 594 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(); 595 } 596 597// Manual code (from Configuration.txt): 598 @Override 599 public String toString() { 600 return fhirType()+"["+getUrl()+(hasVersion() ? "|"+getVersion(): "")+"]"; 601 } 602 603 public String present() { 604 if (hasUserData(UserDataNames.render_presentation)) { 605 return getUserString(UserDataNames.render_presentation); 606 } 607 if (hasTitle()) 608 return getTitle(); 609 if (hasName()) 610 return getName(); 611 return toString(); 612 } 613 614 public String present(String lang) { 615 if (hasUserData(UserDataNames.render_presentation)) { 616 return getUserString(UserDataNames.render_presentation); 617 } 618 if (hasTitleElement()) { 619 for (Entry<String, String> t : ToolingExtensions.getLanguageTranslations(getTitleElement()).entrySet()) { 620 if (t.getKey().equals(lang)) { 621 return t.getValue(); 622 } 623 } 624 } 625 if (hasNameElement()) { 626 for (Entry<String, String> t : ToolingExtensions.getLanguageTranslations(getNameElement()).entrySet()) { 627 if (t.getKey().equals(lang)) { 628 return t.getValue(); 629 } 630 } 631 } 632 return present(); 633 } 634 635 636 public String getVUrl() { 637 return getUrl() + (hasVersion() ? "|"+getVersion() : ""); 638 } 639 640 public boolean supportsCopyright() { 641 return true; 642 } 643 644 public String getVersionedUrl() { 645 return hasVersion() ? getUrl()+"|"+getVersion() : getUrl(); 646 } 647 648 649 public String oid() { 650 for (Identifier id : getIdentifier()) { 651 if (id.getValue().startsWith("urn:oid:")) { 652 return id.getValue().substring(8); 653 } 654 } 655 return null; 656 } 657 658 public String getOid() { 659 for (Identifier id : getIdentifier()) { 660 if ("urn:ietf:rfc:3986".equals(id.getSystem()) && id.hasValue() && id.getValue().startsWith("urn:oid:")) { 661 return id.getValue().substring(8); 662 } 663 } 664 return null; 665 } 666 667// end addition 668 669} 670