Class AbstractSeismogramSaveLoadController<FC extends FileToSeismogramConverter,R>

java.lang.Object
gov.llnl.gnem.apps.coda.common.gui.controllers.AbstractSeismogramSaveLoadController<FC,R>
Direct Known Subclasses:
EnvelopeLoadingController, WaveformLoadingController

public abstract class AbstractSeismogramSaveLoadController<FC extends FileToSeismogramConverter,R> extends Object
The AbstractSeismogramSaveLoadController defines the contract and workflow for using a FileToSeismogramConverter to produce one or more Waveform domain objects from a file and vice-versa. This abstraction is intended to help support future formats beyond SAC files.
  • Field Details

    • LOCAL_FAIL_EVENT

      protected static final Long LOCAL_FAIL_EVENT
    • saveClient

      protected Supplier<reactor.core.publisher.Flux<Waveform>> saveClient
    • loadClient

      protected BiFunction<Long,List<Waveform>,reactor.core.publisher.Flux<R>> loadClient
    • maxBatching

      protected int maxBatching
    • fileConverters

      protected List<FC extends FileToSeismogramConverter> fileConverters
    • bus

      protected com.google.common.eventbus.EventBus bus
    • idCounter

      protected AtomicLong idCounter
    • sacExporter

      protected SacExporter sacExporter
  • Constructor Details

    • AbstractSeismogramSaveLoadController

      public AbstractSeismogramSaveLoadController(List<FC> fileConverters, com.google.common.eventbus.EventBus bus, org.slf4j.Logger log, SacExporter sacExporter, Supplier<reactor.core.publisher.Flux<Waveform>> saveClient, BiFunction<Long,List<Waveform>,reactor.core.publisher.Flux<R>> loadClient)
  • Method Details

    • saveToDirectory

      public void saveToDirectory(File exportDirectory)
    • loadFiles

      public void loadFiles(List<File> inputFiles)
    • loadFiles

      public void loadFiles(List<File> inputFiles, Runnable completionCallback, ProgressMonitor... additionalBars)
    • getMaxBatching

      public int getMaxBatching()
    • setMaxBatching

      public void setMaxBatching(int maxBatching)
    • getCompletionCallback

      public Runnable getCompletionCallback()
    • setCompletionCallback

      public AbstractSeismogramSaveLoadController<FC,R> setCompletionCallback(Runnable completionCallback)