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 Detail

      • total

        protected UnsignedIntType 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).
      • entry

        protected List<Bundle.BundleEntryComponent> entry
        An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).
      • signature

        protected Signature signature
        Digital Signature - base64 encoded. XML DigSIg or a JWT.
      • SP_MESSAGE

        public static final String SP_MESSAGE
        Search parameter: message

        Description: The first resource in the bundle, if the bundle type is "message" - this is a message header, and this parameter provides access to search its contents
        Type: reference
        Path: Bundle.entry.resource(0)

        See Also:
        Constant Field Values
      • MESSAGE

        public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam MESSAGE
        Fluent Client search parameter constant for message

        Description: The first resource in the bundle, if the bundle type is "message" - this is a message header, and this parameter provides access to search its contents
        Type: reference
        Path: Bundle.entry.resource(0)

      • INCLUDE_MESSAGE

        public static final ca.uhn.fhir.model.api.Include INCLUDE_MESSAGE
        Constant for fluent queries to be used to add include statements. Specifies the path value of "Bundle:message".
      • SP_COMPOSITION

        public static final String SP_COMPOSITION
        Search parameter: composition

        Description: The first resource in the bundle, if the bundle type is "document" - this is a composition, and this parameter provides access to searches its contents
        Type: reference
        Path: Bundle.entry.resource(0)

        See Also:
        Constant Field Values
      • COMPOSITION

        public static final ca.uhn.fhir.rest.gclient.ReferenceClientParam COMPOSITION
        Fluent Client search parameter constant for composition

        Description: The first resource in the bundle, if the bundle type is "document" - this is a composition, and this parameter provides access to searches its contents
        Type: reference
        Path: Bundle.entry.resource(0)

      • INCLUDE_COMPOSITION

        public static final ca.uhn.fhir.model.api.Include INCLUDE_COMPOSITION
        Constant for fluent queries to be used to add include statements. Specifies the path value of "Bundle:composition".
      • SP_TYPE

        public static final String SP_TYPE
        Search parameter: type

        Description: document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection
        Type: token
        Path: Bundle.type

        See Also:
        Constant Field Values
      • TYPE

        public static final ca.uhn.fhir.rest.gclient.TokenClientParam TYPE
        Fluent Client search parameter constant for type

        Description: document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection
        Type: token
        Path: Bundle.type

    • Method Detail

      • getTypeElement

        public Enumeration<Bundle.BundleTypegetTypeElement()
        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
      • hasType

        public boolean hasType()
      • setTypeElement

        public Bundle setTypeElement​(Enumeration<Bundle.BundleType> value)
        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

        public Bundle.BundleType 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

        public UnsignedIntType 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
      • setTotalElement

        public Bundle setTotalElement​(UnsignedIntType value)
        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).
      • hasLink

        public boolean hasLink()
      • addEntry

        public Bundle.BundleEntryComponent addEntry()
        Returns:
        entry (An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).)
      • 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

        public Bundle.BundleLinkComponent getLinkOrCreate​(String theRelation)
        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
      • getProperty

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

        public void setProperty​(int hash,
                                String name,
                                Base value)
                         throws org.hl7.fhir.exceptions.FHIRException
        Overrides:
        setProperty in class Resource
        Throws:
        org.hl7.fhir.exceptions.FHIRException
      • 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
      • makeProperty

        public Base makeProperty​(int hash,
                                 String name)
                          throws org.hl7.fhir.exceptions.FHIRException
        Description copied from class: Base
        make an instance of a property. If the property is a repeating property, make a new instance. if the property is not repeating, return the property
        Overrides:
        makeProperty in class Resource
        Returns:
        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
      • isEmpty

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