
Package ca.uhn.fhir.util
Class MetaUtil
java.lang.Object
ca.uhn.fhir.util.MetaUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringextractSourceUriOrEmpty(String theProvenanceSourceUri) Resource.meta.source may include a request ID in the format sourceURI#requestID This method extracts the source URI component from the meta.source stringgetAutoVersionReferencesAtPath(IBaseMetaType theMeta, String theResourceType) static StringgetSource(FhirContext theContext, IBaseMetaType theMeta) static StringgetSource(FhirContext theContext, IBaseResource theResource) static <R extends IBaseResource>
voidpopulateResourceSource(FhirContext theFhirContext, String theProvenanceSourceUri, String theProvenanceRequestId, R theRetVal) static voidsetSource(FhirContext theContext, IBaseMetaType theMeta, String theValue) static voidsetSource(FhirContext theContext, IBaseResource theResource, String theValue) Sets the value forResource.meta.sourcefor R4+ resources, and places the value in an extension onResource.metawith the URLhttp://hapifhir.io/fhir/StructureDefinition/resource-meta-sourcefor DSTU3.
-
Method Details
-
extractSourceUriOrEmpty
Resource.meta.source may include a request ID in the format sourceURI#requestID This method extracts the source URI component from the meta.source string- Parameters:
theProvenanceSourceUri- the meta.source string- Returns:
- the source URI component, or a blank String if empty/null
-
getSource
- Since:
- 8.2.0
-
getSource
-
populateResourceSource
public static <R extends IBaseResource> void populateResourceSource(FhirContext theFhirContext, String theProvenanceSourceUri, String theProvenanceRequestId, R theRetVal) -
setSource
Sets the value forResource.meta.sourcefor R4+ resources, and places the value in an extension onResource.metawith the URLhttp://hapifhir.io/fhir/StructureDefinition/resource-meta-sourcefor DSTU3.- Parameters:
theContext- The FhirContext objecttheResource- The resource to modifytheValue- The source URI- See Also:
-
setSource
-
getAutoVersionReferencesAtPath
public static Set<String> getAutoVersionReferencesAtPath(IBaseMetaType theMeta, String theResourceType)
-