Package org.hl7.fhir.r5.elementmodel
Class Element
java.lang.Object
org.hl7.fhir.r5.model.Base
org.hl7.fhir.r5.elementmodel.Element
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,Serializable,org.hl7.fhir.instance.model.api.IBase
This class represents the underlying reference model of FHIR
A resource is nothing but a set of elements, where every element has a
name, maybe a stated type, maybe an id, and either a value or child elements
(one or the other, but not both or neither)
- Author:
- Grahame Grieve
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclassstatic enumNested classes/interfaces inherited from class org.hl7.fhir.r5.model.Base
Base.ProfileSource, Base.ValidationInfo, Base.ValidationMode, Base.ValidationReason -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDefinition(StructureDefinition source, ElementDefinition defn, Base.ValidationMode mode) addElement(String name) voidaddMessage(org.hl7.fhir.utilities.validation.ValidationMessage vm) asType()voidclear()voidintcol()intbooleanequalsDeep(Base other) booleanequalsShallow(Base other) fhirType()forceElement(String name) getChildren(String name) getChildrenByName(String name) getChildValue(String name) intgetExtension(String url) getExtensionValue(String url) intgetIndex()intList<org.hl7.fhir.utilities.validation.ValidationMessage>getName()getNamedChild(String name) voidgetNamedChildren(String name, List<Element> list) voidgetNamedChildrenWithWildcard(String string, List<Element> values) getNamedChildValue(String name) this is set by the instance validator.getPath()Base[]getProperty(int hash, String name, boolean checkValid) getType()String[]getTypesForProperty(int hash, String name) A list of definitions that the validator matched this element to.getValue()org.hl7.fhir.utilities.xhtml.XhtmlNodegetXhtml()return XHTML if this is an XHTML node, else nullbooleanbooleanbooleanhasChildren(String name) booleanbooleanhasDescendant(Element element) booleanbooleanhasExtension(String url) booleanhasIndex()booleanbooleanbooleanbooleanbooleanhasType()booleanbooleanhasValue()booleanbooleanbooleanisEmpty()booleanisList()booleanbooleanisNull()booleanbooleanbooleanbooleanintline()protected voidlistChildren(List<Property> childProps) makeElement(String name) makeProperty(int hash, String name) markLocation(int line, int col) markLocation(org.hl7.fhir.utilities.SourceLocation loc) voidmarkValidation(StructureDefinition profile, ElementDefinition definition) voidvoidpopulatePaths(String path) voidvoidprintToOutput(PrintStream stream) voidremoveChild(String name) voidsetChildValue(String name, String value) voidsetDescendentCount(int descendentCount) voidsetElement(String string, Element map) voidsetExplicitType(String explicitType) voidvoidsetIndex(int index) voidsetInstanceId(int instanceId) voidsetNull(boolean isNull) voidsetParentForValidator(Element parentForValidator) voidvoidsetProhibited(boolean prohibited) setProperty(int hash, String name, Base value) voidsetRequired(boolean required) voidvoidvoidsetXhtml(org.hl7.fhir.utilities.xhtml.XhtmlNode xhtml) voidsort()toString()voidupdateProperty(Property property, Element.SpecialElement special, Property elementProperty) Methods inherited from class org.hl7.fhir.r5.model.Base
addChild, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyUserData, copyValues, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getNamedProperty, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isDateTime, listChildrenByName, listChildrenByName, removeChild, setProperty, setUserData, setUserDataINN
-
Constructor Details
-
Element
-
Element
-
Element
-
Element
-
-
Method Details
-
updateProperty
public void updateProperty(Property property, Element.SpecialElement special, Property elementProperty) -
getSpecial
-
getName
-
getType
-
getValue
-
hasChildren
-
getChildren
-
hasComments
-
getComments
-
getProperty
-
setValue
-
setType
-
isNull
-
setNull
-
hasValue
-
getChildrenByName
-
numberChildren
-
getIndex
-
hasIndex
-
setIndex
-
getChildValue
-
setChildValue
-
getChildren
-
hasType
-
fhirType
-
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
-
listChildren
- Overrides:
listChildrenin classBase
-
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
-
makeProperty
- Overrides:
makePropertyin classBase- Throws:
org.hl7.fhir.exceptions.FHIRException
-
makeElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
forceElement
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
isPrimitive
- Overrides:
isPrimitivein classBase
-
isBooleanPrimitive
- Overrides:
isBooleanPrimitivein classBase
-
isResource
- Overrides:
isResourcein classBase
-
hasPrimitiveValue
- Overrides:
hasPrimitiveValuein classBase
-
primitiveValue
- Overrides:
primitiveValuein classBase
-
line
-
col
-
markLocation
-
markLocation
-
clearDecorations
-
markValidation
-
getNamedChild
-
getNamedChildren
-
getNamedChildValue
-
getNamedChildrenWithWildcard
-
getXhtml
Description copied from class:Basereturn XHTML if this is an XHTML node, else null -
setXhtml
-
isEmpty
-
getElementProperty
-
hasElementProperty
-
hasChild
-
hasChildren
-
toString
-
getIdBase
-
setIdBase
-
equalsDeep
- Overrides:
equalsDeepin classBase
-
equalsShallow
- Overrides:
equalsShallowin classBase
-
asType
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
isMetadataBased
- Overrides:
isMetadataBasedin classBase
-
isList
-
isBaseList
-
getTypesForProperty
public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException - Overrides:
getTypesForPropertyin classBase- Throws:
org.hl7.fhir.exceptions.FHIRException
-
sort
-
getAsICoding
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getExplicitType
-
setExplicitType
-
hasDescendant
-
getExtension
-
getExtensionValue
-
hasExtension
-
getParentForValidator
this is set by the instance validator. There's no reason to maintain this when working with an element tree, and so it should be ignored outside the validator -
setParentForValidator
-
hasParentForValidator
-
clear
-
getPath
-
setPath
-
addMessage
-
hasMessages
-
getMessages
-
removeChild
-
isProhibited
-
setProhibited
-
isRequired
-
setRequired
-
getDescendentCount
-
setDescendentCount
-
countDescendents
-
getInstanceId
-
setInstanceId
-
hasValidationInfo
- Overrides:
hasValidationInfoin classBase
-
getValidationInfo
Description copied from class:BaseA list of definitions that the validator matched this element to. Note that the element doesn't have to conform to these definitions - check whether they're valid Some of the definitions will be noted because of slice matching- Overrides:
getValidationInfoin classBase- Returns:
-
addDefinition
public Base.ValidationInfo addDefinition(StructureDefinition source, ElementDefinition defn, Base.ValidationMode mode) - Overrides:
addDefinitionin classBase
-
hasSource
-
getSource
-
setSource
-
printToOutput
-
printToOutput
-
populatePaths
-
fhirTypeRoot
-
setElement
-
addElement
-