Package ca.uhn.fhir.model.api
Class BaseElement
- java.lang.Object
-
- ca.uhn.fhir.model.api.BaseElement
-
- All Implemented Interfaces:
IElement,ISupportsUndeclaredExtensions,Serializable,IBase
- Direct Known Subclasses:
BaseIdentifiableElement,Tag
public abstract class BaseElement extends Object implements ISupportsUndeclaredExtensions
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BaseElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtensionDtaddUndeclaredExtension(boolean theIsModifier, String theUrl)Adds an extension to this object.ExtensionDtaddUndeclaredExtension(boolean theIsModifier, String theUrl, IBaseDatatype theValue)Adds an extension to this objectvoidaddUndeclaredExtension(ExtensionDt theExtension)Adds an extension to this object.List<ExtensionDt>getAllUndeclaredExtensions()Returns an immutable list containing all extensions (modifier and non-modifier).List<String>getFormatCommentsPost()Returns a list of comments appearing immediately after this element within the serialized form of the resource.List<String>getFormatCommentsPre()Returns a list of comments appearing immediately before this element within the serialized form of the resource.List<ExtensionDt>getUndeclaredExtensions()Returns a list containing all undeclared non-modifier extensions.List<ExtensionDt>getUndeclaredExtensionsByUrl(String theUrl)Returns an immutable list containing all undeclared extensions (modifier and non-modifier) by extension URLList<ExtensionDt>getUndeclaredModifierExtensions()Returns a list containing all undeclared modifier extensions.ObjectgetUserData(String name)Retrieves any user suplied data in this elementbooleanhasFormatComment()Returnstrueif any comments would be returned byIBase.getFormatCommentsPre()orIBase.getFormatCommentsPost()protected booleanisBaseEmpty()Intended to be called by extending classesIBase.isEmpty()implementations, returnstrueif all content in this superclass instance is empty per the semantics ofIBase.isEmpty().voidsetUserData(String name, Object value)Sets a user supplied data value in this element
-
-
-
Constructor Detail
-
BaseElement
public BaseElement()
-
-
Method Detail
-
addUndeclaredExtension
public ExtensionDt addUndeclaredExtension(boolean theIsModifier, String theUrl)
Description copied from interface:ISupportsUndeclaredExtensionsAdds an extension to this object. This method is intended for use when an extension is being added which will contain child extensions, as opposed to a datatype.- Specified by:
addUndeclaredExtensionin interfaceISupportsUndeclaredExtensions- See Also:
To return a mutable list which may be used to remove extensions
-
addUndeclaredExtension
public ExtensionDt addUndeclaredExtension(boolean theIsModifier, String theUrl, IBaseDatatype theValue)
Description copied from interface:ISupportsUndeclaredExtensionsAdds an extension to this object- Specified by:
addUndeclaredExtensionin interfaceISupportsUndeclaredExtensions- See Also:
To return a mutable list which may be used to remove extensions
-
addUndeclaredExtension
public void addUndeclaredExtension(ExtensionDt theExtension)
Description copied from interface:ISupportsUndeclaredExtensionsAdds an extension to this object. This extension should have the following properties set:Is ModifierURL- And one of:
- Specified by:
addUndeclaredExtensionin interfaceISupportsUndeclaredExtensions- Parameters:
theExtension- The extension to add. Can not be null.
-
getAllUndeclaredExtensions
public List<ExtensionDt> getAllUndeclaredExtensions()
Description copied from interface:ISupportsUndeclaredExtensionsReturns an immutable list containing all extensions (modifier and non-modifier).
-
getFormatCommentsPost
public List<String> getFormatCommentsPost()
Description copied from interface:IBaseReturns a list of comments appearing immediately after this element within the serialized form of the resource. Creates the list if it does not exist, so this method will not returnnull- Specified by:
getFormatCommentsPostin interfaceIBase
-
getFormatCommentsPre
public List<String> getFormatCommentsPre()
Description copied from interface:IBaseReturns a list of comments appearing immediately before this element within the serialized form of the resource. Creates the list if it does not exist, so this method will not returnnull- Specified by:
getFormatCommentsPrein interfaceIBase
-
getUndeclaredExtensions
public List<ExtensionDt> getUndeclaredExtensions()
Description copied from interface:ISupportsUndeclaredExtensionsReturns a list containing all undeclared non-modifier extensions. The returned list is mutable, so it may be modified (e.g. to add or remove an extension).- Specified by:
getUndeclaredExtensionsin interfaceISupportsUndeclaredExtensions
-
getUndeclaredExtensionsByUrl
public List<ExtensionDt> getUndeclaredExtensionsByUrl(String theUrl)
Description copied from interface:ISupportsUndeclaredExtensionsReturns an immutable list containing all undeclared extensions (modifier and non-modifier) by extension URL- Specified by:
getUndeclaredExtensionsByUrlin interfaceISupportsUndeclaredExtensions- See Also:
To return a mutable list which may be used to remove extensions
-
getUndeclaredModifierExtensions
public List<ExtensionDt> getUndeclaredModifierExtensions()
Description copied from interface:ISupportsUndeclaredExtensionsReturns a list containing all undeclared modifier extensions. The returned list is mutable, so it may be modified (e.g. to add or remove an extension).- Specified by:
getUndeclaredModifierExtensionsin interfaceISupportsUndeclaredExtensions
-
hasFormatComment
public boolean hasFormatComment()
Description copied from interface:IBaseReturnstrueif any comments would be returned byIBase.getFormatCommentsPre()orIBase.getFormatCommentsPost()- Specified by:
hasFormatCommentin interfaceIBase
-
getUserData
public Object getUserData(String name)
Description copied from interface:IBaseRetrieves any user suplied data in this element- Specified by:
getUserDatain interfaceIBase
-
setUserData
public void setUserData(String name, Object value)
Description copied from interface:IBaseSets a user supplied data value in this element- Specified by:
setUserDatain interfaceIBase
-
isBaseEmpty
protected boolean isBaseEmpty()
Intended to be called by extending classesIBase.isEmpty()implementations, returnstrueif all content in this superclass instance is empty per the semantics ofIBase.isEmpty().
-
-