Package org.hl7.fhir.dstu2.model
Class Bundle
- java.lang.Object
-
- org.hl7.fhir.dstu2.model.Base
-
- org.hl7.fhir.dstu2.model.BaseResource
-
- org.hl7.fhir.dstu2.model.Resource
-
- org.hl7.fhir.dstu2.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 protected List<Bundle.BundleEntryComponent>entryAn entry in a bundle resource - will either contain a resource, or information about a resource (transactions and history only).protected List<Bundle.BundleLinkComponent>linkA series of links that provide context to this bundle.protected SignaturesignatureDigital Signature - base64 encoded.static StringSP_COMPOSITIONstatic StringSP_MESSAGEstatic StringSP_TYPEprotected UnsignedIntTypetotalIf 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).protected Enumeration<Bundle.BundleType>typeIndicates the purpose of this bundle- how it was intended to be used.-
Fields inherited from class org.hl7.fhir.dstu2.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()Bundle(Enumeration<Bundle.BundleType> type)
-
Method Summary
-
Methods inherited from class org.hl7.fhir.dstu2.model.Resource
copyValues, getId, getIdElement, getImplicitRules, getImplicitRulesElement, getLanguage, getLanguageElement, getMeta, hasId, hasIdElement, hasImplicitRules, hasImplicitRulesElement, hasLanguage, hasLanguageElement, hasMeta, setId, setIdElement, setImplicitRules, setImplicitRulesElement, setLanguage, setLanguageElement, setMeta
-
Methods inherited from class org.hl7.fhir.dstu2.model.BaseResource
getStructureFhirVersionEnum, setId
-
Methods inherited from class org.hl7.fhir.dstu2.model.Base
castToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactPoint, castToDate, castToDateTime, castToDecimal, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToMoney, castToNarrative, castToOid, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToUnsignedInt, castToUri, children, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isMetadataBased, isPrimitive, 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
-
type
protected Enumeration<Bundle.BundleType> type
Indicates the purpose of this bundle- how it was intended to be used.
-
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).
-
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_COMPOSITION
public static final String SP_COMPOSITION
- See Also:
- Constant Field Values
-
SP_TYPE
public static final String SP_TYPE
- See Also:
- Constant Field Values
-
SP_MESSAGE
public static final String SP_MESSAGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Bundle
public Bundle()
-
Bundle
public Bundle(Enumeration<Bundle.BundleType> type)
-
-
Method Detail
-
getTypeElement
public Enumeration<Bundle.BundleType> 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
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
-
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 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
public List<Bundle.BundleLinkComponent> getLink()
- Returns:
link(A series of links that provide context to this bundle.)
-
hasLink
public boolean hasLink()
-
addLink
public Bundle.BundleLinkComponent addLink()
- Returns:
link(A series of links that provide context to this bundle.)
-
addLink
public Bundle addLink(Bundle.BundleLinkComponent t)
-
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).)
-
hasEntry
public boolean hasEntry()
-
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).)
-
addEntry
public Bundle addEntry(Bundle.BundleEntryComponent t)
-
getSignature
public Signature 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 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> childrenList)
- Overrides:
listChildrenin classResource
-
setProperty
public void setProperty(String name, Base value) throws org.hl7.fhir.exceptions.FHIRException
- Overrides:
setPropertyin classResource- Throws:
org.hl7.fhir.exceptions.FHIRException
-
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
-
-