Class Element

java.lang.Object
org.hl7.fhir.r4.model.Base
org.hl7.fhir.r4.model.Element
All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseElement, org.hl7.fhir.instance.model.api.IBaseHasExtensions
Direct Known Subclasses:
BackboneElement, DataRequirement.DataRequirementCodeFilterComponent, DataRequirement.DataRequirementDateFilterComponent, DataRequirement.DataRequirementSortComponent, Dosage.DosageDoseAndRateComponent, ElementDefinition.ElementDefinitionBaseComponent, ElementDefinition.ElementDefinitionBindingComponent, ElementDefinition.ElementDefinitionConstraintComponent, ElementDefinition.ElementDefinitionExampleComponent, ElementDefinition.ElementDefinitionMappingComponent, ElementDefinition.ElementDefinitionSlicingComponent, ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent, ElementDefinition.TypeRefComponent, SubstanceAmount.SubstanceAmountReferenceRangeComponent, Timing.TimingRepeatComponent, Type, XhtmlType

public abstract class Element extends Base implements org.hl7.fhir.instance.model.api.IBaseHasExtensions, org.hl7.fhir.instance.model.api.IBaseElement
Base definition for all elements in a resource.
See Also:
  • Field Details

    • id

      protected StringType id
      Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
    • extension

      protected List<Extension> extension
      May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.
  • Constructor Details

    • Element

      public Element()
      Constructor
  • Method Details

    • getIdElement

      Returns:
      id (Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.). This is the underlying object with id, value and extensions. The accessor "getId" gives direct access to the value
    • hasIdElement

      public boolean hasIdElement()
    • hasId

      public boolean hasId()
    • setIdElement

      Parameters:
      value - id (Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.). This is the underlying object with id, value and extensions. The accessor "getId" gives direct access to the value
    • getId

      public String getId()
      Specified by:
      getId in interface org.hl7.fhir.instance.model.api.IBaseElement
      Returns:
      Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
    • setId

      public Element setId(String value)
      Specified by:
      setId in interface org.hl7.fhir.instance.model.api.IBaseElement
      Parameters:
      value - Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces.
    • getExtension

      Specified by:
      getExtension in interface org.hl7.fhir.instance.model.api.IBaseHasExtensions
      Returns:
      extension (May be used to represent additional information that is not part of the basic definition of the element. To make the use of extensions safe and manageable, there is a strict set of governance applied to the definition and use of extensions. Though any implementer can define an extension, there is a set of requirements that SHALL be met as part of the definition of the extension.)
    • setExtension

      public Element setExtension(List<Extension> theExtension)
      Returns:
      Returns a reference to this for easy method chaining
    • hasExtension

      public boolean hasExtension()
      Specified by:
      hasExtension in interface org.hl7.fhir.instance.model.api.IBaseHasExtensions
    • addExtension

      Specified by:
      addExtension in interface org.hl7.fhir.instance.model.api.IBaseHasExtensions
    • addExtension

    • getExtensionFirstRep

      Returns:
      The first repetition of repeating field extension, creating it if it does not already exist
    • getExtensionsByUrl

      Returns an unmodifiable list containing all extensions on this element which match the given URL.
      Parameters:
      theUrl - The URL. Must not be blank or null.
      Returns:
      an unmodifiable list containing all extensions on this element which match the given URL
    • hasExtension

      public boolean hasExtension(String theUrl)
    • getExtensionString

      public String getExtensionString(String theUrl) throws org.hl7.fhir.exceptions.FHIRException
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • listChildren

      protected void listChildren(List<Property> children)
      Specified by:
      listChildren in class Base
    • getNamedProperty

      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getNamedProperty in class Base
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • getProperty

      public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getProperty in class Base
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • setProperty

      public Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      setProperty in class Base
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • setProperty

      public Base setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      setProperty in class Base
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • removeChild

      public void removeChild(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      removeChild in class Base
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • makeProperty

      public Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      makeProperty in class Base
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • getTypesForProperty

      public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getTypesForProperty in class Base
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • addChild

      public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      addChild in class Base
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • fhirType

      public String fhirType()
      Specified by:
      fhirType in interface org.hl7.fhir.instance.model.api.IBase
      Specified by:
      fhirType in class Base
    • copy

      public abstract Element copy()
      Specified by:
      copy in class Base
    • copyValues

      public void copyValues(Element dst)
    • equalsDeep

      public boolean equalsDeep(Base other_)
      Overrides:
      equalsDeep in class Base
    • equalsShallow

      public boolean equalsShallow(Base other_)
      Overrides:
      equalsShallow in class Base
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      isEmpty in class Base
    • getIdBase

      public String getIdBase()
      Specified by:
      getIdBase in class Base
    • setIdBase

      public void setIdBase(String value)
      Specified by:
      setIdBase in class Base
    • addExtension

      public void addExtension(String url, Type value)
    • getExtensionByUrl

    • removeExtension

      public void removeExtension(String theUrl)
    • isDisallowExtensions

      public boolean isDisallowExtensions()
    • setDisallowExtensions

      public Element setDisallowExtensions(boolean disallowExtensions)
    • noExtensions

    • getExtensionsByUrl

      public List<Extension> getExtensionsByUrl(String... theUrls)
    • hasExtension

      public boolean hasExtension(String... theUrls)
    • hasExtension

      public boolean hasExtension(Extension ext)
    • copyExtensions

      public void copyExtensions(Element src, String... urls)
    • copyNewExtensions

      public void copyNewExtensions(Element src, String... urls)