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 Tue, Dec 28, 2021 07:16+1100 for FHIR v5.0.0-snapshot1 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 050/** 051 * Common Ancestor declaration for conformance and knowledge artifact resources. 052 */ 053public abstract class CanonicalResource extends DomainResource { 054 055 private static final long serialVersionUID = 0L; 056 057 /** 058 * Constructor 059 */ 060 public CanonicalResource() { 061 super(); 062 } 063 064 /** 065 * Constructor 066 */ 067 public CanonicalResource(PublicationStatus status) { 068 super(); 069 this.setStatus(status); 070 } 071 072 /** 073 * How many allowed for this property by the implementation 074 */ 075 public int getUrlMax() { 076 return 1; 077 } 078 /** 079 * @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 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 080 */ 081 public abstract UriType getUrlElement(); 082 083 public abstract boolean hasUrlElement(); 084 public abstract boolean hasUrl(); 085 086 /** 087 * @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 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 088 */ 089 public abstract CanonicalResource setUrlElement(UriType value); 090 /** 091 * @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 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. 092 */ 093 public abstract String getUrl(); 094 /** 095 * @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 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. 096 */ 097 public abstract CanonicalResource setUrl(String value); 098 /** 099 * How many allowed for this property by the implementation 100 */ 101 public int getIdentifierMax() { 102 return Integer.MAX_VALUE; 103 } 104 /** 105 * @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.) 106 */ 107 public abstract List<Identifier> getIdentifier(); 108 /** 109 * @return Returns a reference to <code>this</code> for easy method chaining 110 */ 111 public abstract CanonicalResource setIdentifier(List<Identifier> theIdentifier); 112 public abstract boolean hasIdentifier(); 113 114 public abstract Identifier addIdentifier(); //3 115 public abstract CanonicalResource addIdentifier(Identifier t); //3 116 /** 117 * @return The first repetition of repeating field {@link #identifier}, creating it if it does not already exist {1} 118 */ 119 public abstract Identifier getIdentifierFirstRep(); 120 /** 121 * How many allowed for this property by the implementation 122 */ 123 public int getVersionMax() { 124 return 1; 125 } 126 /** 127 * @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.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 128 */ 129 public abstract StringType getVersionElement(); 130 131 public abstract boolean hasVersionElement(); 132 public abstract boolean hasVersion(); 133 134 /** 135 * @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.). This is the underlying object with id, value and extensions. The accessor "getVersion" gives direct access to the value 136 */ 137 public abstract CanonicalResource setVersionElement(StringType value); 138 /** 139 * @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. 140 */ 141 public abstract String getVersion(); 142 /** 143 * @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. 144 */ 145 public abstract CanonicalResource setVersion(String value); 146 /** 147 * How many allowed for this property by the implementation 148 */ 149 public int getNameMax() { 150 return 1; 151 } 152 /** 153 * @return {@link #name} (A natural language name identifying the canonical resource. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 154 */ 155 public abstract StringType getNameElement(); 156 157 public abstract boolean hasNameElement(); 158 public abstract boolean hasName(); 159 160 /** 161 * @param value {@link #name} (A natural language name identifying the canonical resource. This name should be usable as an identifier for the module by machine processing applications such as code generation.). This is the underlying object with id, value and extensions. The accessor "getName" gives direct access to the value 162 */ 163 public abstract CanonicalResource setNameElement(StringType value); 164 /** 165 * @return A natural language name identifying the canonical resource. This name should be usable as an identifier for the module by machine processing applications such as code generation. 166 */ 167 public abstract String getName(); 168 /** 169 * @param value A natural language name identifying the canonical resource. This name should be usable as an identifier for the module by machine processing applications such as code generation. 170 */ 171 public abstract CanonicalResource setName(String value); 172 /** 173 * How many allowed for this property by the implementation 174 */ 175 public int getTitleMax() { 176 return 1; 177 } 178 /** 179 * @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 180 */ 181 public abstract StringType getTitleElement(); 182 183 public abstract boolean hasTitleElement(); 184 public abstract boolean hasTitle(); 185 186 /** 187 * @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 188 */ 189 public abstract CanonicalResource setTitleElement(StringType value); 190 /** 191 * @return A short, descriptive, user-friendly title for the canonical resource. 192 */ 193 public abstract String getTitle(); 194 /** 195 * @param value A short, descriptive, user-friendly title for the canonical resource. 196 */ 197 public abstract CanonicalResource setTitle(String value); 198 /** 199 * How many allowed for this property by the implementation 200 */ 201 public int getStatusMax() { 202 return 1; 203 } 204 /** 205 * @return {@link #status} (The status of this canonical resource. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 206 */ 207 public abstract Enumeration<PublicationStatus> getStatusElement(); 208 209 public abstract boolean hasStatusElement(); 210 public abstract boolean hasStatus(); 211 212 /** 213 * @param value {@link #status} (The status of this canonical resource. Enables tracking the life-cycle of the content.). This is the underlying object with id, value and extensions. The accessor "getStatus" gives direct access to the value 214 */ 215 public abstract CanonicalResource setStatusElement(Enumeration<PublicationStatus> value); 216 /** 217 * @return The status of this canonical resource. Enables tracking the life-cycle of the content. 218 */ 219 public abstract PublicationStatus getStatus(); 220 /** 221 * @param value The status of this canonical resource. Enables tracking the life-cycle of the content. 222 */ 223 public abstract CanonicalResource setStatus(PublicationStatus value); 224 /** 225 * How many allowed for this property by the implementation 226 */ 227 public int getExperimentalMax() { 228 return 1; 229 } 230 /** 231 * @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 to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 232 */ 233 public abstract BooleanType getExperimentalElement(); 234 235 public abstract boolean hasExperimentalElement(); 236 public abstract boolean hasExperimental(); 237 238 /** 239 * @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 to be used for genuine usage.). This is the underlying object with id, value and extensions. The accessor "getExperimental" gives direct access to the value 240 */ 241 public abstract CanonicalResource setExperimentalElement(BooleanType value); 242 /** 243 * @return A Boolean value to indicate that this canonical resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 244 */ 245 public abstract boolean getExperimental(); 246 /** 247 * @param value A Boolean value to indicate that this canonical resource is authored for testing purposes (or education/evaluation/marketing) and is not intended to be used for genuine usage. 248 */ 249 public abstract CanonicalResource setExperimental(boolean value); 250 /** 251 * How many allowed for this property by the implementation 252 */ 253 public int getDateMax() { 254 return 1; 255 } 256 /** 257 * @return {@link #date} (The date (and optionally time) when the canonical resource was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the canonical resource changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 258 */ 259 public abstract DateTimeType getDateElement(); 260 261 public abstract boolean hasDateElement(); 262 public abstract boolean hasDate(); 263 264 /** 265 * @param value {@link #date} (The date (and optionally time) when the canonical resource was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the canonical resource changes.). This is the underlying object with id, value and extensions. The accessor "getDate" gives direct access to the value 266 */ 267 public abstract CanonicalResource setDateElement(DateTimeType value); 268 /** 269 * @return The date (and optionally time) when the canonical resource was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the canonical resource changes. 270 */ 271 public abstract Date getDate(); 272 /** 273 * @param value The date (and optionally time) when the canonical resource was published. The date must change when the business version changes and it must change if the status code changes. In addition, it should change when the substantive content of the canonical resource changes. 274 */ 275 public abstract CanonicalResource setDate(Date value); 276 /** 277 * How many allowed for this property by the implementation 278 */ 279 public int getPublisherMax() { 280 return 1; 281 } 282 /** 283 * @return {@link #publisher} (The name of the organization or individual that published the canonical resource.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 284 */ 285 public abstract StringType getPublisherElement(); 286 287 public abstract boolean hasPublisherElement(); 288 public abstract boolean hasPublisher(); 289 290 /** 291 * @param value {@link #publisher} (The name of the organization or individual that published the canonical resource.). This is the underlying object with id, value and extensions. The accessor "getPublisher" gives direct access to the value 292 */ 293 public abstract CanonicalResource setPublisherElement(StringType value); 294 /** 295 * @return The name of the organization or individual that published the canonical resource. 296 */ 297 public abstract String getPublisher(); 298 /** 299 * @param value The name of the organization or individual that published the canonical resource. 300 */ 301 public abstract CanonicalResource setPublisher(String value); 302 /** 303 * How many allowed for this property by the implementation 304 */ 305 public int getContactMax() { 306 return Integer.MAX_VALUE; 307 } 308 /** 309 * @return {@link #contact} (Contact details to assist a user in finding and communicating with the publisher.) 310 */ 311 public abstract List<ContactDetail> getContact(); 312 /** 313 * @return Returns a reference to <code>this</code> for easy method chaining 314 */ 315 public abstract CanonicalResource setContact(List<ContactDetail> theContact); 316 public abstract boolean hasContact(); 317 318 public abstract ContactDetail addContact(); //3 319 public abstract CanonicalResource addContact(ContactDetail t); //3 320 /** 321 * @return The first repetition of repeating field {@link #contact}, creating it if it does not already exist {1} 322 */ 323 public abstract ContactDetail getContactFirstRep(); 324 /** 325 * How many allowed for this property by the implementation 326 */ 327 public int getDescriptionMax() { 328 return 1; 329 } 330 /** 331 * @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 332 */ 333 public abstract MarkdownType getDescriptionElement(); 334 335 public abstract boolean hasDescriptionElement(); 336 public abstract boolean hasDescription(); 337 338 /** 339 * @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 340 */ 341 public abstract CanonicalResource setDescriptionElement(MarkdownType value); 342 /** 343 * @return A free text natural language description of the canonical resource from a consumer's perspective. 344 */ 345 public abstract String getDescription(); 346 /** 347 * @param value A free text natural language description of the canonical resource from a consumer's perspective. 348 */ 349 public abstract CanonicalResource setDescription(String value); 350 /** 351 * How many allowed for this property by the implementation 352 */ 353 public int getUseContextMax() { 354 return Integer.MAX_VALUE; 355 } 356 /** 357 * @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 resource instances.) 358 */ 359 public abstract List<UsageContext> getUseContext(); 360 /** 361 * @return Returns a reference to <code>this</code> for easy method chaining 362 */ 363 public abstract CanonicalResource setUseContext(List<UsageContext> theUseContext); 364 public abstract boolean hasUseContext(); 365 366 public abstract UsageContext addUseContext(); //3 367 public abstract CanonicalResource addUseContext(UsageContext t); //3 368 /** 369 * @return The first repetition of repeating field {@link #useContext}, creating it if it does not already exist {1} 370 */ 371 public abstract UsageContext getUseContextFirstRep(); 372 /** 373 * How many allowed for this property by the implementation 374 */ 375 public int getJurisdictionMax() { 376 return Integer.MAX_VALUE; 377 } 378 /** 379 * @return {@link #jurisdiction} (A legal or geographic region in which the canonical resource is intended to be used.) 380 */ 381 public abstract List<CodeableConcept> getJurisdiction(); 382 /** 383 * @return Returns a reference to <code>this</code> for easy method chaining 384 */ 385 public abstract CanonicalResource setJurisdiction(List<CodeableConcept> theJurisdiction); 386 public abstract boolean hasJurisdiction(); 387 388 public abstract CodeableConcept addJurisdiction(); //3 389 public abstract CanonicalResource addJurisdiction(CodeableConcept t); //3 390 /** 391 * @return The first repetition of repeating field {@link #jurisdiction}, creating it if it does not already exist {1} 392 */ 393 public abstract CodeableConcept getJurisdictionFirstRep(); 394 /** 395 * How many allowed for this property by the implementation 396 */ 397 public int getPurposeMax() { 398 return 1; 399 } 400 /** 401 * @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 402 */ 403 public abstract MarkdownType getPurposeElement(); 404 405 public abstract boolean hasPurposeElement(); 406 public abstract boolean hasPurpose(); 407 408 /** 409 * @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 410 */ 411 public abstract CanonicalResource setPurposeElement(MarkdownType value); 412 /** 413 * @return Explanation of why this canonical resource is needed and why it has been designed as it has. 414 */ 415 public abstract String getPurpose(); 416 /** 417 * @param value Explanation of why this canonical resource is needed and why it has been designed as it has. 418 */ 419 public abstract CanonicalResource setPurpose(String value); 420 /** 421 * How many allowed for this property by the implementation 422 */ 423 public int getCopyrightMax() { 424 return 1; 425 } 426 /** 427 * @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 428 */ 429 public abstract MarkdownType getCopyrightElement(); 430 431 public abstract boolean hasCopyrightElement(); 432 public abstract boolean hasCopyright(); 433 434 /** 435 * @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 436 */ 437 public abstract CanonicalResource setCopyrightElement(MarkdownType value); 438 /** 439 * @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. 440 */ 441 public abstract String getCopyright(); 442 /** 443 * @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. 444 */ 445 public abstract CanonicalResource setCopyright(String value); 446 protected void listChildren(List<Property> children) { 447 super.listChildren(children); 448 } 449 450 @Override 451 public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws FHIRException { 452 switch (_hash) { 453 default: return super.getNamedProperty(_hash, _name, _checkValid); 454 } 455 456 } 457 458 @Override 459 public Base[] getProperty(int hash, String name, boolean checkValid) throws FHIRException { 460 switch (hash) { 461 default: return super.getProperty(hash, name, checkValid); 462 } 463 464 } 465 466 @Override 467 public Base setProperty(int hash, String name, Base value) throws FHIRException { 468 switch (hash) { 469 default: return super.setProperty(hash, name, value); 470 } 471 472 } 473 474 @Override 475 public Base setProperty(String name, Base value) throws FHIRException { 476 return super.setProperty(name, value); 477 } 478 479 @Override 480 public Base makeProperty(int hash, String name) throws FHIRException { 481 switch (hash) { 482 default: return super.makeProperty(hash, name); 483 } 484 485 } 486 487 @Override 488 public String[] getTypesForProperty(int hash, String name) throws FHIRException { 489 switch (hash) { 490 default: return super.getTypesForProperty(hash, name); 491 } 492 493 } 494 495 @Override 496 public Base addChild(String name) throws FHIRException { 497 return super.addChild(name); 498 } 499 500 public String fhirType() { 501 return "CanonicalResource"; 502 503 } 504 505 public abstract CanonicalResource copy(); 506 507 public void copyValues(CanonicalResource dst) { 508 super.copyValues(dst); 509 } 510 511 @Override 512 public boolean equalsDeep(Base other_) { 513 if (!super.equalsDeep(other_)) 514 return false; 515 if (!(other_ instanceof CanonicalResource)) 516 return false; 517 CanonicalResource o = (CanonicalResource) other_; 518 return true; 519 } 520 521 @Override 522 public boolean equalsShallow(Base other_) { 523 if (!super.equalsShallow(other_)) 524 return false; 525 if (!(other_ instanceof CanonicalResource)) 526 return false; 527 CanonicalResource o = (CanonicalResource) other_; 528 return true; 529 } 530 531 public boolean isEmpty() { 532 return super.isEmpty() && ca.uhn.fhir.util.ElementUtil.isEmpty(); 533 } 534 535// Manual code (from Configuration.txt): 536 @Override 537 public String toString() { 538 return fhirType()+"["+getUrl()+"]"; 539 } 540 541 public String present() { 542 if (hasTitle()) 543 return getTitle(); 544 if (hasName()) 545 return getName(); 546 return toString(); 547 } 548 549 public String getVUrl() { 550 return getUrl() + (hasVersion() ? "|"+getVersion() : ""); 551 } 552 553 public boolean supportsCopyright() { 554 return true; 555 } 556 557 public boolean supportsExperimental() { 558 return true; 559 } 560 561 public String getVersionedUrl() { 562 return hasVersion() ? getUrl()+"|"+getVersion() : getUrl(); 563 } 564// end addition 565 566} 567