Package org.hl7.fhir.dstu2.model
Class Binary
- java.lang.Object
-
- org.hl7.fhir.dstu2.model.Base
-
- org.hl7.fhir.dstu2.model.BaseResource
-
- org.hl7.fhir.dstu2.model.Resource
-
- org.hl7.fhir.dstu2.model.BaseBinary
-
- org.hl7.fhir.dstu2.model.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 binary resource can contain any content, whether text, image, pdf, zip archive, etc.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected Base64BinaryTypecontentThe actual content, base64 encoded.protected CodeTypecontentTypeMimeType of the binary content represented as a standard MimeType (BCP 13).static StringSP_CONTENTTYPE-
Fields inherited from class org.hl7.fhir.dstu2.model.Resource
id, implicitRules, language, meta
-
-
Constructor Summary
Constructors Constructor Description Binary()Binary(CodeType contentType, Base64BinaryType content)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BaseaddChild(String name)Binarycopy()booleanequalsDeep(Base other)booleanequalsShallow(Base other)StringfhirType()byte[]getContent()Base64BinaryTypegetContentElement()StringgetContentType()CodeTypegetContentTypeElement()ResourceTypegetResourceType()booleanhasContent()booleanhasContentElement()booleanhasContentType()booleanhasContentTypeElement()booleanisEmpty()protected voidlistChildren(List<Property> childrenList)BinarysetContent(byte[] value)BinarysetContentElement(Base64BinaryType value)BinarysetContentType(String value)BinarysetContentTypeElement(CodeType value)voidsetProperty(String name, Base value)protected BinarytypedCopy()-
Methods inherited from class org.hl7.fhir.dstu2.model.BaseBinary
getContentAsBase64, setContentAsBase64
-
Methods inherited from class org.hl7.fhir.dstu2.model.Resource
copyValues, getId, getIdElement, getImplicitRules, getImplicitRulesElement, getLanguage, getLanguageElement, getMeta, hasId, hasIdElement, hasImplicitRules, hasImplicitRulesElement, hasLanguage, hasLanguageElement, hasMeta, setId, setIdElement, setImplicitRules, setImplicitRulesElement, setLanguage, setLanguageElement, setMeta
-
Methods inherited from class org.hl7.fhir.dstu2.model.BaseResource
getStructureFhirVersionEnum, setId
-
Methods inherited from class org.hl7.fhir.dstu2.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactPoint, castToDate, castToDateTime, castToDecimal, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToMoney, castToNarrative, castToOid, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToUnsignedInt, castToUri, children, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isMetadataBased, isPrimitive, listChildrenByName, primitiveValue, setUserData, setUserDataINN
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IAnyResource
getUserData, setUserData
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, hasFormatComment
-
-
-
-
Field Detail
-
contentType
protected CodeType contentType
MimeType of the binary content represented as a standard MimeType (BCP 13).
-
content
protected Base64BinaryType content
The actual content, base64 encoded.
-
SP_CONTENTTYPE
public static final String SP_CONTENTTYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Binary
public Binary()
-
Binary
public Binary(CodeType contentType, Base64BinaryType content)
-
-
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
-
hasContentTypeElement
public boolean hasContentTypeElement()
-
hasContentType
public boolean hasContentType()
-
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:
getContentTypein interfaceorg.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:
setContentTypein interfaceorg.hl7.fhir.instance.model.api.IBaseBinary- Parameters:
value- MimeType of the binary content represented as a standard MimeType (BCP 13).
-
getContentElement
public Base64BinaryType getContentElement()
- Specified by:
getContentElementin interfaceorg.hl7.fhir.instance.model.api.IBaseBinary- Specified by:
getContentElementin classBaseBinary- Returns:
content(The actual content, base64 encoded.). This is the underlying object with id, value and extensions. The accessor "getContent" gives direct access to the value
-
hasContentElement
public boolean hasContentElement()
-
hasContent
public boolean hasContent()
-
setContentElement
public Binary setContentElement(Base64BinaryType value)
- Parameters:
value-content(The actual content, base64 encoded.). This is the underlying object with id, value and extensions. The accessor "getContent" gives direct access to the value
-
getContent
public byte[] getContent()
- Specified by:
getContentin interfaceorg.hl7.fhir.instance.model.api.IBaseBinary- Returns:
- The actual content, base64 encoded.
-
setContent
public Binary setContent(byte[] value)
- Specified by:
setContentin interfaceorg.hl7.fhir.instance.model.api.IBaseBinary- Parameters:
value- The actual content, base64 encoded.
-
listChildren
protected void listChildren(List<Property> childrenList)
- Overrides:
listChildrenin classResource
-
setProperty
public void setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
equalsDeep
public boolean equalsDeep(Base other)
- Overrides:
equalsDeepin classResource
-
equalsShallow
public boolean equalsShallow(Base other)
- Overrides:
equalsShallowin classResource
-
isEmpty
public boolean isEmpty()
-
getResourceType
public ResourceType getResourceType()
- Specified by:
getResourceTypein classResource
-
-