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 Summary
Modifier and TypeFieldDescriptionprotected com.google.common.eventbus.EventBus
protected AtomicLong
protected BiFunction<Long,
List<Waveform>, reactor.core.publisher.Flux<R>> protected static final Long
protected int
protected SacExporter
-
Constructor Summary
ConstructorDescriptionAbstractSeismogramSaveLoadController
(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 Summary
Modifier and TypeMethodDescriptionint
void
void
loadFiles
(List<File> inputFiles, Runnable completionCallback, ProgressMonitor... additionalBars) void
saveToDirectory
(File exportDirectory) setCompletionCallback
(Runnable completionCallback) void
setMaxBatching
(int maxBatching)
-
Field Details
-
LOCAL_FAIL_EVENT
-
saveClient
-
loadClient
-
maxBatching
protected int maxBatching -
fileConverters
-
bus
protected com.google.common.eventbus.EventBus bus -
idCounter
-
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
-
loadFiles
-
loadFiles
public void loadFiles(List<File> inputFiles, Runnable completionCallback, ProgressMonitor... additionalBars) -
getMaxBatching
public int getMaxBatching() -
setMaxBatching
public void setMaxBatching(int maxBatching) -
getCompletionCallback
-
setCompletionCallback
public AbstractSeismogramSaveLoadController<FC,R> setCompletionCallback(Runnable completionCallback)
-