Package com.ibm.fhir.bulkdata.provider
Interface Provider
-
- All Known Implementing Classes:
AzureProvider,FileProvider,HttpsProvider,S3Provider
public interface ProviderWraps the Complexities of a Source for the Given Type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description voidclose()Closes the StorageProvider wrapped resources.default voidcreateSource()creates the base output location for the type.longgetNumberOfLoaded()longgetNumberOfParseFailures()java.util.List<Resource>getResources()gets the read resources.longgetSize(java.lang.String workItem)gets the size of the given work item.default voidpushEndOfJobOperationOutcomes(java.io.ByteArrayOutputStream baos, java.lang.String folder, java.lang.String fileName)Pushes End of Job OperationOutcomes and closes the Outcomes StorageProviderdefault voidpushOperationOutcomes()Pushes the Operation OutcomesvoidreadResources(long numOfLinesToSkip, java.lang.String workItem)reads from a given workitem (or file) in a source and skips a certain noumber of linesvoidregisterTransient(long executionId, ExportTransientUserData transientUserData, java.lang.String cosBucketPathPrefix, java.lang.String fhirResourceType)voidregisterTransient(ImportTransientUserData transientUserData)default voidwriteResources(java.lang.String mediaType, java.util.List<ReadResultDTO> dtos)wraps the complexity of writing FHIR Resources out to a target
-
-
-
Method Detail
-
getSize
long getSize(java.lang.String workItem) throws FHIRExceptiongets the size of the given work item.- Parameters:
workItem-- Returns:
- Throws:
FHIRException
-
readResources
void readResources(long numOfLinesToSkip, java.lang.String workItem) throws FHIRExceptionreads from a given workitem (or file) in a source and skips a certain noumber of lines- Parameters:
numOfLinesToSkip-workItem-- Throws:
FHIRException
-
getResources
java.util.List<Resource> getResources() throws FHIRException
gets the read resources.- Returns:
- Throws:
FHIRException
-
writeResources
default void writeResources(java.lang.String mediaType, java.util.List<ReadResultDTO> dtos) throws java.lang.Exceptionwraps the complexity of writing FHIR Resources out to a target- Parameters:
mediaType-dtos-- Throws:
java.lang.Exception
-
createSource
default void createSource() throws FHIRExceptioncreates the base output location for the type.- Throws:
FHIRException
-
getNumberOfParseFailures
long getNumberOfParseFailures() throws FHIRException- Throws:
FHIRException
-
getNumberOfLoaded
long getNumberOfLoaded() throws FHIRException- Throws:
FHIRException
-
registerTransient
void registerTransient(ImportTransientUserData transientUserData)
-
registerTransient
void registerTransient(long executionId, ExportTransientUserData transientUserData, java.lang.String cosBucketPathPrefix, java.lang.String fhirResourceType) throws java.lang.Exception- Throws:
java.lang.Exception
-
pushOperationOutcomes
default void pushOperationOutcomes() throws FHIRExceptionPushes the Operation Outcomes- Throws:
FHIRException
-
close
void close() throws java.lang.ExceptionCloses the StorageProvider wrapped resources.- Throws:
java.lang.Exception
-
pushEndOfJobOperationOutcomes
default void pushEndOfJobOperationOutcomes(java.io.ByteArrayOutputStream baos, java.lang.String folder, java.lang.String fileName) throws FHIRExceptionPushes End of Job OperationOutcomes and closes the Outcomes StorageProvider- Parameters:
baos- the byte array output stream that is passed infolder- the folder where the file is to be storedfileName- the output filename to be used- Throws:
FHIRException
-
-