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:
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 Base
addChild(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.void
clearUserData(String name)
static boolean
compareDeep(String s1, String s2, boolean allowNull)
static boolean
compareDeep(List<? extends Base> e1, List<? extends Base> e2, boolean allowNull)
static boolean
compareDeep(Base e1, Base e2, boolean allowNull)
static boolean
compareDeep(org.hl7.fhir.utilities.xhtml.XhtmlNode div1, org.hl7.fhir.utilities.xhtml.XhtmlNode div2, boolean allowNull)
static boolean
compareValues(List<? extends PrimitiveType> e1, List<? extends PrimitiveType> e2, boolean allowNull)
static boolean
compareValues(PrimitiveType e1, PrimitiveType e2, boolean allowNull)
void
copyValues(Base dst)
BaseDateTimeType
dateTimeValue()
static boolean
equals(String v1, String v2)
boolean
equalsDeep(Base other)
boolean
equalsShallow(Base other)
abstract String
fhirType()
Property
getChildByName(String name)
List<String>
getFormatCommentsPost()
List<String>
getFormatCommentsPre()
abstract String
getIdBase()
Property
getNamedProperty(int _hash, String _name, boolean _checkValid)
Property
getNamedProperty(String _name)
Base[]
getProperty(int hash, String name, boolean checkValid)
String[]
getTypesForProperty(int hash, String name)
Object
getUserData(String name)
int
getUserInt(String name)
String
getUserString(String name)
boolean
hasFormatComment()
boolean
hasPrimitiveValue()
boolean
hasType(String... name)
boolean
hasUserData(String name)
boolean
isBooleanPrimitive()
boolean
isDateTime()
boolean
isEmpty()
protected boolean
isMetadataBased()
boolean
isPrimitive()
boolean
isResource()
protected void
listChildren(List<Property> result)
List<Base>
listChildrenByName(String name)
Base[]
listChildrenByName(String name, boolean checkValid)
Base
makeProperty(int hash, String name)
String
primitiveValue()
abstract void
setIdBase(String value)
Base
setProperty(int hash, String name, Base value)
Base
setProperty(String name, Base value)
void
setUserData(String name, Object value)
void
setUserDataINN(String name, Object value)
-
-
-
Constructor Detail
-
Base
public Base()
-
-
Method Detail
-
getUserData
public Object getUserData(String name)
- Specified by:
getUserData
in interfaceorg.hl7.fhir.instance.model.api.IBase
-
setUserData
public void setUserData(String name, Object value)
- Specified by:
setUserData
in 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)
-
hasFormatComment
public boolean hasFormatComment()
- Specified by:
hasFormatComment
in interfaceorg.hl7.fhir.instance.model.api.IBase
-
getFormatCommentsPre
public List<String> getFormatCommentsPre()
- Specified by:
getFormatCommentsPre
in interfaceorg.hl7.fhir.instance.model.api.IBase
-
getFormatCommentsPost
public List<String> getFormatCommentsPost()
- Specified by:
getFormatCommentsPost
in 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:
fhirType
in 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:
isEmpty
in 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)
-
-