Package org.hl7.fhir.r4b.model
Class Base
- java.lang.Object
-
- org.hl7.fhir.r4b.model.Base
-
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,Serializable,org.hl7.fhir.instance.model.api.IBase
- Direct Known Subclasses:
BaseResource,Element,Element,GraphQLEngine.SearchEdge,GraphQLEngine.SearchWrapper,Tuple
public abstract class Base extends Object implements Serializable, org.hl7.fhir.instance.model.api.IBase, ca.uhn.fhir.model.api.IElement
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Base()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description BaseaddChild(String name)List<Property>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.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)voidcopyUserData(Base other)voidcopyValues(Base dst)BaseDateTimeTypedateTimeValue()static booleanequals(String v1, String v2)booleanequalsDeep(Base other)booleanequalsShallow(Base other)abstract StringfhirType()PropertygetChildByName(String name)List<String>getFormatCommentsPost()List<String>getFormatCommentsPre()abstract StringgetIdBase()PropertygetNamedProperty(int _hash, String _name, boolean _checkValid)PropertygetNamedProperty(String _name)Base[]getProperty(int hash, String name, boolean checkValid)String[]getTypesForProperty(int hash, String name)ObjectgetUserData(String name)intgetUserInt(String name)StringgetUserString(String name)org.hl7.fhir.utilities.xhtml.XhtmlNodegetXhtml()return XHTML if this is an XHTML node, else nullbooleanhasFormatComment()booleanhasPrimitiveValue()booleanhasType(String... name)booleanhasUserData(String name)booleanisBooleanPrimitive()booleanisDateTime()booleanisEmpty()protected booleanisMetadataBased()booleanisPrimitive()booleanisResource()protected voidlistChildren(List<Property> result)List<Base>listChildrenByName(String name)Base[]listChildrenByName(String name, boolean checkValid)BasemakeProperty(int hash, String name)StringprimitiveValue()abstract voidsetIdBase(String value)BasesetProperty(int hash, String name, Base value)BasesetProperty(String name, Base value)voidsetUserData(String name, Object value)voidsetUserDataINN(String name, Object value)
-
-
-
Constructor Detail
-
Base
public Base()
-
-
Method Detail
-
getUserData
public Object getUserData(String name)
- Specified by:
getUserDatain interfaceorg.hl7.fhir.instance.model.api.IBase
-
setUserData
public void setUserData(String name, Object value)
- Specified by:
setUserDatain interfaceorg.hl7.fhir.instance.model.api.IBase
-
clearUserData
public void clearUserData(String name)
-
setUserDataINN
public void setUserDataINN(String name, Object value)
-
hasUserData
public boolean hasUserData(String name)
-
getUserString
public String getUserString(String name)
-
getUserInt
public int getUserInt(String name)
-
copyUserData
public void copyUserData(Base other)
-
hasFormatComment
public boolean hasFormatComment()
- Specified by:
hasFormatCommentin interfaceorg.hl7.fhir.instance.model.api.IBase
-
getFormatCommentsPre
public List<String> getFormatCommentsPre()
- Specified by:
getFormatCommentsPrein interfaceorg.hl7.fhir.instance.model.api.IBase
-
getFormatCommentsPost
public List<String> getFormatCommentsPost()
- Specified by:
getFormatCommentsPostin interfaceorg.hl7.fhir.instance.model.api.IBase
-
isPrimitive
public boolean isPrimitive()
-
isBooleanPrimitive
public boolean isBooleanPrimitive()
-
hasPrimitiveValue
public boolean hasPrimitiveValue()
-
primitiveValue
public String primitiveValue()
-
isDateTime
public boolean isDateTime()
-
dateTimeValue
public BaseDateTimeType dateTimeValue()
-
fhirType
public abstract String fhirType()
- Specified by:
fhirTypein interfaceorg.hl7.fhir.instance.model.api.IBase
-
listChildren
protected void listChildren(List<Property> result)
-
setProperty
public Base setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
addChild
public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
children
public List<Property> 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
public Property getChildByName(String name)
-
listChildrenByName
public List<Base> listChildrenByName(String name) throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
listChildrenByName
public Base[] listChildrenByName(String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
- Throws:
org.hl7.fhir.exceptions.FHIRException
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.hl7.fhir.instance.model.api.IBase
-
equalsDeep
public boolean equalsDeep(Base other)
-
equalsShallow
public boolean equalsShallow(Base other)
-
compareDeep
public static boolean compareDeep(String s1, String s2, boolean allowNull)
-
compareDeep
public static boolean compareDeep(List<? extends Base> e1, List<? extends Base> e2, boolean allowNull)
-
compareDeep
public static boolean compareDeep(Base e1, Base e2, boolean allowNull)
-
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
public static boolean compareValues(PrimitiveType e1, PrimitiveType e2, boolean allowNull)
-
isMetadataBased
protected boolean 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
public Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
- 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
-
isResource
public boolean isResource()
-
getNamedProperty
public Property getNamedProperty(String _name) throws org.hl7.fhir.exceptions.FHIRException
- 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
-
copyValues
public void copyValues(Base dst)
-
getXhtml
public org.hl7.fhir.utilities.xhtml.XhtmlNode getXhtml()
return XHTML if this is an XHTML node, else null- Returns:
-
-