Class Binary
- java.lang.Object
-
- org.linuxforhealth.fhir.model.visitor.AbstractVisitable
-
- org.linuxforhealth.fhir.model.resource.Resource
-
- org.linuxforhealth.fhir.model.resource.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)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Binary.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(java.lang.String elementName, int elementIndex, Visitor visitor)
Accept a Visitor and invoke the appropriate visit methods.static Binary.Builder
builder()
boolean
equals(java.lang.Object obj)
Code
getContentType()
MimeType of the binary content represented as a standard MimeType (BCP 13).Base64Binary
getData()
The actual content, base64 encoded.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.boolean
hasChildren()
int
hashCode()
Binary.Builder
toBuilder()
Create a new Builder from the contents of this Resource-
Methods inherited from class org.linuxforhealth.fhir.model.resource.Resource
as, getId, getImplicitRules, getLanguage, getMeta, is
-
-
-
-
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.
-
hasChildren
public boolean hasChildren()
- Overrides:
hasChildren
in classResource
-
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 interfaceVisitable
- Specified by:
accept
in classAbstractVisitable
- Parameters:
elementName
- the name of the element in the context of this visitelementIndex
- the index of the element in a list or -1 if it is not contained within a Listvisitor
- the visitor to use
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toBuilder
public Binary.Builder toBuilder()
Description copied from class:Resource
Create a new Builder from the contents of this Resource
-
builder
public static Binary.Builder builder()
-
-