
Package org.hl7.fhir.dstu3.model
Class ExtensionHelper
- java.lang.Object
-
- org.hl7.fhir.dstu3.model.ExtensionHelper
-
public class ExtensionHelper extends Object
in a language with helper classes, this would be a helper class (at least, the base exgtension helpers would be)- Author:
- Grahame
-
-
Constructor Summary
Constructors Constructor Description ExtensionHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
ExtensionHelper
public ExtensionHelper()
-
-
Method Detail
-
hasExtension
public static boolean hasExtension(Element element, String name)
- 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
public static boolean hasExtension(BackboneElement element, String name)
- Parameters:
name
- the identity of the extension of interest- Returns:
- true if the named extension is on this element. Will check modifier extensions
-
getExtension
public static Extension getExtension(Element element, String name)
- 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
public static Extension getExtension(DomainResource resource, String name)
- 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
public static Extension getExtension(BackboneElement element, String name)
- 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
public static boolean hasExtensions(Element element)
-
-