Class FileProvider

  • All Implemented Interfaces:
    Provider

    public class FileProvider
    extends java.lang.Object
    implements Provider
    Wraps behaviors on the File objects on the local volumes.
    • Constructor Detail

      • FileProvider

        public FileProvider​(java.lang.String source)
                     throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • readResources

        public void readResources​(long numOfLinesToSkip,
                                  java.lang.String workItem)
                           throws FHIRException
        Description copied from interface: Provider
        reads from a given workitem (or file) in a source and skips a certain noumber of lines
        Specified by:
        readResources in interface Provider
        Throws:
        FHIRException
      • registerTransient

        public void registerTransient​(long executionId,
                                      ExportTransientUserData transientUserData,
                                      java.lang.String exportPathPrefix,
                                      java.lang.String fhirResourceType)
                               throws java.lang.Exception
        Specified by:
        registerTransient in interface Provider
        Throws:
        java.lang.Exception
      • close

        public void close()
                   throws java.lang.Exception
        Description copied from interface: Provider
        Closes the StorageProvider wrapped resources.
        Specified by:
        close in interface Provider
        Throws:
        java.lang.Exception
      • writeResources

        public void writeResources​(java.lang.String mediaType,
                                   java.util.List<ReadResultDTO> dtos)
                            throws java.lang.Exception
        Description copied from interface: Provider
        wraps the complexity of writing FHIR Resources out to a target
        Specified by:
        writeResources in interface Provider
        Throws:
        java.lang.Exception
      • pushEndOfJobOperationOutcomes

        public void pushEndOfJobOperationOutcomes​(java.io.ByteArrayOutputStream baos,
                                                  java.lang.String folder,
                                                  java.lang.String fileName)
                                           throws FHIRException
        Description copied from interface: Provider
        Pushes End of Job OperationOutcomes and closes the Outcomes StorageProvider
        Specified by:
        pushEndOfJobOperationOutcomes in interface Provider
        Parameters:
        baos - the byte array output stream that is passed in
        folder - the folder where the file is to be stored
        fileName - the output filename to be used
        Throws:
        FHIRException