Class Binary

  • All Implemented Interfaces:
    ca.uhn.fhir.model.api.ICompositeElement, ca.uhn.fhir.model.api.IElement, ca.uhn.fhir.model.api.IResource, ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions, Serializable, org.hl7.fhir.instance.model.api.IBase, org.hl7.fhir.instance.model.api.IBaseBinary, org.hl7.fhir.instance.model.api.IBaseResource

    public class Binary
    extends BaseResource
    implements ca.uhn.fhir.model.api.IResource, org.hl7.fhir.instance.model.api.IBaseBinary
    HAPI/FHIR Binary Resource ()

    Definition: A binary resource can contain any content, whether text, image, pdf, zip archive, etc.

    Requirements: There are situations where it is useful or required to handle pure binary content using the same framework as other resources

    Profile Definition: http://hl7.org/fhir/profiles/Binary

    See Also:
    Serialized Form
    • Field Detail

      • CONTENTTYPE

        public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTENTTYPE
        Fluent Client search parameter constant for contenttype

        Description:
        Type: token
        Path: Binary.contentType

    • Constructor Detail

    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.hl7.fhir.instance.model.api.IBase
      • getAllPopulatedChildElementsOfType

        public <T extends ca.uhn.fhir.model.api.IElement> List<T> getAllPopulatedChildElementsOfType​(Class<T> theType)
        Specified by:
        getAllPopulatedChildElementsOfType in interface ca.uhn.fhir.model.api.ICompositeElement
      • getContentTypeElement

        public ca.uhn.fhir.model.primitive.CodeDt getContentTypeElement()
        Gets the value(s) for contentType (). creating it if it does not exist. Will not return null.

        Definition: MimeType of the binary content represented as a standard MimeType (BCP 13)

      • getContentType

        public String getContentType()
        Gets the value(s) for contentType (). creating it if it does not exist. This method may return null.

        Definition: MimeType of the binary content represented as a standard MimeType (BCP 13)

        Specified by:
        getContentType in interface org.hl7.fhir.instance.model.api.IBaseBinary
      • setContentType

        public Binary setContentType​(ca.uhn.fhir.model.primitive.CodeDt theValue)
        Sets the value(s) for contentType ()

        Definition: MimeType of the binary content represented as a standard MimeType (BCP 13)

      • setContentType

        public Binary setContentType​(String theCode)
        Sets the value for contentType ()

        Definition: MimeType of the binary content represented as a standard MimeType (BCP 13)

        Specified by:
        setContentType in interface org.hl7.fhir.instance.model.api.IBaseBinary
      • getContentElement

        public ca.uhn.fhir.model.primitive.Base64BinaryDt getContentElement()
        Gets the value(s) for content (). creating it if it does not exist. Will not return null.

        Definition: The actual content, base64 encoded

        Specified by:
        getContentElement in interface org.hl7.fhir.instance.model.api.IBaseBinary
      • getContent

        public byte[] getContent()
        Gets the value(s) for content (). creating it if it does not exist. This method may return null.

        Definition: The actual content, base64 encoded

        Specified by:
        getContent in interface org.hl7.fhir.instance.model.api.IBaseBinary
      • setContent

        public Binary setContent​(ca.uhn.fhir.model.primitive.Base64BinaryDt theValue)
        Sets the value(s) for content ()

        Definition: The actual content, base64 encoded

      • setContent

        public Binary setContent​(byte[] theBytes)
        Sets the value for content ()

        Definition: The actual content, base64 encoded

        Specified by:
        setContent in interface org.hl7.fhir.instance.model.api.IBaseBinary
      • getResourceName

        public String getResourceName()
        Specified by:
        getResourceName in interface ca.uhn.fhir.model.api.IResource
      • getStructureFhirVersionEnum

        public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum()
        Specified by:
        getStructureFhirVersionEnum in interface org.hl7.fhir.instance.model.api.IBaseResource
        Specified by:
        getStructureFhirVersionEnum in interface ca.uhn.fhir.model.api.IResource
      • getContentAsBase64

        public String getContentAsBase64()
        Specified by:
        getContentAsBase64 in interface org.hl7.fhir.instance.model.api.IBaseBinary
      • setContentAsBase64

        public Binary setContentAsBase64​(String theContent)
        Specified by:
        setContentAsBase64 in interface org.hl7.fhir.instance.model.api.IBaseBinary
      • hasData

        public boolean hasData()
        Specified by:
        hasData in interface org.hl7.fhir.instance.model.api.IBaseBinary