Class Attachment

All Implemented Interfaces:
ca.uhn.fhir.model.api.IElement, 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.ICompositeType

public class Attachment extends Type implements org.hl7.fhir.instance.model.api.ICompositeType
For referring to data content defined in other formats.
See Also:
Serialized Form
  • Field Details

    • contentType

      protected CodeType contentType
      Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.
    • language

      protected CodeType language
      The human language of the content. The value can be any valid value according to BCP 47.
    • data

      The actual data of the attachment - a sequence of bytes. In XML, represented using base64.
    • url

      protected UriType url
      An alternative location where the data can be accessed.
    • size

      protected UnsignedIntType size
      The number of bytes of data that make up this attachment (before base64 encoding, if that is done).
    • hash

      The calculated hash of the data using SHA-1. Represented using base64.
    • title

      protected StringType title
      A label or set of text to display in place of the data.
    • creation

      The date that the attachment was first created.
  • Constructor Details

  • Method Details

    • getContentTypeElement

      Returns:
      contentType (Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.). 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

      Parameters:
      value - contentType (Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.). This is the underlying object with id, value and extensions. The accessor "getContentType" gives direct access to the value
    • getContentType

      Returns:
      Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.
    • setContentType

      public Attachment setContentType(String value)
      Parameters:
      value - Identifies the type of the data in the attachment and allows a method to be chosen to interpret or render the data. Includes mime type parameters such as charset where appropriate.
    • getLanguageElement

      Returns:
      language (The human language of the content. The value can be any valid value according to BCP 47.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
    • hasLanguageElement

      public boolean hasLanguageElement()
    • hasLanguage

      public boolean hasLanguage()
    • setLanguageElement

      Parameters:
      value - language (The human language of the content. The value can be any valid value according to BCP 47.). This is the underlying object with id, value and extensions. The accessor "getLanguage" gives direct access to the value
    • getLanguage

      public String getLanguage()
      Returns:
      The human language of the content. The value can be any valid value according to BCP 47.
    • setLanguage

      public Attachment setLanguage(String value)
      Parameters:
      value - The human language of the content. The value can be any valid value according to BCP 47.
    • getDataElement

      Returns:
      data (The actual data of the attachment - a sequence of bytes. In XML, represented using base64.). This is the underlying object with id, value and extensions. The accessor "getData" gives direct access to the value
    • hasDataElement

      public boolean hasDataElement()
    • hasData

      public boolean hasData()
    • setDataElement

      Parameters:
      value - data (The actual data of the attachment - a sequence of bytes. In XML, represented using base64.). This is the underlying object with id, value and extensions. The accessor "getData" gives direct access to the value
    • getData

      public byte[] getData()
      Returns:
      The actual data of the attachment - a sequence of bytes. In XML, represented using base64.
    • setData

      public Attachment setData(byte[] value)
      Parameters:
      value - The actual data of the attachment - a sequence of bytes. In XML, represented using base64.
    • getUrlElement

      Returns:
      url (An alternative location where the data can be accessed.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
    • hasUrlElement

      public boolean hasUrlElement()
    • hasUrl

      public boolean hasUrl()
    • setUrlElement

      public Attachment setUrlElement(UriType value)
      Parameters:
      value - url (An alternative location where the data can be accessed.). This is the underlying object with id, value and extensions. The accessor "getUrl" gives direct access to the value
    • getUrl

      public String getUrl()
      Returns:
      An alternative location where the data can be accessed.
    • setUrl

      public Attachment setUrl(String value)
      Parameters:
      value - An alternative location where the data can be accessed.
    • getSizeElement

      Returns:
      size (The number of bytes of data that make up this attachment (before base64 encoding, if that is done).). This is the underlying object with id, value and extensions. The accessor "getSize" gives direct access to the value
    • hasSizeElement

      public boolean hasSizeElement()
    • hasSize

      public boolean hasSize()
    • setSizeElement

      Parameters:
      value - size (The number of bytes of data that make up this attachment (before base64 encoding, if that is done).). This is the underlying object with id, value and extensions. The accessor "getSize" gives direct access to the value
    • getSize

      public int getSize()
      Returns:
      The number of bytes of data that make up this attachment (before base64 encoding, if that is done).
    • setSize

      public Attachment setSize(int value)
      Parameters:
      value - The number of bytes of data that make up this attachment (before base64 encoding, if that is done).
    • getHashElement

      Returns:
      hash (The calculated hash of the data using SHA-1. Represented using base64.). This is the underlying object with id, value and extensions. The accessor "getHash" gives direct access to the value
    • hasHashElement

      public boolean hasHashElement()
    • hasHash

      public boolean hasHash()
    • setHashElement

      Parameters:
      value - hash (The calculated hash of the data using SHA-1. Represented using base64.). This is the underlying object with id, value and extensions. The accessor "getHash" gives direct access to the value
    • getHash

      public byte[] getHash()
      Returns:
      The calculated hash of the data using SHA-1. Represented using base64.
    • setHash

      public Attachment setHash(byte[] value)
      Parameters:
      value - The calculated hash of the data using SHA-1. Represented using base64.
    • getTitleElement

      Returns:
      title (A label or set of text to display in place of the data.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
    • hasTitleElement

      public boolean hasTitleElement()
    • hasTitle

      public boolean hasTitle()
    • setTitleElement

      Parameters:
      value - title (A label or set of text to display in place of the data.). This is the underlying object with id, value and extensions. The accessor "getTitle" gives direct access to the value
    • getTitle

      public String getTitle()
      Returns:
      A label or set of text to display in place of the data.
    • setTitle

      public Attachment setTitle(String value)
      Parameters:
      value - A label or set of text to display in place of the data.
    • getCreationElement

      Returns:
      creation (The date that the attachment was first created.). This is the underlying object with id, value and extensions. The accessor "getCreation" gives direct access to the value
    • hasCreationElement

      public boolean hasCreationElement()
    • hasCreation

      public boolean hasCreation()
    • setCreationElement

      Parameters:
      value - creation (The date that the attachment was first created.). This is the underlying object with id, value and extensions. The accessor "getCreation" gives direct access to the value
    • getCreation

      public Date getCreation()
      Returns:
      The date that the attachment was first created.
    • setCreation

      public Attachment setCreation(Date value)
      Parameters:
      value - The date that the attachment was first created.
    • listChildren

      protected void listChildren(List<Property> children)
      Overrides:
      listChildren in class Element
    • getNamedProperty

      public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getNamedProperty in class Element
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • getProperty

      public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getProperty in class Element
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • setProperty

      public Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      setProperty in class Element
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • setProperty

      public Base setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      setProperty in class Element
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • makeProperty

      public Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      makeProperty in class Element
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • getTypesForProperty

      public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      getTypesForProperty in class Element
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • addChild

      public Base addChild(String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      addChild in class Element
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • fhirType

      public String fhirType()
      Specified by:
      fhirType in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      fhirType in class Element
    • copy

      public Attachment copy()
      Overrides:
      copy in class Type
    • typedCopy

      protected Attachment typedCopy()
      Specified by:
      typedCopy in class Type
    • equalsDeep

      public boolean equalsDeep(Base other_)
      Overrides:
      equalsDeep in class Element
    • equalsShallow

      public boolean equalsShallow(Base other_)
      Overrides:
      equalsShallow in class Element
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface org.hl7.fhir.instance.model.api.IBase
      Overrides:
      isEmpty in class Element