Class Bundle

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.IBaseBundle, org.hl7.fhir.instance.model.api.IBaseResource

public class Bundle extends Resource implements org.hl7.fhir.instance.model.api.IBaseBundle
A container for a collection of resources.
See Also:
Serialized Form
  • Field Details

  • Constructor Details

  • Method Details

    • getTypeElement

      Returns:
      type (Indicates the purpose of this bundle- how it was intended to be used.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
    • hasTypeElement

      public boolean hasTypeElement()
    • hasType

      public boolean hasType()
    • setTypeElement

      Parameters:
      value - type (Indicates the purpose of this bundle- how it was intended to be used.). This is the underlying object with id, value and extensions. The accessor "getType" gives direct access to the value
    • getType

      Returns:
      Indicates the purpose of this bundle- how it was intended to be used.
    • setType

      public Bundle setType​(Bundle.BundleType value)
      Parameters:
      value - Indicates the purpose of this bundle- how it was intended to be used.
    • getTotalElement

      Returns:
      total (If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value
    • hasTotalElement

      public boolean hasTotalElement()
    • hasTotal

      public boolean hasTotal()
    • setTotalElement

      Parameters:
      value - total (If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).). This is the underlying object with id, value and extensions. The accessor "getTotal" gives direct access to the value
    • getTotal

      public int getTotal()
      Returns:
      If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).
    • setTotal

      public Bundle setTotal​(int value)
      Parameters:
      value - If a set of search matches, this is the total number of matches for the search (as opposed to the number of results in this bundle).
    • getLink

      Returns:
      link (A series of links that provide context to this bundle.)
    • hasLink

      public boolean hasLink()
    • addLink

      Returns:
      link (A series of links that provide context to this bundle.)
    • addLink

    • getEntry

      Returns:
      entry (An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).)
    • hasEntry

      public boolean hasEntry()
    • addEntry

      Returns:
      entry (An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).)
    • addEntry

    • getSignature

      Returns:
      signature (Digital Signature - base64 encoded. XML DigSIg or a JWT.)
    • hasSignature

      public boolean hasSignature()
    • setSignature

      public Bundle setSignature​(Signature value)
      Parameters:
      value - signature (Digital Signature - base64 encoded. XML DigSIg or a JWT.)
    • getLink

      public Bundle.BundleLinkComponent getLink​(String theRelation)
      Returns the link which matches a given relation. If no link is found which matches the given relation, returns null. If more than one link is found which matches the given relation, returns the first matching BundleLinkComponent.
      Parameters:
      theRelation - The relation, such as "next", or "self. See the constants such as IBaseBundle.LINK_SELF and IBaseBundle.LINK_NEXT.
      Returns:
      Returns a matching BundleLinkComponent, or null
      See Also:
      IBaseBundle.LINK_NEXT, IBaseBundle.LINK_PREV, IBaseBundle.LINK_SELF
    • getLinkOrCreate

      Returns the link which matches a given relation. If no link is found which matches the given relation, creates a new BundleLinkComponent with the given relation and adds it to this Bundle. If more than one link is found which matches the given relation, returns the first matching BundleLinkComponent.
      Parameters:
      theRelation - The relation, such as "next", or "self. See the constants such as IBaseBundle.LINK_SELF and IBaseBundle.LINK_NEXT.
      Returns:
      Returns a matching BundleLinkComponent, or null
      See Also:
      IBaseBundle.LINK_NEXT, IBaseBundle.LINK_PREV, IBaseBundle.LINK_SELF
    • listChildren

      protected void listChildren​(List<Property> childrenList)
      Overrides:
      listChildren in class Resource
    • setProperty

      public void setProperty​(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      setProperty in class Resource
      Throws:
      org.hl7.fhir.exceptions.FHIRException
    • addChild

      public Base addChild​(String name) throws org.hl7.fhir.exceptions.FHIRException
      Overrides:
      addChild in class Resource
      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 Resource
    • copy

      public Bundle copy()
      Specified by:
      copy in class Resource
    • typedCopy

      protected Bundle typedCopy()
    • equalsDeep

      public boolean equalsDeep​(Base other)
      Overrides:
      equalsDeep in class Resource
    • equalsShallow

      public boolean equalsShallow​(Base other)
      Overrides:
      equalsShallow in class Resource
    • isEmpty

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

      Specified by:
      getResourceType in class Resource