Interface Provider
-
- All Known Implementing Classes:
AzureProvider
,FileProvider
,HttpsProvider
,S3Provider
public interface Provider
Wraps the Complexities of a Source for the Given Type
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
close()
Closes the StorageProvider wrapped resources.default void
createSource()
creates the base output location for the type.long
getNumberOfLoaded()
long
getNumberOfParseFailures()
java.util.List<Resource>
getResources()
gets the read resources.long
getSize(java.lang.String workItem)
gets the size of the given work item.default void
pushEndOfJobOperationOutcomes(java.io.ByteArrayOutputStream baos, java.lang.String folder, java.lang.String fileName)
Pushes End of Job OperationOutcomes and closes the Outcomes StorageProviderdefault void
pushOperationOutcomes()
Pushes the Operation Outcomesvoid
readResources(long numOfLinesToSkip, java.lang.String workItem)
reads from a given workitem (or file) in a source and skips a certain noumber of linesvoid
registerTransient(long executionId, ExportTransientUserData transientUserData, java.lang.String cosBucketPathPrefix, java.lang.String fhirResourceType)
void
registerTransient(ImportTransientUserData transientUserData)
default void
writeResources(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 FHIRException
gets the size of the given work item.- Parameters:
workItem
-- Returns:
- Throws:
FHIRException
-
readResources
void readResources(long numOfLinesToSkip, java.lang.String workItem) throws FHIRException
reads 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.Exception
wraps the complexity of writing FHIR Resources out to a target- Parameters:
mediaType
-dtos
-- Throws:
java.lang.Exception
-
createSource
default void createSource() throws FHIRException
creates 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 FHIRException
Pushes the Operation Outcomes- Throws:
FHIRException
-
close
void close() throws java.lang.Exception
Closes 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 FHIRException
Pushes 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
-
-