Class Bundle
- java.lang.Object
-
- org.hl7.fhir.r4.model.Base
-
- org.hl7.fhir.r4.model.BaseResource
-
- org.hl7.fhir.r4.model.Resource
-
- org.hl7.fhir.r4.model.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBundle.BundleEntryComponentstatic classBundle.BundleEntryRequestComponentstatic classBundle.BundleEntryResponseComponentstatic classBundle.BundleEntrySearchComponentstatic classBundle.BundleLinkComponentstatic classBundle.BundleTypestatic classBundle.BundleTypeEnumFactorystatic classBundle.HTTPVerbstatic classBundle.HTTPVerbEnumFactorystatic classBundle.SearchEntryModestatic classBundle.SearchEntryModeEnumFactory
-
Field Summary
Fields Modifier and Type Field Description static ca.uhn.fhir.rest.gclient.ReferenceClientParamCOMPOSITIONFluent Client search parameter constant for compositionprotected List<Bundle.BundleEntryComponent>entryAn entry in a bundle resource - will either contain a resource or information about a resource (transactions and history only).protected IdentifieridentifierA persistent identifier for the bundle that won't change as a bundle is copied from server to server.static ca.uhn.fhir.rest.gclient.TokenClientParamIDENTIFIERFluent Client search parameter constant for identifierstatic 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.protected List<Bundle.BundleLinkComponent>linkA series of links that provide context to this bundle.static ca.uhn.fhir.rest.gclient.ReferenceClientParamMESSAGEFluent Client search parameter constant for messageprotected SignaturesignatureDigital Signature - base64 encoded.static StringSP_COMPOSITIONSearch parameter: compositionstatic StringSP_IDENTIFIERSearch parameter: identifierstatic StringSP_MESSAGESearch parameter: messagestatic StringSP_TIMESTAMPSearch parameter: timestampstatic StringSP_TYPESearch parameter: typeprotected InstantTypetimestampThe date/time that the bundle was assembled - i.e.static ca.uhn.fhir.rest.gclient.DateClientParamTIMESTAMPFluent Client search parameter constant for timestampprotected UnsignedIntTypetotalIf a set of search matches, this is the total number of entries of type 'match' across all pages in the search.protected Enumeration<Bundle.BundleType>typeIndicates the purpose of this bundle - how it is intended to be used.static ca.uhn.fhir.rest.gclient.TokenClientParamTYPEFluent Client search parameter constant for type-
Fields inherited from class org.hl7.fhir.r4.model.Resource
id, implicitRules, language, meta
-
Fields inherited from interface org.hl7.fhir.instance.model.api.IAnyResource
RES_ID, SP_RES_ID, SP_RES_LANGUAGE
-
-
Constructor Summary
Constructors Constructor Description Bundle()ConstructorBundle(Enumeration<Bundle.BundleType> type)Constructor
-
Method Summary
-
Methods inherited from class org.hl7.fhir.r4.model.Resource
copyValues, getId, getIdBase, getIdElement, getImplicitRules, getImplicitRulesElement, getLanguage, getLanguage, getLanguageElement, getMeta, hasId, hasIdElement, hasImplicitRules, hasImplicitRulesElement, hasLanguage, hasLanguageElement, hasMeta, setId, setIdBase, setIdElement, setImplicitRules, setImplicitRulesElement, setLanguage, setLanguageElement, setMeta
-
Methods inherited from class org.hl7.fhir.r4.model.BaseResource
getStructureFhirVersionEnum, isResource, setId
-
Methods inherited from class org.hl7.fhir.r4.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCanonical, castToCode, castToCodeableConcept, castToCoding, castToContactDetail, castToContactPoint, castToContributor, castToDataRequirement, castToDate, castToDateTime, castToDecimal, castToDosage, castToDuration, castToElementDefinition, castToExpression, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMarketingStatus, castToMeta, castToMoney, castToNarrative, castToOid, castToParameterDefinition, castToPeriod, castToPopulation, castToPositiveInt, castToProdCharacteristic, castToProductShelfLife, castToQuantity, castToRange, castToRatio, castToReference, castToRelatedArtifact, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToSubstanceAmount, castToTime, castToTiming, castToTriggerDefinition, castToType, castToUnsignedInt, castToUri, castToUrl, castToUsageContext, castToXhtml, castToXhtmlString, children, clearUserData, compareDeep, compareDeep, compareDeep, compareDeep, compareValues, compareValues, dateTimeValue, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getNamedProperty, getUserData, getUserInt, getUserString, hasFormatComment, hasPrimitiveValue, hasType, hasUserData, isBooleanPrimitive, isDateTime, isMetadataBased, isPrimitive, listChildrenByName, listChildrenByName, primitiveValue, setUserData, setUserDataINN
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hl7.fhir.instance.model.api.IAnyResource
getUserData, setUserData
-
-
-
-
Field Detail
-
identifier
protected Identifier identifier
A persistent identifier for the bundle that won't change as a bundle is copied from server to server.
-
type
protected Enumeration<Bundle.BundleType> type
Indicates the purpose of this bundle - how it is intended to be used.
-
timestamp
protected InstantType timestamp
The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.
-
total
protected UnsignedIntType total
If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.
-
link
protected List<Bundle.BundleLinkComponent> link
A series of links that provide context to 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).
-
SP_IDENTIFIER
public static final String SP_IDENTIFIER
Search parameter: identifierDescription: Persistent identifier for the bundle
Type: token
Path: Bundle.identifier
- See Also:
- Constant Field Values
-
IDENTIFIER
public static final ca.uhn.fhir.rest.gclient.TokenClientParam IDENTIFIER
Fluent Client search parameter constant for identifierDescription: Persistent identifier for the bundle
Type: token
Path: Bundle.identifier
-
SP_COMPOSITION
public static final String SP_COMPOSITION
Search parameter: compositionDescription: The first resource in the bundle, if the bundle type is "document" - this is a composition, and this parameter provides access to search its contents
Type: reference
Path: Bundle.entry(0).resource
- 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 search its contents
Type: reference
Path: Bundle.entry(0).resource
-
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: typeDescription: 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 typeDescription: document | message | transaction | transaction-response | batch | batch-response | history | searchset | collection
Type: token
Path: Bundle.type
-
SP_MESSAGE
public static final String SP_MESSAGE
Search parameter: 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(0).resource
- 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(0).resource
-
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_TIMESTAMP
public static final String SP_TIMESTAMP
Search parameter: timestampDescription: When the bundle was assembled
Type: date
Path: Bundle.timestamp
- See Also:
- Constant Field Values
-
TIMESTAMP
public static final ca.uhn.fhir.rest.gclient.DateClientParam TIMESTAMP
Fluent Client search parameter constant for timestampDescription: When the bundle was assembled
Type: date
Path: Bundle.timestamp
-
-
Constructor Detail
-
Bundle
public Bundle()
Constructor
-
Bundle
public Bundle(Enumeration<Bundle.BundleType> type)
Constructor
-
-
Method Detail
-
getIdentifier
public Identifier getIdentifier()
- Returns:
identifier(A persistent identifier for the bundle that won't change as a bundle is copied from server to server.)
-
hasIdentifier
public boolean hasIdentifier()
-
setIdentifier
public Bundle setIdentifier(Identifier value)
- Parameters:
value-identifier(A persistent identifier for the bundle that won't change as a bundle is copied from server to server.)
-
getTypeElement
public Enumeration<Bundle.BundleType> getTypeElement()
- Returns:
type(Indicates the purpose of this bundle - how it is 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
public Bundle setTypeElement(Enumeration<Bundle.BundleType> value)
- Parameters:
value-type(Indicates the purpose of this bundle - how it is 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 is intended to be used.
-
setType
public Bundle setType(Bundle.BundleType value)
- Parameters:
value- Indicates the purpose of this bundle - how it is intended to be used.
-
getTimestampElement
public InstantType getTimestampElement()
- Returns:
timestamp(The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value
-
hasTimestampElement
public boolean hasTimestampElement()
-
hasTimestamp
public boolean hasTimestamp()
-
setTimestampElement
public Bundle setTimestampElement(InstantType value)
- Parameters:
value-timestamp(The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.). This is the underlying object with id, value and extensions. The accessor "getTimestamp" gives direct access to the value
-
getTimestamp
public Date getTimestamp()
- Returns:
- The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.
-
setTimestamp
public Bundle setTimestamp(Date value)
- Parameters:
value- The date/time that the bundle was assembled - i.e. when the resources were placed in the bundle.
-
getTotalElement
public UnsignedIntType getTotalElement()
- Returns:
total(If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the 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
public Bundle setTotalElement(UnsignedIntType value)
- Parameters:
value-total(If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the 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 entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.
-
setTotal
public Bundle setTotal(int value)
- Parameters:
value- If a set of search matches, this is the total number of entries of type 'match' across all pages in the search. It does not include search.mode = 'include' or 'outcome' entries and it does not provide a count of the number of entries in the Bundle.
-
getLink
public List<Bundle.BundleLinkComponent> getLink()
- Returns:
link(A series of links that provide context to this bundle.)
-
setLink
public Bundle setLink(List<Bundle.BundleLinkComponent> theLink)
- Returns:
- Returns a reference to
thisfor easy method chaining
-
hasLink
public boolean hasLink()
-
addLink
public Bundle.BundleLinkComponent addLink()
-
addLink
public Bundle addLink(Bundle.BundleLinkComponent t)
-
getLinkFirstRep
public Bundle.BundleLinkComponent getLinkFirstRep()
- Returns:
- The first repetition of repeating field
link, creating it if it does not already exist
-
getEntry
public List<Bundle.BundleEntryComponent> getEntry()
- Returns:
entry(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.BundleEntryComponent> theEntry)
- Returns:
- Returns a reference to
thisfor easy method chaining
-
hasEntry
public boolean hasEntry()
-
addEntry
public Bundle.BundleEntryComponent addEntry()
-
addEntry
public Bundle addEntry(Bundle.BundleEntryComponent t)
-
getEntryFirstRep
public Bundle.BundleEntryComponent getEntryFirstRep()
- Returns:
- The first repetition of repeating field
entry, creating it if it does not already exist
-
getSignature
public Signature getSignature()
- Returns:
signature(Digital Signature - base64 encoded. XML-DSig or a JWT.)
-
hasSignature
public boolean hasSignature()
-
setSignature
public Bundle setSignature(Signature value)
- Parameters:
value-signature(Digital Signature - base64 encoded. XML-DSig or a JWT.)
-
getLink
public Bundle.BundleLinkComponent 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 BundleLinkComponent.- Parameters:
theRelation- The relation, such as "next", or "self. See the constants such asIBaseBundle.LINK_SELFandIBaseBundle.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 thelinkwhich matches a givenrelation. 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 asIBaseBundle.LINK_SELFandIBaseBundle.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> children)
- Overrides:
listChildrenin classResource
-
getNamedProperty
public Property getNamedProperty(int _hash, String _name, boolean _checkValid) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getNamedPropertyin classResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getProperty
public Base[] getProperty(int hash, String name, boolean checkValid) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getPropertyin classResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
public Base setProperty(int hash, String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
setProperty
public Base setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
makeProperty
public Base makeProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
makePropertyin classResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
getTypesForProperty
public String[] getTypesForProperty(int hash, String name) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
getTypesForPropertyin classResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
copyValues
public void copyValues(Bundle dst)
-
equalsDeep
public boolean equalsDeep(Base other_)
- Overrides:
equalsDeepin classResource
-
equalsShallow
public boolean equalsShallow(Base other_)
- Overrides:
equalsShallowin classResource
-
isEmpty
public boolean isEmpty()
-
getResourceType
public ResourceType getResourceType()
- Specified by:
getResourceTypein classResource
-
-