Class Binary

  • All Implemented Interfaces:
    ca.uhn.fhir.model.api.IElement, Serializable, org.hl7.fhir.instance.model.api.IAnyResource, 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 BaseBinary
    implements org.hl7.fhir.instance.model.api.IBaseBinary
    A resource that represents the data of a single raw artifact as digital content accessible in its native format. A Binary resource can contain any content, whether text, image, pdf, zip archive, etc.
    See Also:
    Serialized Form
    • Field Detail

      • contentType

        protected CodeType contentType
        MimeType of the binary content represented as a standard MimeType (BCP 13).
      • securityContext

        protected Reference securityContext
        This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.
      • securityContextTarget

        protected Resource securityContextTarget
        The actual object that is the target of the reference (This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.)
    • Constructor Detail

      • Binary

        public Binary()
        Constructor
    • Method Detail

      • getContentTypeElement

        public CodeType getContentTypeElement()
        Returns:
        contentType (MimeType of the binary content represented as a standard MimeType (BCP 13).). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
      • setContentTypeElement

        public Binary setContentTypeElement​(CodeType value)
        Parameters:
        value - contentType (MimeType of the binary content represented as a standard MimeType (BCP 13).). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
      • getContentType

        public String getContentType()
        Specified by:
        getContentType in interface org.hl7.fhir.instance.model.api.IBaseBinary
        Returns:
        MimeType of the binary content represented as a standard MimeType (BCP 13).
      • setContentType

        public Binary setContentType​(String value)
        Specified by:
        setContentType in interface org.hl7.fhir.instance.model.api.IBaseBinary
        Parameters:
        value - MimeType of the binary content represented as a standard MimeType (BCP 13).
      • getSecurityContext

        public Reference getSecurityContext()
        Returns:
        securityContext (This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.)
      • setSecurityContext

        public Binary setSecurityContext​(Reference value)
        Parameters:
        value - securityContext (This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.)
      • getSecurityContextTarget

        public Resource getSecurityContextTarget()
        Returns:
        securityContext The actual object that is the target of the reference. The reference library doesn't populate this, but you can use it to hold the resource if you resolve it. (This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.)
      • setSecurityContextTarget

        public Binary setSecurityContextTarget​(Resource value)
        Parameters:
        value - securityContext The actual object that is the target of the reference. The reference library doesn't use these, but you can use it to hold the resource if you resolve it. (This element identifies another resource that can be used as a proxy of the security sensitivity to use when deciding and enforcing access control rules for the Binary resource. Given that the Binary resource contains very few elements that can be used to determine the sensitivity of the data and relationships to individuals, the referenced resource stands in as a proxy equivalent for this purpose. This referenced resource may be related to the Binary (e.g. Media, DocumentReference), or may be some non-related Resource purely as a security proxy. E.g. to identify that the binary resource relates to a patient, and access should only be granted to applications that have access to the patient.)
      • getDataElement

        public Base64BinaryType getDataElement()
        Returns:
        data (The actual content, base64 encoded.). This is the underlying object with id, value and extensions. The accessor "getData" gives direct access to the value
      • hasData

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

        public Binary setDataElement​(Base64BinaryType value)
        Parameters:
        value - data (The actual content, base64 encoded.). This is the underlying object with id, value and extensions. The accessor "getData" gives direct access to the value
      • getData

        public byte[] getData()
        Returns:
        The actual content, base64 encoded.
      • setData

        public Binary setData​(byte[] value)
        Parameters:
        value - The actual content, base64 encoded.
      • getProperty

        public Base[] getProperty​(int hash,
                                  String name,
                                  boolean checkValid)
                           throws org.hl7.fhir.exceptions.FHIRException
        Overrides:
        getProperty in class Resource
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • addChild

        public Base addChild​(String name)
                      throws org.hl7.fhir.exceptions.FHIRException
        Overrides:
        addChild in class Resource
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • fhirType

        public String fhirType()
        Specified by:
        fhirType in interface org.hl7.fhir.instance.model.api.IBase
        Overrides:
        fhirType in class Resource
      • isEmpty

        public boolean isEmpty()
        Specified by:
        isEmpty in interface org.hl7.fhir.instance.model.api.IBase
        Overrides:
        isEmpty in class Resource
      • getContent

        public byte[] getContent()
        Specified by:
        getContent in interface org.hl7.fhir.instance.model.api.IBaseBinary
      • setContent

        public org.hl7.fhir.instance.model.api.IBaseBinary setContent​(byte[] arg0)
        Specified by:
        setContent in interface org.hl7.fhir.instance.model.api.IBaseBinary