
Package org.hl7.fhir.r5.model
Class Base64BinaryType
java.lang.Object
org.hl7.fhir.r5.model.Base
org.hl7.fhir.r5.model.Element
org.hl7.fhir.r5.model.DataType
org.hl7.fhir.r5.model.PrimitiveType<byte[]>
org.hl7.fhir.r5.model.Base64BinaryType
- All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement,Externalizable,Serializable,org.hl7.fhir.instance.model.api.IBase,org.hl7.fhir.instance.model.api.IBaseDatatype,org.hl7.fhir.instance.model.api.IBaseElement,org.hl7.fhir.instance.model.api.IBaseHasExtensions,org.hl7.fhir.instance.model.api.IPrimitiveType<byte[]>
public class Base64BinaryType
extends PrimitiveType<byte[]>
implements org.hl7.fhir.instance.model.api.IPrimitiveType<byte[]>, org.hl7.fhir.instance.model.api.IBaseHasExtensions, ca.uhn.fhir.model.api.IElement, Externalizable
Primitive type "base64Binary" in FHIR: a sequence of bytes represented in base64
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hl7.fhir.r5.model.Base
Base.ProfileSource, Base.ValidationInfo, Base.ValidationMode, Base.ValidationReason -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorBase64BinaryType(byte[] theBytes) Base64BinaryType(String theValue) -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckValidBase64(String toCheck) Checks if the passed in String is a validBase64encoded String.copy()protected Stringencode(byte[] theValue) Subclasses must override to convert a "coerced" value into an encoded one.fhirType()byte[]getValue()booleanhasValue()booleanisEmpty()protected byte[]Subclasses must override to convert an encoded representation of this datatype into a "coerced" onevoidsetValue(byte[] theValue) voidsetValueAsString(String theValue) protected DataTypevoidMethods inherited from class org.hl7.fhir.r5.model.PrimitiveType
asStringValue, canHavePrimitiveValue, equalsDeep, equalsShallow, forceStringValue, fpValue, fromStringValue, getProperty, getTypesForProperty, hashCode, hasPrimitiveValue, isPrimitive, makeProperty, matches, removeChild, setProperty, setProperty, toString, updateStringValueMethods inherited from class org.hl7.fhir.r5.model.DataType
copyValues, getTranslation, isTranslatableMethods inherited from class org.hl7.fhir.r5.model.Element
addChild, addExtension, addExtension, addExtension, copyExtensions, copyNewExtensions, copyValues, getExtension, getExtensionByUrl, getExtensionByUrl, getExtensionFirstRep, getExtensionsByUrl, getExtensionsByUrl, getExtensionString, getExtensionString, getExtensionValue, getFHIRPublicationVersion, getId, getIdBase, getIdElement, getNamedProperty, getStandardsStatus, hasExtension, hasExtension, hasExtension, hasExtension, hasId, hasIdElement, isDisallowExtensions, listChildren, noExtensions, removeExtension, setDisallowExtensions, setExtension, setId, setIdBase, setIdElement, setStandardsStatusMethods inherited from class org.hl7.fhir.r5.model.Base
addDefinition, addFormatCommentsPost, addFormatCommentsPre, addValidationMessage, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, copyFormatComments, copyUserData, copyValues, dateTimeValue, equals, executeFunction, getChildByName, getChildValueByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, getValidationInfo, getValidationMessages, getXhtml, hasFormatComment, hasFormatCommentPost, hasFormatCommentPre, hasType, hasUserData, hasValidated, hasValidationInfo, hasValidationMessages, isBooleanPrimitive, isCopyUserData, isDateTime, isMetadataBased, isResource, listChildrenByName, listChildrenByName, setCopyUserData, setUserData, setUserDataINN, setXhtmlMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hl7.fhir.instance.model.api.IBase
getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserDataMethods inherited from interface org.hl7.fhir.instance.model.api.IBaseElement
getUserData, setUserDataMethods inherited from interface org.hl7.fhir.instance.model.api.IBaseHasExtensions
addExtension, getExtension, hasExtension
-
Constructor Details
-
Base64BinaryType
public Base64BinaryType()Constructor -
Base64BinaryType
-
Base64BinaryType
-
-
Method Details
-
parse
Description copied from class:PrimitiveTypeSubclasses must override to convert an encoded representation of this datatype into a "coerced" one- Specified by:
parsein classPrimitiveType<byte[]>- Parameters:
theValue- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
encode
Description copied from class:PrimitiveTypeSubclasses must override to convert a "coerced" value into an encoded one.- Specified by:
encodein classPrimitiveType<byte[]>- Parameters:
theValue- Will not be null- Returns:
- May return null if the value does not correspond to anything
-
copy
- Specified by:
copyin classPrimitiveType<byte[]>
-
typedCopy
- Overrides:
typedCopyin classPrimitiveType<byte[]>
-
fhirType
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classPrimitiveType<byte[]>- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classPrimitiveType<byte[]>- Throws:
IOExceptionClassNotFoundException
-
getValueAsString
- Specified by:
getValueAsStringin interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<byte[]>- Overrides:
getValueAsStringin classPrimitiveType<byte[]>
-
setValueAsString
- Specified by:
setValueAsStringin interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<byte[]>- Overrides:
setValueAsStringin classPrimitiveType<byte[]>- Throws:
IllegalArgumentException
-
getValue
- Specified by:
getValuein interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<byte[]>- Overrides:
getValuein classPrimitiveType<byte[]>
-
setValue
- Specified by:
setValuein interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<byte[]>- Overrides:
setValuein classPrimitiveType<byte[]>- Throws:
IllegalArgumentException
-
hasValue
- Specified by:
hasValuein interfaceorg.hl7.fhir.instance.model.api.IPrimitiveType<byte[]>- Overrides:
hasValuein classPrimitiveType<byte[]>
-
isEmpty
- Specified by:
isEmptyin interfaceorg.hl7.fhir.instance.model.api.IBase- Overrides:
isEmptyin classPrimitiveType<byte[]>
-
primitiveValue
- Overrides:
primitiveValuein classPrimitiveType<byte[]>- Returns:
- the primitive value if there is one, as a string irrespective of the actual type (e.g. dates converted to their FHIR string representation) return null if the value is not a primitive or there is no value (might be extensions instead)
-
checkValidBase64
Checks if the passed in String is a validBase64encoded String. Will throw aDataFormatExceptionif not formatted correctly.- Parameters:
toCheck-Stringto check if validBase64- Throws:
DataFormatException
-