Class AbstractEoulsanRuntime
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.AbstractEoulsanRuntime
-
- Direct Known Subclasses:
HadoopEoulsanRuntime,LocalEoulsanRuntime
public abstract class AbstractEoulsanRuntime extends Object
This class define an abstract EoulsanRuntime.- Since:
- 1.0
- Author:
- Laurent Jourdren
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAbstractEoulsanRuntime.EoulsanExecModeThis Enum define the Eoulsan execution mode.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractEoulsanRuntime(Settings settings)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description FilecreateFileInTempDir(String filename)Create a file in the temporary directory.FilecreateTempDir()Create a new temporary directory.FilecreateTempDir(String prefix)Create a new temporary directory.FilecreateTempFile(String prefix, String suffix)Create a new temporary file.protected InputStreamdecompressInputStreamIsNeeded(InputStream is, String source)Decompress an inputStream if needed.abstract InputStreamgetInputStream(String dataSource)Create an InputStream to load data.abstract AbstractEoulsanRuntime.EoulsanExecModegetMode()Get Eoulsan mode.abstract OutputStreamgetOutputStream(String dataSource)Create an OutputStream to load data.abstract InputStreamgetRawInputStream(String dataSource)Create a raw InputStream (without decompression of input data) to load data.SettingsgetSettings()Get Settings.abstract FilegetTempDirectory()Get the temporary directory.
-
-
-
Constructor Detail
-
AbstractEoulsanRuntime
protected AbstractEoulsanRuntime(Settings settings)
-
-
Method Detail
-
getSettings
public Settings getSettings()
Get Settings.- Returns:
- a Settings object
-
getTempDirectory
public abstract File getTempDirectory()
Get the temporary directory.- Returns:
- the temporary directory as a File object
-
getMode
public abstract AbstractEoulsanRuntime.EoulsanExecMode getMode()
Get Eoulsan mode.- Returns:
- the Eoulsan mode
-
getInputStream
public abstract InputStream getInputStream(String dataSource) throws IOException
Create an InputStream to load data.- Parameters:
dataSource- the source of the data to load- Returns:
- an InputStream corresponding to the source
- Throws:
IOException- if an error occurs the InputStream
-
getRawInputStream
public abstract InputStream getRawInputStream(String dataSource) throws IOException
Create a raw InputStream (without decompression of input data) to load data.- Parameters:
dataSource- the source of the data to load- Returns:
- an InputStream corresponding to the source
- Throws:
IOException- if an error occurs the InputStream
-
getOutputStream
public abstract OutputStream getOutputStream(String dataSource) throws IOException
Create an OutputStream to load data.- Parameters:
dataSource- the source of the data to load- Returns:
- an OutputStream corresponding to the source
- Throws:
IOException- if an error occurs the OutputStream
-
decompressInputStreamIsNeeded
protected InputStream decompressInputStreamIsNeeded(InputStream is, String source) throws IOException
Decompress an inputStream if needed.- Parameters:
is- the InputStreamsource- source of the inputStream- Returns:
- a InputStream with decompression integrated or not
- Throws:
IOException- if an error occurs while creating decompressor InputStream
-
createTempDir
public File createTempDir() throws IOException
Create a new temporary directory.- Returns:
- the new directory
- Throws:
IOException- if there is an error creating the temporary directory
-
createTempDir
public File createTempDir(String prefix) throws IOException
Create a new temporary directory.- Parameters:
prefix- prefix of the temporary directory- Returns:
- the new directory
- Throws:
IOException- if there is an error creating the temporary directory
-
createTempFile
public File createTempFile(String prefix, String suffix) throws IOException
Create a new temporary file.- Parameters:
prefix- Prefix of the temporary filesuffix- suffix of the temporary file- Returns:
- the new temporary file
- Throws:
IOException- if there is an error creating the temporary directory
-
-