Package org.hl7.fhir.r4.elementmodel
Class Element
- java.lang.Object
-
- org.hl7.fhir.r4.model.Base
-
- org.hl7.fhir.r4.elementmodel.Element
-
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,Serializable,org.hl7.fhir.instance.model.api.IBase
public class Element extends Base
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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classElement.ElementSortComparatorclassElement.ICodingImplstatic classElement.SpecialElement
-
Method Summary
-
Methods inherited from class org.hl7.fhir.r4.model.Base
addChild, 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, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getNamedProperty, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isDateTime, listChildrenByName, listChildrenByName, setProperty, setUserData, setUserDataINN
-
-
-
-
Method Detail
-
updateProperty
public void updateProperty(Property property, Element.SpecialElement special, Property elementProperty)
-
getSpecial
public Element.SpecialElement getSpecial()
-
hasChildren
public boolean hasChildren()
-
getChildren
public List<Element> getChildren()
-
hasComments
public boolean hasComments()
-
getComments
public List<String> getComments()
-
getProperty
public Property getProperty()
-
hasValue
public boolean hasValue()
-
getChildrenByName
public List<Element> getChildrenByName(String name)
-
numberChildren
public void numberChildren()
-
getIndex
public int getIndex()
-
hasIndex
public boolean hasIndex()
-
setIndex
public void setIndex(int index)
-
getChildValue
public String getChildValue(String name)
-
setChildValue
public void setChildValue(String name, String value)
-
getChildren
public List<Element> getChildren(String name)
-
hasType
public boolean hasType()
-
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
protected void listChildren(List<Property> childProps)
- Specified by:
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
public Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
makePropertyin classBase- Throws:
org.hl7.fhir.exceptions.FHIRException
-
isPrimitive
public boolean isPrimitive()
- Overrides:
isPrimitivein classBase
-
isBooleanPrimitive
public boolean isBooleanPrimitive()
- Overrides:
isBooleanPrimitivein classBase
-
isResource
public boolean isResource()
- Overrides:
isResourcein classBase
-
hasPrimitiveValue
public boolean hasPrimitiveValue()
- Overrides:
hasPrimitiveValuein classBase
-
primitiveValue
public String primitiveValue()
- Overrides:
primitiveValuein classBase
-
line
public int line()
-
col
public int col()
-
markLocation
public Element markLocation(int line, int col)
-
clearDecorations
public void clearDecorations()
-
markValidation
public void markValidation(StructureDefinition profile, ElementDefinition definition)
-
getNamedChild
public Element getNamedChild(String name)
-
getNamedChildren
public void getNamedChildren(String name, List<Element> list)
-
getNamedChildValue
public String getNamedChildValue(String name)
-
getNamedChildrenWithWildcard
public void getNamedChildrenWithWildcard(String string, List<Element> values)
-
getXhtml
public org.hl7.fhir.utilities.xhtml.XhtmlNode getXhtml()
-
isEmpty
public boolean isEmpty()
-
getElementProperty
public Property getElementProperty()
-
hasElementProperty
public boolean hasElementProperty()
-
hasChildren
public boolean hasChildren(String name)
-
equalsDeep
public boolean equalsDeep(Base other)
- Overrides:
equalsDeepin classBase
-
equalsShallow
public boolean equalsShallow(Base other)
- Overrides:
equalsShallowin classBase
-
asType
public Type asType() throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
isMetadataBased
public boolean isMetadataBased()
- Overrides:
isMetadataBasedin classBase
-
isList
public boolean isList()
-
getTypesForProperty
public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getTypesForPropertyin classBase- Throws:
org.hl7.fhir.exceptions.FHIRException
-
sort
public void sort()
-
getAsICoding
public ICoding getAsICoding() throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getExplicitType
public String getExplicitType()
-
setExplicitType
public void setExplicitType(String explicitType)
-
-