Class FileProvider
- java.lang.Object
-
- org.linuxforhealth.fhir.bulkdata.provider.impl.FileProvider
-
-
Constructor Summary
Constructors Constructor Description FileProvider(java.lang.String source)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the StorageProvider wrapped resources.longgetNumberOfLoaded()longgetNumberOfParseFailures()java.util.List<Resource>getResources()gets the read resources.longgetSize(java.lang.String workItem)gets the size of the given work item.voidpushEndOfJobOperationOutcomes(java.io.ByteArrayOutputStream baos, java.lang.String folder, java.lang.String fileName)Pushes End of Job OperationOutcomes and closes the Outcomes StorageProvidervoidreadResources(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 exportPathPrefix, java.lang.String fhirResourceType)voidregisterTransient(ImportTransientUserData transientUserData)voidwriteResources(java.lang.String mediaType, java.util.List<ReadResultDTO> dtos)wraps the complexity of writing FHIR Resources out to a target-
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.linuxforhealth.fhir.bulkdata.provider.Provider
createSource, pushOperationOutcomes
-
-
-
-
Method Detail
-
getSize
public long getSize(java.lang.String workItem) throws FHIRExceptionDescription copied from interface:Providergets the size of the given work item.- Specified by:
getSizein interfaceProvider- Returns:
- Throws:
FHIRException
-
readResources
public void readResources(long numOfLinesToSkip, java.lang.String workItem) throws FHIRExceptionDescription copied from interface:Providerreads from a given workitem (or file) in a source and skips a certain noumber of lines- Specified by:
readResourcesin interfaceProvider- Throws:
FHIRException
-
getResources
public java.util.List<Resource> getResources() throws FHIRException
Description copied from interface:Providergets the read resources.- Specified by:
getResourcesin interfaceProvider- Returns:
- Throws:
FHIRException
-
getNumberOfParseFailures
public long getNumberOfParseFailures() throws FHIRException- Specified by:
getNumberOfParseFailuresin interfaceProvider- Throws:
FHIRException
-
registerTransient
public void registerTransient(ImportTransientUserData transientUserData)
- Specified by:
registerTransientin interfaceProvider
-
getNumberOfLoaded
public long getNumberOfLoaded() throws FHIRException- Specified by:
getNumberOfLoadedin interfaceProvider- Throws:
FHIRException
-
registerTransient
public void registerTransient(long executionId, ExportTransientUserData transientUserData, java.lang.String exportPathPrefix, java.lang.String fhirResourceType) throws java.lang.Exception- Specified by:
registerTransientin interfaceProvider- Throws:
java.lang.Exception
-
close
public void close() throws java.lang.ExceptionDescription copied from interface:ProviderCloses the StorageProvider wrapped resources.
-
writeResources
public void writeResources(java.lang.String mediaType, java.util.List<ReadResultDTO> dtos) throws java.lang.ExceptionDescription copied from interface:Providerwraps the complexity of writing FHIR Resources out to a target- Specified by:
writeResourcesin interfaceProvider- Throws:
java.lang.Exception
-
pushEndOfJobOperationOutcomes
public void pushEndOfJobOperationOutcomes(java.io.ByteArrayOutputStream baos, java.lang.String folder, java.lang.String fileName) throws FHIRExceptionDescription copied from interface:ProviderPushes End of Job OperationOutcomes and closes the Outcomes StorageProvider- Specified by:
pushEndOfJobOperationOutcomesin interfaceProvider- 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
-
-