public class Bundle
extends java.lang.Object
Constructor and Description |
---|
Bundle() |
Modifier and Type | Method and Description |
---|---|
static java.util.Optional<java.lang.Exception> |
createBundle(Suite suite,
java.nio.file.Path bundlePath,
Correction correction,
java.util.List<Sample> samples,
java.util.List<Site> sites,
boolean copyJarFile)
Create and save a PuffinPlot data bundle.
|
public static java.util.Optional<java.lang.Exception> createBundle(Suite suite, java.nio.file.Path bundlePath, Correction correction, java.util.List<Sample> samples, java.util.List<Site> sites, boolean copyJarFile) throws java.io.IOException, PuffinUserException
Exceptions that occur during jar file copying are handled specially,
in order to allow an archive to be created even when the jar file can't
be copied: in this case the exception is caught internally, the archive
is created without the jar file, and the exception is wrapped in an
Optional
and returned as the return value of the method.
suite
- the suite from which to create the bundlebundlePath
- the path to which to save the bundlecorrection
- the correction to apply to the data when performing
calculationssamples
- the samples to include in suite mean calculationssites
- the sites to include in suite mean calculationscopyJarFile
- if true
, attempt to copy the PuffinPlot jar
file into the bundleOptional
,
and the archive is created without the jar file. If no
exception is thrown during copying, the returned Optional
contains no value.java.io.IOException
- if an I/O exception occurred while saving the bundle
(other than while copying the jar file)PuffinUserException
- if an exception occurred which saving the
suite or any of the results files