Package ca.uhn.fhir.util
Class AttachmentUtil
java.lang.Object
ca.uhn.fhir.util.AttachmentUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic IPrimitiveType
<CodeDt> getOrCreateContentType
(FhirContext theContext, ICompositeType theAttachment) static IPrimitiveType
<byte[]> getOrCreateData
(FhirContext theContext, ICompositeType theAttachment) Fetches the base64Binary value of Attachment.data, creating it if it does not already exist.static IPrimitiveType
<String> getOrCreateUrl
(FhirContext theContext, ICompositeType theAttachment) static ICompositeType
newInstance
(FhirContext theFhirCtx) static void
setContentType
(FhirContext theContext, ICompositeType theAttachment, String theContentType) static void
setData
(FhirContext theContext, ICompositeType theAttachment, byte[] theBytes) static void
setSize
(FhirContext theContext, ICompositeType theAttachment, Integer theLength) static void
setUrl
(FhirContext theContext, ICompositeType theAttachment, String theUrl)
-
Constructor Details
-
AttachmentUtil
public AttachmentUtil()
-
-
Method Details
-
getOrCreateData
public static IPrimitiveType<byte[]> getOrCreateData(FhirContext theContext, ICompositeType theAttachment) Fetches the base64Binary value of Attachment.data, creating it if it does not already exist. -
getOrCreateContentType
public static IPrimitiveType<CodeDt> getOrCreateContentType(FhirContext theContext, ICompositeType theAttachment) -
getOrCreateUrl
public static IPrimitiveType<String> getOrCreateUrl(FhirContext theContext, ICompositeType theAttachment) -
setUrl
-
setContentType
public static void setContentType(FhirContext theContext, ICompositeType theAttachment, String theContentType) -
setData
-
setSize
-
newInstance
-