public class Bundle extends BaseBundle implements IBase
| Constructor and Description |
|---|
Bundle() |
| Modifier and Type | Method and Description |
|---|---|
Tag |
addCategory()
Deprecated.
Tags wil become immutable in a future release of HAPI, so
addCategory(String, String, String) should be used instead |
void |
addCategory(String theScheme,
String theTerm,
String theLabel) |
void |
addCategory(Tag theTag) |
BundleEntry |
addEntry()
Adds and returns a new bundle entry
|
void |
addEntry(BundleEntry theBundleEntry)
Adds a new entry
|
BundleEntry |
addResource(IResource theResource,
FhirContext theContext,
String theServerBase)
Creates a new entry using the given resource and populates it accordingly
|
StringDt |
getBundleId() |
TagList |
getCategories() |
List<BundleEntry> |
getEntries() |
StringDt |
getLinkBase() |
StringDt |
getLinkFirst() |
StringDt |
getLinkLast() |
StringDt |
getLinkNext() |
StringDt |
getLinkPrevious() |
StringDt |
getLinkSelf() |
IResource |
getResourceById(IdDt theId)
Retrieves a resource from a bundle given its logical ID.
|
ResourceMetadataMap |
getResourceMetadata() |
<T extends IResource> |
getResources(Class<T> theClass)
Returns a list containing all resources of the given type from this bundle
|
StringDt |
getTitle() |
IntegerDt |
getTotalResults() |
BoundCodeDt<BundleTypeEnum> |
getType() |
InstantDt |
getUpdated() |
boolean |
isEmpty()
Returns true if this bundle contains zero entries
|
void |
setCategories(TagList theCategories) |
int |
size() |
List<IResource> |
toListOfResources() |
String |
toString() |
static Bundle |
withResources(List<IResource> theResources,
FhirContext theContext,
String theServerBase) |
static Bundle |
withSingleResource(IResource theResource) |
getAuthorName, getAuthorUri, getId, setIdaddUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, isBaseEmptypublic Bundle()
@Deprecated public Tag addCategory()
addCategory(String, String, String) should be used insteadpublic void addCategory(String theScheme, String theTerm, String theLabel)
public void addCategory(Tag theTag)
public BundleEntry addEntry()
public void addEntry(BundleEntry theBundleEntry)
theBundleEntry - The entry to addpublic BundleEntry addResource(IResource theResource, FhirContext theContext, String theServerBase)
theResource - The resource to addpublic StringDt getBundleId()
public TagList getCategories()
public List<BundleEntry> getEntries()
public StringDt getLinkBase()
public StringDt getLinkFirst()
public StringDt getLinkLast()
public StringDt getLinkNext()
public StringDt getLinkPrevious()
public StringDt getLinkSelf()
public IResource getResourceById(IdDt theId)
Important usage notes: This method ignores base URLs (so passing in an ID of
http://foo/Patient/123 will return a resource if it has the logical ID of
http://bar/Patient/123. Also, this method is intended to be used for bundles which have already been
populated. It will cache its results for fast performance, but that means that modifications to the bundle after
this method is called may not be accurately reflected.
theId - The resource IDnull if none is foundpublic ResourceMetadataMap getResourceMetadata()
public <T extends IResource> List<T> getResources(Class<T> theClass)
public IntegerDt getTotalResults()
public BoundCodeDt<BundleTypeEnum> getType()
public InstantDt getUpdated()
public boolean isEmpty()
isEmpty in interface IBaseisEmpty in class BaseBundlepublic void setCategories(TagList theCategories)
public int size()
public List<IResource> toListOfResources()
public static Bundle withResources(List<IResource> theResources, FhirContext theContext, String theServerBase)
public static Bundle withSingleResource(IResource theResource)
Copyright © 2014–2016 University Health Network. All rights reserved.