Class Binary

  • All Implemented Interfaces:
    Visitable

    @Generated("org.linuxforhealth.fhir.tools.CodeGenerator")
    public class Binary
    extends Resource
    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.

    Maturity level: FMM5 (Normative)

    • Method Detail

      • getContentType

        public Code getContentType()
        MimeType of the binary content represented as a standard MimeType (BCP 13).
        Returns:
        An immutable object of type Code that is non-null.
      • getSecurityContext

        public Reference getSecurityContext()
        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.
        Returns:
        An immutable object of type Reference that may be null.
      • getData

        public Base64Binary getData()
        The actual content, base64 encoded.
        Returns:
        An immutable object of type Base64Binary that may be null.
      • accept

        public void accept​(java.lang.String elementName,
                           int elementIndex,
                           Visitor visitor)
        Description copied from interface: Visitable
        Accept a Visitor and invoke the appropriate visit methods. A typical implementation would look like this:
         if (visitor.preVisit(this)) {
             visitor.visitStart(elementName, elementIndex, this);
             if (visitor.visit(elementName, elementIndex, this)) {
                 // visit children
             }
             visitor.visitEnd(elementName, elementIndex, this);
             visitor.postVisit(this);
         }
         
        Specified by:
        accept in interface Visitable
        Specified by:
        accept in class AbstractVisitable
        Parameters:
        elementName - the name of the element in the context of this visit
        elementIndex - the index of the element in a list or -1 if it is not contained within a List
        visitor - the visitor to use
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object