public abstract class ResourceMetadataKeyEnum<T> extends Object implements Serializable
To access or set resource metadata values, every resource has a metadata map, and this class provides convenient getters/setters for interacting with that map. For example, to get a resource's
UPDATED value, which is the "last updated" time for that resource, use the following code:
InstantDt updated = ResourceMetadataKeyEnum.UPDATED.get(resource);
To set this value, use the following:
InstantDt update = new InstantDt("2011-01-02T11:22:33.0000Z"); // populate with the actual time
ResourceMetadataKeyEnum.UPDATED.put(resource, update);
Note that this class is not a Java Enum, and can therefore be extended (this is why it is not actually an Enum). Users of HAPI-FHIR are able to create their own classes extending this class to define their own keys for storage in resource metadata if needed.
| Modifier and Type | Class and Description |
|---|---|
static class |
ResourceMetadataKeyEnum.ResourceMetadataKeySupportingAnyResource<T,T2> |
| Modifier and Type | Field and Description |
|---|---|
static ResourceMetadataKeyEnum.ResourceMetadataKeySupportingAnyResource<InstantDt,IPrimitiveType<Date>> |
DELETED_AT
If present and populated with a date/time (as an instance of
InstantDt), this value is an indication that the resource is in the deleted state. |
static ResourceMetadataKeyEnum<DecimalDt> |
ENTRY_SCORE
Denotes the search score which a given resource should match in a transaction.
|
static ResourceMetadataKeyEnum.ResourceMetadataKeySupportingAnyResource<BundleEntrySearchModeEnum,String> |
ENTRY_SEARCH_MODE
If present and populated with a
BundleEntrySearchModeEnum, contains the "bundle entry search mode", which is the value of the status field in the Bundle entry containing this resource. |
static ResourceMetadataKeyEnum.ResourceMetadataKeySupportingAnyResource<BundleEntryTransactionMethodEnum,String> |
ENTRY_TRANSACTION_METHOD
If present and populated with a
BundleEntryTransactionMethodEnum, contains the "bundle entry transaction operation", which is the value of the status field in the Bundle entry
containing this resource. |
static ResourceMetadataKeyEnum<String> |
LINK_ALTERNATE
If present and populated with a string, provides the "alternate link" (the link element in the bundle entry with
rel="alternate"). |
static ResourceMetadataKeyEnum<String> |
LINK_SEARCH
If present and populated with a string, provides the "search link" (the link element in the bundle entry with
rel="search"). |
static ResourceMetadataKeyEnum<IdDt> |
PREVIOUS_ID
The value for this key represents a previous ID used to identify this resource.
|
static ResourceMetadataKeyEnum<List<IdDt>> |
PROFILES
The value for this key represents a
List of profile IDs that this resource claims to conform to. |
static ResourceMetadataKeyEnum<InstantDt> |
PUBLISHED
The value for this key is the bundle entry Published time.
|
static ResourceMetadataKeyEnum<List<BaseCodingDt>> |
SECURITY_LABELS |
static ResourceMetadataKeyEnum<TagList> |
TAG_LIST
The value for this key is the list of tags associated with this resource
|
static ResourceMetadataKeyEnum<String> |
TITLE
If present and populated with a string (as an instance of
String), this value contains the title for this resource, as supplied in any bundles containing the resource. |
static ResourceMetadataKeyEnum<InstantDt> |
UPDATED
The value for this key is the bundle entry Updated time.
|
static ResourceMetadataKeyEnum<String> |
VERSION
The value for this key is the version ID of the resource object.
|
static ResourceMetadataKeyEnum<IdDt> |
VERSION_ID
Deprecated.
The
IResource.getId() resource ID will now be populated with the version ID via the IdDt.getVersionIdPart() method |
| Constructor and Description |
|---|
ResourceMetadataKeyEnum(String theValue) |
public static final ResourceMetadataKeyEnum.ResourceMetadataKeySupportingAnyResource<InstantDt,IPrimitiveType<Date>> DELETED_AT
InstantDt), this value is an indication that the resource is in the deleted state. This key is only used in a limited number
of scenarios, such as POSTing transaction bundles to a server, or returning resource history.
Values for this key are of type InstantDt
public static final ResourceMetadataKeyEnum<DecimalDt> ENTRY_SCORE
Bundle.entry.score in a Bundle resource.
Note that search URL is only used in FHIR DSTU2 and later.
Values for this key are of type DecimalDt
public static final ResourceMetadataKeyEnum.ResourceMetadataKeySupportingAnyResource<BundleEntrySearchModeEnum,String> ENTRY_SEARCH_MODE
BundleEntrySearchModeEnum, contains the "bundle entry search mode", which is the value of the status field in the Bundle entry containing this resource.
The value for this key corresponds to field Bundle.entry.search.mode. This value can be set to provide a status value of "include" for included resources being returned by a
server, or to "match" to indicate that the resource was returned because it matched the given search criteria.
Note that status is only used in FHIR DSTU2 and later.
Values for this key are of type BundleEntrySearchModeEnum
public static final ResourceMetadataKeyEnum.ResourceMetadataKeySupportingAnyResource<BundleEntryTransactionMethodEnum,String> ENTRY_TRANSACTION_METHOD
BundleEntryTransactionMethodEnum, contains the "bundle entry transaction operation", which is the value of the status field in the Bundle entry
containing this resource. The value for this key corresponds to field Bundle.entry.transaction.operation. This value can be set in resources being transmitted to a server to
provide a status value of "create" or "update" to indicate behaviour the server should observe. It may also be set to similar values (or to "noop") in resources being returned by a server as a
result of a transaction to indicate to the client what operation was actually performed.
Note that status is only used in FHIR DSTU2 and later.
Values for this key are of type BundleEntryTransactionMethodEnum
public static final ResourceMetadataKeyEnum<String> LINK_ALTERNATE
rel="alternate"). Server implementations may populate this with a
complete URL, in which case the URL will be placed as-is in the bundle. They may alternately specify a resource relative URL (e.g. "Patient/1243") in which case the server will convert this to
an absolute URL at runtime.
Values for this key are of type String
public static final ResourceMetadataKeyEnum<String> LINK_SEARCH
rel="search"). Server implementations may populate this with a
complete URL, in which case the URL will be placed as-is in the bundle. They may alternately specify a resource relative URL (e.g. "Patient?name=tester") in which case the server will convert
this to an absolute URL at runtime.
Values for this key are of type String
public static final ResourceMetadataKeyEnum<IdDt> PREVIOUS_ID
Values for this key are of type IdDt
public static final ResourceMetadataKeyEnum<List<IdDt>> PROFILES
List of profile IDs that this resource claims to conform to.
Values for this key are of type List<IdDt>. Note that the returned list is unmodifiable, so you need to create a new list and call put to change its value.
public static final ResourceMetadataKeyEnum<InstantDt> PUBLISHED
Values for this key are of type InstantDt
Server Note: In servers, it is generally advisable to leave this value null, in which case the server will substitute the current time automatically.
InstantDtpublic static final ResourceMetadataKeyEnum<List<BaseCodingDt>> SECURITY_LABELS
public static final ResourceMetadataKeyEnum<TagList> TAG_LIST
Values for this key are of type TagList
TagListpublic static final ResourceMetadataKeyEnum<String> TITLE
public static final ResourceMetadataKeyEnum<InstantDt> UPDATED
Values for this key are of type InstantDt
InstantDtpublic static final ResourceMetadataKeyEnum<String> VERSION
Values for this key are of type String
@Deprecated public static final ResourceMetadataKeyEnum<IdDt> VERSION_ID
IResource.getId() resource ID will now be populated with the version ID via the IdDt.getVersionIdPart() method
Values for this key are of type IdDt
public ResourceMetadataKeyEnum(String theValue)
Copyright © 2014–2017 University Health Network. All rights reserved.