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