
Package org.hl7.fhir.r5.model
Class Base
java.lang.Object
org.hl7.fhir.r5.model.Base
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,Serializable,org.hl7.fhir.instance.model.api.IBase
- Direct Known Subclasses:
BaseJsonWrapper,BaseResource,BaseTableWrapper,Element,Element,FHIRPathUtilityClasses.ClassTypeInfo,FHIRPathUtilityClasses.FHIRConstant,GlobalObject,GraphQLEngine.SearchEdge,GraphQLEngine.SearchWrapper,LiquidEngine.LiquidForLoopObject,LogicalBase,TerminologyFunctions.TerminologiesObject,TestDataFactory.DataTable,Tuple
public abstract class Base
extends Object
implements Serializable, org.hl7.fhir.instance.model.api.IBase, ca.uhn.fhir.model.api.IElement
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumclassstatic classstatic enum -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDefinition(StructureDefinition structure, ElementDefinition defn, Base.ValidationMode mode) voidaddFormatCommentsPost(List<String> comments) voidaddFormatCommentsPre(List<String> comments) addValidationMessage(org.hl7.fhir.utilities.validation.ValidationMessage msg) booleanchildren()Supports iterating the children elements in some generic processor or browser All defined children will be listed, even if they have no value on this instance Note that the actual content of primitive or xhtml elements is not iterated explicitly.voidclearUserData(String name) static booleancompareDeep(String s1, String s2, boolean allowNull) static booleancompareDeep(List<? extends Base> e1, List<? extends Base> e2, boolean allowNull) static booleancompareDeep(Base e1, Base e2, boolean allowNull) static booleancompareDeep(org.hl7.fhir.utilities.xhtml.XhtmlNode div1, org.hl7.fhir.utilities.xhtml.XhtmlNode div2, boolean allowNull) static booleancompareValues(List<? extends PrimitiveType> e1, List<? extends PrimitiveType> e2, boolean allowNull) static booleancompareValues(PrimitiveType e1, PrimitiveType e2, boolean allowNull) abstract Basecopy()voidcopyFormatComments(Base other) voidcopyUserData(Base other) voidcopyValues(Base dst) static booleanbooleanequalsDeep(Base other) booleanequalsShallow(Base other) executeFunction(FHIRPathEngine engine, Object appContext, List<Base> focus, String functionName, List<List<Base>> parameters) abstract StringfhirType()getChildByName(String name) getChildValueByName(String name) abstract org.hl7.fhir.utilities.FhirPublicationabstract StringgetNamedProperty(int _hash, String _name, boolean _checkValid) getNamedProperty(String _name) Base[]getProperty(int hash, String name, boolean checkValid) String[]getTypesForProperty(int hash, String name) getUserData(String name) intgetUserInt(String name) getUserString(String name) A list of definitions that the validator matched this element to.List<org.hl7.fhir.utilities.validation.ValidationMessage> org.hl7.fhir.utilities.xhtml.XhtmlNodegetXhtml()return XHTML if this is an XHTML node, else nullbooleanbooleanbooleanbooleanbooleanNote that this is potentially misleading on ElementDefinition that has a 'type' property - don't mistakenly use this thinking it's going to look at ElementDefinition.typebooleanhasUserData(String name) booleanbooleanbooleanbooleanstatic booleanbooleanbooleanisEmpty()protected booleanbooleanbooleanprotected voidlistChildren(List<Property> result) listChildrenByName(String name) Base[]listChildrenByName(String name, boolean checkValid) makeProperty(int hash, String name) voidremoveChild(String name, Base value) static voidsetCopyUserData(boolean value) abstract voidsetProperty(int hash, String name, Base value) setProperty(String name, Base value) voidsetUserData(String name, Object value) voidsetUserDataINN(String name, Object value) setXhtml(org.hl7.fhir.utilities.xhtml.XhtmlNode node) return set XHTML if this is an XHTML node, else error
-
Constructor Details
-
Base
public Base()
-
-
Method Details
-
isCopyUserData
-
setCopyUserData
-
getUserData
- Specified by:
getUserDatain interfaceorg.hl7.fhir.instance.model.api.IBase
-
setUserData
- Specified by:
setUserDatain interfaceorg.hl7.fhir.instance.model.api.IBase
-
clearUserData
-
setUserDataINN
-
hasUserData
-
getUserString
-
getUserInt
-
copyUserData
-
hasFormatComment
- Specified by:
hasFormatCommentin interfaceorg.hl7.fhir.instance.model.api.IBase
-
hasFormatCommentPre
-
hasFormatCommentPost
-
getFormatCommentsPre
- Specified by:
getFormatCommentsPrein interfaceorg.hl7.fhir.instance.model.api.IBase
-
getFormatCommentsPost
- Specified by:
getFormatCommentsPostin interfaceorg.hl7.fhir.instance.model.api.IBase
-
copyFormatComments
-
addFormatCommentsPre
-
addFormatCommentsPost
-
isPrimitive
- Returns:
- true if the data type is a primitive type and might have a primitive value (which will be accessed as a string, irrespective of the stated value)
-
isBooleanPrimitive
- Returns:
- true if the type is boolean, and the primitive value can only be 'true' or 'false'
-
hasPrimitiveValue
- Returns:
- true if the type is primitive, and there's value (e.g. no Data-Absent-Reason extension etc)
-
canHavePrimitiveValue
- Returns:
- true if the type is primitive, and there could be a value (irrespective of whether it's present e.g. no Data-Absent-Reason extension etc)
-
primitiveValue
- Returns:
- the primitive value if there is one, as a string irrespective of the actual type (e.g. dates converted to their FHIR string representation) return null if the value is not a primitive or there is no value (might be extensions instead)
-
isDateTime
- Returns:
- true if the type is date|dateTime|instant, and the primitive value is a date/time of some precision
-
dateTimeValue
- Returns:
- the date/time value if there is one, or null
-
fhirType
- Specified by:
fhirTypein interfaceorg.hl7.fhir.instance.model.api.IBase- Returns:
- the FHIR type name of the instance (not the java class name)
-
hasType
Note that this is potentially misleading on ElementDefinition that has a 'type' property - don't mistakenly use this thinking it's going to look at ElementDefinition.type- Parameters:
name- - fhir type name
-
listChildren
-
setProperty
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
addChild
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
removeChild
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
children
Supports iterating the children elements in some generic processor or browser All defined children will be listed, even if they have no value on this instance Note that the actual content of primitive or xhtml elements is not iterated explicitly. To find these, the processing code must recognise the element as a primitive, typecast the value to aDataType, and examine the value- Returns:
- a list of all the children defined for this element
-
getChildByName
-
listChildrenByName
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getChildValueByName
-
listChildrenByName
public Base[] listChildrenByName(String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException - Throws:
org.hl7.fhir.exceptions.FHIRException
-
isEmpty
- Specified by:
isEmptyin interfaceorg.hl7.fhir.instance.model.api.IBase
-
equalsDeep
-
equalsShallow
-
compareDeep
-
compareDeep
public static boolean compareDeep(List<? extends Base> e1, List<? extends Base> e2, boolean allowNull) -
compareDeep
-
compareDeep
public static boolean compareDeep(org.hl7.fhir.utilities.xhtml.XhtmlNode div1, org.hl7.fhir.utilities.xhtml.XhtmlNode div2, boolean allowNull) -
compareValues
public static boolean compareValues(List<? extends PrimitiveType> e1, List<? extends PrimitiveType> e2, boolean allowNull) -
compareValues
-
isMetadataBased
-
getProperty
public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException - Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
public Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException - Throws:
org.hl7.fhir.exceptions.FHIRException
-
makeProperty
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getTypesForProperty
public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException - Throws:
org.hl7.fhir.exceptions.FHIRException
-
equals
-
isResource
-
getIdBase
-
setIdBase
-
getNamedProperty
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getNamedProperty
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException - Throws:
org.hl7.fhir.exceptions.FHIRException
-
copy
-
copyValues
-
getXhtml
return XHTML if this is an XHTML node, else null- Returns:
-
setXhtml
return set XHTML if this is an XHTML node, else error- Returns:
-
hasValidationInfo
-
getValidationInfo
A 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- Returns:
-
addDefinition
public Base.ValidationInfo addDefinition(StructureDefinition structure, ElementDefinition defn, Base.ValidationMode mode) -
hasValidated
-
addValidationMessage
-
hasValidationMessages
-
getValidationMessages
-
getFHIRPublicationVersion
-
executeFunction
-