Package org.hl7.fhir.r4.model
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 Summary
Modifier and TypeFieldDescriptionMay be used to represent additional information that is not part of the basic definition of the element.protected StringType
Unique id for the element within a resource (for internal references). -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addExtension
(String url, Type value) abstract Element
copy()
void
copyExtensions
(Element src, String... urls) void
copyNewExtensions
(Element src, String... urls) void
copyValues
(Element dst) boolean
equalsDeep
(Base other_) boolean
equalsShallow
(Base other_) fhirType()
getExtensionByUrl
(String theUrl) getExtensionsByUrl
(String theUrl) Returns an unmodifiable list containing all extensions on this element which match the given URL.getExtensionsByUrl
(String... theUrls) getExtensionString
(String theUrl) getId()
getNamedProperty
(int _hash, String _name, boolean _checkValid) Base[]
getProperty
(int hash, String name, boolean checkValid) String[]
getTypesForProperty
(int hash, String name) boolean
boolean
hasExtension
(String theUrl) boolean
hasExtension
(String... theUrls) boolean
hasExtension
(Extension ext) boolean
hasId()
boolean
boolean
boolean
isEmpty()
protected void
listChildren
(List<Property> children) makeProperty
(int hash, String name) void
removeChild
(String name, Base value) void
removeExtension
(String theUrl) setDisallowExtensions
(boolean disallowExtensions) setExtension
(List<Extension> theExtension) void
setIdElement
(StringType value) setProperty
(int hash, String name, Base value) setProperty
(String name, Base value) Methods inherited from class org.hl7.fhir.r4.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCanonical, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExpression, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMarketingStatus, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPopulation, castToPositiveInt, castToProdCharacteristic, castToProductShelfLife, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToSubstanceAmount, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUrl, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyValues, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, getXhtml, hasFormatComment, hasPrimitiveValue, hasType, hasUserData, isBooleanPrimitive, isDateTime, isMetadataBased, isPrimitive, isResource, listChildrenByName, listChildrenByName, primitiveValue, setUserData, setUserDataINN
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserData
Methods 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 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
-
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:
getId
in 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:
setId
in 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:
getExtension
in 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 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
- Returns:
- Returns a reference to
this
for easy method chaining
-
hasExtension
- Specified by:
hasExtension
in interfaceorg.hl7.fhir.instance.model.api.IBaseHasExtensions
-
addExtension
- Specified by:
addExtension
in 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
-
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
-
getExtensionString
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
listChildren
- Specified by:
listChildren
in classBase
-
getNamedProperty
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
getNamedProperty
in classBase
- 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 classBase
- 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 classBase
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
- Overrides:
setProperty
in classBase
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
removeChild
- Overrides:
removeChild
in classBase
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
makeProperty
- Overrides:
makeProperty
in classBase
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getTypesForProperty
public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
getTypesForProperty
in classBase
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
addChild
-
fhirType
-
copy
-
copyValues
-
equalsDeep
- Overrides:
equalsDeep
in classBase
-
equalsShallow
- Overrides:
equalsShallow
in classBase
-
isEmpty
-
getIdBase
-
setIdBase
-
addExtension
-
getExtensionByUrl
-
removeExtension
-
isDisallowExtensions
-
setDisallowExtensions
-
noExtensions
-
getExtensionsByUrl
-
hasExtension
-
hasExtension
-
copyExtensions
-
copyNewExtensions
-