Class Bundle
- java.lang.Object
-
- ca.uhn.fhir.model.api.BaseElement
-
- ca.uhn.fhir.model.dstu2.resource.BaseResource
-
- ca.uhn.fhir.model.dstu2.resource.Bundle
-
- All Implemented Interfaces:
ca.uhn.fhir.model.api.ICompositeElement,ca.uhn.fhir.model.api.IElement,ca.uhn.fhir.model.api.IResource,ca.uhn.fhir.model.api.ISupportsUndeclaredExtensions,Serializable,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 BaseResource implements ca.uhn.fhir.model.api.IResource, org.hl7.fhir.instance.model.api.IBaseBundle
HAPI/FHIR Bundle Resource ()Definition: A container for a collection of resources.
Requirements:
Profile Definition: http://hl7.org/fhir/profiles/Bundle
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBundle.EntryBlock class for child element: Bundle.entry ()static classBundle.EntryRequestBlock class for child element: Bundle.entry.request ()static classBundle.EntryResponseBlock class for child element: Bundle.entry.response ()static classBundle.EntrySearchBlock class for child element: Bundle.entry.search ()static classBundle.LinkBlock class for child element: Bundle.link ()
-
Field Summary
Fields Modifier and Type Field Description static ca.uhn.fhir.rest.gclient.ReferenceClientParamCOMPOSITIONFluent Client search parameter constant for compositionstatic ca.uhn.fhir.model.api.IncludeINCLUDE_COMPOSITIONConstant for fluent queries to be used to add include statements.static ca.uhn.fhir.model.api.IncludeINCLUDE_MESSAGEConstant for fluent queries to be used to add include statements.static ca.uhn.fhir.rest.gclient.ReferenceClientParamMESSAGEFluent Client search parameter constant for messagestatic StringSP_COMPOSITIONSearch parameter constant for compositionstatic StringSP_MESSAGESearch parameter constant for messagestatic StringSP_TYPESearch parameter constant for typestatic ca.uhn.fhir.rest.gclient.TokenClientParamTYPEFluent Client search parameter constant for type-
Fields inherited from class ca.uhn.fhir.model.dstu2.resource.BaseResource
RES_ID, SP_RES_ID, SP_RES_LANGUAGE
-
-
Constructor Summary
Constructors Constructor Description Bundle()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Bundle.EntryaddEntry()Adds and returns a new value for entry ()BundleaddEntry(Bundle.Entry theValue)Adds a given new value for entry ()Bundle.LinkaddLink()Adds and returns a new value for link ()BundleaddLink(Bundle.Link theValue)Adds a given new value for link ()<T extends ca.uhn.fhir.model.api.IElement>
List<T>getAllPopulatedChildElementsOfType(Class<T> theType)List<Bundle.Entry>getEntry()Gets the value(s) for entry ().Bundle.EntrygetEntryFirstRep()Gets the first repetition for entry (), creating it if it does not already exist.List<Bundle.Link>getLink()Gets the value(s) for link ().Bundle.LinkgetLink(String theRelation)Bundle.LinkgetLinkFirstRep()Gets the first repetition for link (), creating it if it does not already exist.Bundle.LinkgetLinkOrCreate(String theRelation)StringgetResourceName()SignatureDtgetSignature()Gets the value(s) for signature ().ca.uhn.fhir.context.FhirVersionEnumgetStructureFhirVersionEnum()IntegergetTotal()Gets the value(s) for total ().ca.uhn.fhir.model.primitive.UnsignedIntDtgetTotalElement()Gets the value(s) for total ().StringgetType()Gets the value(s) for type ().ca.uhn.fhir.model.primitive.BoundCodeDt<BundleTypeEnum>getTypeElement()Gets the value(s) for type ().booleanisEmpty()BundlesetEntry(List<Bundle.Entry> theValue)Sets the value(s) for entry ()BundlesetLink(List<Bundle.Link> theValue)Sets the value(s) for link ()BundlesetSignature(SignatureDt theValue)Sets the value(s) for signature ()BundlesetTotal(int theInteger)Sets the value for total ()BundlesetTotal(ca.uhn.fhir.model.primitive.UnsignedIntDt theValue)Sets the value(s) for total ()BundlesetType(BundleTypeEnum theValue)Sets the value(s) for type ()BundlesetType(ca.uhn.fhir.model.primitive.BoundCodeDt<BundleTypeEnum> theValue)Sets the value(s) for type ()-
Methods inherited from class ca.uhn.fhir.model.dstu2.resource.BaseResource
getContained, getId, getIdElement, getLanguage, getMeta, getResourceMetadata, getText, isBaseEmpty, setContained, setId, setId, setId, setLanguage, setResourceMetadata, setText, toString
-
Methods inherited from class ca.uhn.fhir.model.api.BaseElement
addUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, getUserData, hasFormatComment, setUserData
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IBase
fhirType, getFormatCommentsPost, getFormatCommentsPre, getUserData, hasFormatComment, setUserData
-
-
-
-
Field Detail
-
SP_TYPE
public static final String SP_TYPE
Search parameter constant for typeDescription:
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 typeDescription:
Type: token
Path: Bundle.type
-
SP_MESSAGE
public static final String SP_MESSAGE
Search parameter constant for messageDescription: 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 messageDescription: 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)
-
SP_COMPOSITION
public static final String SP_COMPOSITION
Search parameter constant for compositionDescription: 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 compositionDescription: 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".
-
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".
-
-
Constructor Detail
-
Bundle
public Bundle()
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceorg.hl7.fhir.instance.model.api.IBase
-
getAllPopulatedChildElementsOfType
public <T extends ca.uhn.fhir.model.api.IElement> List<T> getAllPopulatedChildElementsOfType(Class<T> theType)
- Specified by:
getAllPopulatedChildElementsOfTypein interfaceca.uhn.fhir.model.api.ICompositeElement
-
getTypeElement
public ca.uhn.fhir.model.primitive.BoundCodeDt<BundleTypeEnum> getTypeElement()
Gets the value(s) for type (). creating it if it does not exist. Will not returnnull.Definition: Indicates the purpose of this bundle- how it was intended to be used
-
getType
public String getType()
Gets the value(s) for type (). creating it if it does not exist. This method may returnnull.Definition: Indicates the purpose of this bundle- how it was intended to be used
-
setType
public Bundle setType(ca.uhn.fhir.model.primitive.BoundCodeDt<BundleTypeEnum> theValue)
Sets the value(s) for type ()Definition: Indicates the purpose of this bundle- how it was intended to be used
-
setType
public Bundle setType(BundleTypeEnum theValue)
Sets the value(s) for type ()Definition: Indicates the purpose of this bundle- how it was intended to be used
-
getTotalElement
public ca.uhn.fhir.model.primitive.UnsignedIntDt getTotalElement()
Gets the value(s) for total (). creating it if it does not exist. Will not returnnull.Definition: 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)
-
getTotal
public Integer getTotal()
Gets the value(s) for total (). creating it if it does not exist. This method may returnnull.Definition: 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(ca.uhn.fhir.model.primitive.UnsignedIntDt theValue)
Sets the value(s) for total ()Definition: 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 theInteger)
Sets the value for total ()Definition: 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
public List<Bundle.Link> getLink()
Gets the value(s) for link (). creating it if it does not exist. Will not returnnull.Definition: A series of links that provide context to this bundle
-
setLink
public Bundle setLink(List<Bundle.Link> theValue)
Sets the value(s) for link ()Definition: A series of links that provide context to this bundle
-
addLink
public Bundle.Link addLink()
Adds and returns a new value for link ()Definition: A series of links that provide context to this bundle
-
addLink
public Bundle addLink(Bundle.Link theValue)
Adds a given new value for link ()Definition: A series of links that provide context to this bundle
- Parameters:
theValue- The link to add (must not benull)
-
getLinkFirstRep
public Bundle.Link getLinkFirstRep()
Gets the first repetition for link (), creating it if it does not already exist.Definition: A series of links that provide context to this bundle
-
getEntry
public List<Bundle.Entry> getEntry()
Gets the value(s) for entry (). creating it if it does not exist. Will not returnnull.Definition: An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)
-
setEntry
public Bundle setEntry(List<Bundle.Entry> theValue)
Sets the value(s) for entry ()Definition: An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)
-
addEntry
public Bundle.Entry addEntry()
Adds and returns a new value for entry ()Definition: An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)
-
addEntry
public Bundle addEntry(Bundle.Entry theValue)
Adds a given new value for entry ()Definition: An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)
- Parameters:
theValue- The entry to add (must not benull)
-
getEntryFirstRep
public Bundle.Entry getEntryFirstRep()
Gets the first repetition for entry (), creating it if it does not already exist.Definition: An entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only)
-
getSignature
public SignatureDt getSignature()
Gets the value(s) for signature (). creating it if it does not exist. Will not returnnull.Definition: Digital Signature - base64 encoded. XML DigSIg or a JWT
-
setSignature
public Bundle setSignature(SignatureDt theValue)
Sets the value(s) for signature ()Definition: Digital Signature - base64 encoded. XML DigSIg or a JWT
-
getResourceName
public String getResourceName()
- Specified by:
getResourceNamein interfaceca.uhn.fhir.model.api.IResource
-
getStructureFhirVersionEnum
public ca.uhn.fhir.context.FhirVersionEnum getStructureFhirVersionEnum()
- Specified by:
getStructureFhirVersionEnumin interfaceorg.hl7.fhir.instance.model.api.IBaseResource- Specified by:
getStructureFhirVersionEnumin interfaceca.uhn.fhir.model.api.IResource
-
getLink
public Bundle.Link getLink(String theRelation)
Returns thelinkwhich matches a givenrelation. If no link is found which matches the given relation, returnsnull. If more than one link is found which matches the given relation, returns the first matching Link.- Parameters:
theRelation- The relation, such as "next", or "self. See the constants such asIBaseBundle#LINK_SELFandIBaseBundle#LINK_NEXT.- Returns:
- Returns a matching Link, or
null - See Also:
IBaseBundle#LINK_NEXT,IBaseBundle#LINK_PREV,IBaseBundle#LINK_SELF
-
getLinkOrCreate
public Bundle.Link getLinkOrCreate(String theRelation)
Returns thelinkwhich matches a givenrelation. If no link is found which matches the given relation, creates a new Link 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 Link.- Parameters:
theRelation- The relation, such as "next", or "self. See the constants such asIBaseBundle#LINK_SELFandIBaseBundle#LINK_NEXT.- Returns:
- Returns a matching Link, or
null - See Also:
IBaseBundle#LINK_NEXT,IBaseBundle#LINK_PREV,IBaseBundle#LINK_SELF
-
-