
Package org.hl7.fhir.r5.model
Class Element
java.lang.Object
org.hl7.fhir.r5.model.Base
org.hl7.fhir.r5.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:
Availability.AvailabilityAvailableTimeComponent,Availability.AvailabilityNotAvailableTimeComponent,BackboneElement,DataRequirement.DataRequirementCodeFilterComponent,DataRequirement.DataRequirementDateFilterComponent,DataRequirement.DataRequirementSortComponent,DataRequirement.DataRequirementValueFilterComponent,DataType,Dosage.DosageDoseAndRateComponent,ElementDefinition.ElementDefinitionBaseComponent,ElementDefinition.ElementDefinitionBindingAdditionalComponent,ElementDefinition.ElementDefinitionBindingComponent,ElementDefinition.ElementDefinitionConstraintComponent,ElementDefinition.ElementDefinitionExampleComponent,ElementDefinition.ElementDefinitionMappingComponent,ElementDefinition.ElementDefinitionSlicingComponent,ElementDefinition.ElementDefinitionSlicingDiscriminatorComponent,ElementDefinition.TypeRefComponent,NamedElementExtension,OrderedDistribution.OrderedDistributionIntervalComponent,Statistic.StatisticAttributeEstimateAttributeEstimateComponent,Statistic.StatisticAttributeEstimateComponent,Statistic.StatisticModelCharacteristicComponent,Statistic.StatisticModelCharacteristicVariableComponent,Statistic.StatisticSampleSizeComponent,SubstanceAmount.SubstanceAmountReferenceRangeComponent,Timing.TimingRepeatComponent
public abstract class Element
extends Base
implements org.hl7.fhir.instance.model.api.IBaseHasExtensions, org.hl7.fhir.instance.model.api.IBaseElement
Element Type: Base definition for all elements in a resource.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hl7.fhir.r5.model.Base
Base.ProfileSource, Base.ValidationInfo, Base.ValidationMode, Base.ValidationReason -
Field Summary
FieldsModifier and TypeFieldDescriptionMay be used to represent additional information that is not part of the basic definition of the element.protected StringTypeUnique id for the element within a resource (for internal references). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExtension(String url, DataType value) abstract Elementcopy()voidcopyExtensions(Element src, String... urls) voidcopyNewExtensions(Element src, String... urls) voidcopyValues(Element dst) booleanequalsDeep(Base other_) booleanequalsShallow(Base other_) fhirType()getExtensionByUrl(String theUrl) Returns an extension if one (and only one) matches the given URL.getExtensionByUrl(String... theUrls) Returns an extension if one (and only one) matches the given URL.getExtensionsByUrl(String theUrl) Returns an unmodifiable list containing all extensions on this element which match the given URL.getExtensionsByUrl(String... theUrls) getExtensionString(String theUrl) Returns the value as a string if this element has only one extension that matches the given URL, and that can be converted to a string.getExtensionString(String... theUrls) getExtensionValue(String... theUrls) org.hl7.fhir.utilities.FhirPublicationgetId()getNamedProperty(int _hash, String _name, boolean _checkValid) Base[]getProperty(int hash, String name, boolean checkValid) org.hl7.fhir.utilities.StandardsStatusString[]getTypesForProperty(int hash, String name) booleanbooleanhasExtension(String theUrl) Returns an true if this element has an extension that matchs the given URL.booleanhasExtension(String... theUrls) booleanhasExtension(Extension ext) booleanhasId()booleanbooleanbooleanisEmpty()protected voidlistChildren(List<Property> children) makeProperty(int hash, String name) voidremoveChild(String name, Base value) voidremoveExtension(String theUrl) Remove any extensions that match (by given URL).setDisallowExtensions(boolean disallowExtensions) setExtension(List<Extension> theExtension) voidsetIdElement(StringType value) setProperty(int hash, String name, Base value) setProperty(String name, Base value) voidsetStandardsStatus(org.hl7.fhir.utilities.StandardsStatus status) Methods inherited from class org.hl7.fhir.r5.model.Base
addDefinition, addFormatCommentsPost, addFormatCommentsPre, addValidationMessage, canHavePrimitiveValue, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyFormatComments, copyUserData, copyValues, dateTimeValue, equals, executeFunction, getChildByName, getChildValueByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, getValidationInfo, getValidationMessages, getXhtml, hasFormatComment, hasFormatCommentPost, hasFormatCommentPre, hasPrimitiveValue, hasType, hasUserData, hasValidated, hasValidationInfo, hasValidationMessages, isBooleanPrimitive, isCopyUserData, isDateTime, isMetadataBased, isPrimitive, isResource, listChildrenByName, listChildrenByName, primitiveValue, setCopyUserData, setUserData, setUserDataINN, setXhtmlMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserDataMethods inherited from interface org.hl7.fhir.instance.model.api.IBaseElement
getUserData, setUserData
-
Field Details
-
id
Unique id for the element within a resource (for internal references). This may be any string value that does not contain spaces. -
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 managable, 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
-
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
- Specified by:
getIdin interfaceorg.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
- Specified by:
setIdin interfaceorg.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:
getExtensionin interfaceorg.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 managable, 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
- Returns:
- Returns a reference to
thisfor easy method chaining
-
hasExtension
- Specified by:
hasExtensionin interfaceorg.hl7.fhir.instance.model.api.IBaseHasExtensions
-
addExtension
- Specified by:
addExtensionin interfaceorg.hl7.fhir.instance.model.api.IBaseHasExtensions
-
addExtension
-
getExtensionFirstRep
- Returns:
- The first repetition of repeating field
extension, creating it if it does not already exist {3}
-
listChildren
- Overrides:
listChildrenin classBase
-
getNamedProperty
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
getNamedPropertyin classBase- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getProperty
public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
getPropertyin classBase- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
public Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
setPropertyin classBase- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
- Overrides:
setPropertyin classBase- Throws:
org.hl7.fhir.exceptions.FHIRException
-
removeChild
- Overrides:
removeChildin classBase- Throws:
org.hl7.fhir.exceptions.FHIRException
-
makeProperty
- Overrides:
makePropertyin classBase- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getTypesForProperty
public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
getTypesForPropertyin classBase- Throws:
org.hl7.fhir.exceptions.FHIRException
-
addChild
-
fhirType
-
copy
-
copyValues
-
equalsDeep
- Overrides:
equalsDeepin classBase
-
equalsShallow
- Overrides:
equalsShallowin classBase
-
isEmpty
-
getIdBase
-
setIdBase
-
addExtension
-
getExtensionByUrl
Returns an extension if one (and only one) matches the given URL. Note: BackboneElements override this to look in matching Modifier Extensions too- Parameters:
theUrl- The URL. Must not be blank or null.- Returns:
- the matching extension, or null
-
getExtensionByUrl
Returns an extension if one (and only one) matches the given URL. Note: BackboneElements override this to look in matching Modifier Extensions too- Parameters:
theUrls- One or more URLs to match. Must not be blank or null.- Returns:
- the matching extension, or null
-
removeExtension
Remove any extensions that match (by given URL). Note: BackboneElements override this to remove from Modifier Extensions too- Parameters:
theUrl- The URL. Must not be blank or null.
-
isDisallowExtensions
-
setDisallowExtensions
-
noExtensions
-
getExtensionsByUrl
Returns an unmodifiable list containing all extensions on this element which match the given URL. Note: BackboneElements override this to add matching Modifier Extensions too- 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
-
getExtensionsByUrl
-
hasExtension
-
getExtensionValue
-
hasExtension
Returns an true if this element has an extension that matchs the given URL. Note: BackboneElements override this to check Modifier Extensions too- Parameters:
theUrl- The URL. Must not be blank or null.
-
getExtensionString
Returns the value as a string if this element has only one extension that matches the given URL, and that can be converted to a string. Note: BackboneElements override this to check Modifier Extensions too- Parameters:
theUrl- The URL. Must not be blank or null.- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getExtensionString
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getStandardsStatus
-
setStandardsStatus
-
hasExtension
-
copyExtensions
-
copyNewExtensions
-
getFHIRPublicationVersion
- Specified by:
getFHIRPublicationVersionin classBase
-