
Class ExtensionDt
- All Implemented Interfaces:
ICompositeDatatype,ICompositeElement,IDatatype,IElement,IIdentifiableElement,ISupportsUndeclaredExtensions,Serializable,IBase,IBaseDatatype,IBaseExtension<ExtensionDt,,IDatatype> ICompositeType
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExtensionDt(boolean theIsModifier) ExtensionDt(boolean theIsModifier, String theUrl) ExtensionDt(boolean theIsModifier, String theUrl, IBaseDatatype theValue) -
Method Summary
Modifier and TypeMethodDescriptiongetAllPopulatedChildElementsOfType(Class<T> theType) Deprecated.getUrl()Returns the URL for this extension.Retained for backward compatibilitygetValue()Returns the value of this extension, if one exists.Returns the value of this extension, casted to a primitive datatype.booleanisEmpty()booleanvoidsetModifier(boolean theModifier) setValue(IBaseDatatype theValue) toString()Methods inherited from class ca.uhn.fhir.model.api.BaseIdentifiableElement
getElementSpecificId, getId, setElementSpecificId, setId, setIdMethods inherited from class ca.uhn.fhir.model.api.BaseElement
addUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, getUserData, hasFormatComment, isBaseEmpty, setUserDataMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hl7.fhir.instance.model.api.IBase
fhirType, getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserData
-
Constructor Details
-
ExtensionDt
public ExtensionDt() -
ExtensionDt
-
ExtensionDt
-
ExtensionDt
-
-
Method Details
-
getUrl
Returns the URL for this extension.Note that before HAPI 0.9 this method returned a
StringDtbut as of HAPI 0.9 this method returns a plain string. This was changed because it does not make sense to use a StringDt here since the URL itself can not contain extensions and it was therefore misleading.- Specified by:
getUrlin interfaceIBaseExtension<ExtensionDt,IDatatype>
-
getUrlAsString
Retained for backward compatibility- See Also:
-
getValue
Returns the value of this extension, if one exists.Note that if this extension contains extensions (instead of a datatype) then this method will return null. In that case, you must use
BaseElement.getUndeclaredExtensions()andBaseElement.getUndeclaredModifierExtensions()to retrieve the child extensions.- Specified by:
getValuein interfaceIBaseExtension<ExtensionDt,IDatatype>
-
getValueAsPrimitive
Returns the value of this extension, casted to a primitive datatype. This is a convenience method which should only be called if you are sure that the value for this particular extension will be a primitive.Note that if this extension contains extensions (instead of a datatype) then this method will return null. In that case, you must use
BaseElement.getUndeclaredExtensions()andBaseElement.getUndeclaredModifierExtensions()to retrieve the child extensions.- Throws:
ClassCastException- If the value of this extension is not a primitive datatype
-
isEmpty
-
isModifier
-
setModifier
-
setUrl
- Specified by:
setUrlin interfaceIBaseExtension<ExtensionDt,IDatatype>
-
setUrl
-
setValue
- Specified by:
setValuein interfaceIBaseExtension<ExtensionDt,IDatatype>
-
getAllPopulatedChildElementsOfType
@Deprecated public <T extends IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType) Deprecated.Description copied from interface:ICompositeElementReturns a list containing all child elements matching a given type- Specified by:
getAllPopulatedChildElementsOfTypein interfaceICompositeElement- Parameters:
theType- The type to match. If set to null, all child elements will be returned
-
getExtension
- Specified by:
getExtensionin interfaceIBaseExtension<ExtensionDt,IDatatype>
-
toString
-