Package org.hl7.fhir.r4.model
Class ExtensionHelper
java.lang.Object
org.hl7.fhir.r4.model.ExtensionHelper
in a language with helper classes, this would be a helper class (at least,
the base exgtension helpers would be)
- Author:
- Grahame
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Extension
getExtension
(BackboneElement element, String name) static Extension
getExtension
(DomainResource resource, String name) static Extension
getExtension
(Element element, String name) static boolean
hasExtension
(BackboneElement element, String name) static boolean
hasExtension
(Element element, String name) static boolean
hasExtensions
(Element element) static void
setExtension
(Element element, boolean modifier, String uri, Type value) set the value of an extension on the element.
-
Constructor Details
-
ExtensionHelper
public ExtensionHelper()
-
-
Method Details
-
hasExtension
- Parameters:
name
- the identity of the extension of interest- Returns:
- true if the named extension is on this element. Will check modifier extensions too if appropriate
-
hasExtension
- Parameters:
name
- the identity of the extension of interest- Returns:
- true if the named extension is on this element. Will check modifier extensions
-
getExtension
- Parameters:
name
- the identity of the extension of interest- Returns:
- The extension, if on this element, else null. will check modifier extensions too, if appropriate
-
getExtension
- Parameters:
name
- the identity of the extension of interest- Returns:
- The extension, if on this element, else null. will check modifier extensions too, if appropriate
-
getExtension
- Parameters:
name
- the identity of the extension of interest- Returns:
- The extension, if on this element, else null. will check modifier extensions too
-
setExtension
public static void setExtension(Element element, boolean modifier, String uri, Type value) throws org.hl7.fhir.exceptions.FHIRException set the value of an extension on the element. if value == null, make sure it doesn't exist- Parameters:
element
- - the element to act on. Can also be a backbone elementmodifier
- - whether this is a modifier. Note that this is a definitional property of the extension; don't alternateuri
- - the identifier for the extensionvalue
- - the value of the extension. Delete if this is null- Throws:
Exception
- - if the modifier logic is incorrectorg.hl7.fhir.exceptions.FHIRException
-
hasExtensions
-