Class Binary
- java.lang.Object
-
- ca.uhn.fhir.model.api.BaseElement
-
- ca.uhn.fhir.model.dstu2.resource.BaseResource
-
- ca.uhn.fhir.model.dstu2.resource.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 Summary
Fields Modifier and Type Field Description static ca.uhn.fhir.rest.gclient.TokenClientParamCONTENTTYPEFluent Client search parameter constant for contenttypestatic StringSP_CONTENTTYPESearch parameter constant for contenttype-
Fields inherited from class ca.uhn.fhir.model.dstu2.resource.BaseResource
RES_ID, SP_RES_ID, SP_RES_LANGUAGE
-
-
Constructor Summary
Constructors Constructor Description Binary()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends ca.uhn.fhir.model.api.IElement>
List<T>getAllPopulatedChildElementsOfType(Class<T> theType)byte[]getContent()Gets the value(s) for content ().StringgetContentAsBase64()ca.uhn.fhir.model.primitive.Base64BinaryDtgetContentElement()Gets the value(s) for content ().StringgetContentType()Gets the value(s) for contentType ().ca.uhn.fhir.model.primitive.CodeDtgetContentTypeElement()Gets the value(s) for contentType ().StringgetResourceName()ca.uhn.fhir.context.FhirVersionEnumgetStructureFhirVersionEnum()booleanhasData()booleanisEmpty()BinarysetContent(byte[] theBytes)Sets the value for content ()BinarysetContent(ca.uhn.fhir.model.primitive.Base64BinaryDt theValue)Sets the value(s) for content ()BinarysetContentAsBase64(String theContent)BinarysetContentType(ca.uhn.fhir.model.primitive.CodeDt theValue)Sets the value(s) for contentType ()BinarysetContentType(String theCode)Sets the value for contentType ()-
Methods inherited from class ca.uhn.fhir.model.dstu2.resource.BaseResource
getContained, getId, getIdElement, getLanguage, getMeta, getResourceMetadata, getText, isBaseEmpty, setContained, setId, setId, setId, setLanguage, setResourceMetadata, setText, toString
-
Methods inherited from class ca.uhn.fhir.model.api.BaseElement
addUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, getUserData, hasFormatComment, setUserData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
fhirType, getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserData
-
-
-
-
Field Detail
-
SP_CONTENTTYPE
public static final String SP_CONTENTTYPE
Search parameter constant for contenttypeDescription:
Type: token
Path: Binary.contentType
- See Also:
- Constant Field Values
-
CONTENTTYPE
public static final ca.uhn.fhir.rest.gclient.TokenClientParam CONTENTTYPE
Fluent Client search parameter constant for contenttypeDescription:
Type: token
Path: Binary.contentType
-
-
Constructor Detail
-
Binary
public Binary()
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.hl7.fhir.instance.model.api.IBase
-
getAllPopulatedChildElementsOfType
public <T extends ca.uhn.fhir.model.api.IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType)
- Specified by:
getAllPopulatedChildElementsOfTypein interfaceca.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 returnnull.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 returnnull.Definition: MimeType of the binary content represented as a standard MimeType (BCP 13)
- Specified by:
getContentTypein interfaceorg.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:
setContentTypein interfaceorg.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 returnnull.Definition: The actual content, base64 encoded
- Specified by:
getContentElementin interfaceorg.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 returnnull.Definition: The actual content, base64 encoded
- Specified by:
getContentin interfaceorg.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:
setContentin interfaceorg.hl7.fhir.instance.model.api.IBaseBinary
-
getResourceName
public String getResourceName()
- Specified by:
getResourceNamein interfaceca.uhn.fhir.model.api.IResource
-
getStructureFhirVersionEnum
public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum()
- Specified by:
getStructureFhirVersionEnumin interfaceorg.hl7.fhir.instance.model.api.IBaseResource- Specified by:
getStructureFhirVersionEnumin interfaceca.uhn.fhir.model.api.IResource
-
getContentAsBase64
public String getContentAsBase64()
- Specified by:
getContentAsBase64in interfaceorg.hl7.fhir.instance.model.api.IBaseBinary
-
setContentAsBase64
public Binary setContentAsBase64(String theContent)
- Specified by:
setContentAsBase64in interfaceorg.hl7.fhir.instance.model.api.IBaseBinary
-
hasData
public boolean hasData()
- Specified by:
hasDatain interfaceorg.hl7.fhir.instance.model.api.IBaseBinary
-
-