Class StepOutputDataFile
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.core.workflow.StepOutputDataFile
-
- All Implemented Interfaces:
Comparable<StepOutputDataFile>
public final class StepOutputDataFile extends Object implements Comparable<StepOutputDataFile>
This class define an output file of workflow set.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Constructor Summary
Constructors Constructor Description StepOutputDataFile(fr.ens.biologie.genomique.eoulsan.core.workflow.StepOutputPort outputPort, Sample sample)
Constructor.StepOutputDataFile(fr.ens.biologie.genomique.eoulsan.core.workflow.StepOutputPort outputPort, Sample sample, int fileIndex)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(StepOutputDataFile o)
static int
dataFileCount(fr.ens.biologie.genomique.eoulsan.core.workflow.StepOutputPort outputPort, Sample sample, boolean existingFiles)
Get the count of files that exists for a step, a format and sample (case of multi-files data).boolean
equals(Object o)
DataFile
getDataFile()
Get the file as a DataFile.int
getFileIndex()
Get file index.DataFormat
getFormat()
Get the format of the outputString
getPortName()
Get the port name that produced the file.Sample
getSample()
Get the sample that produced the file.AbstractStep
getStep()
Get the workflow step that produced the file.int
hashCode()
boolean
isMayNotExist()
static String
newStandardFilename(Step step, String portName, DataFormat format, Sample sample, int fileIndex, fr.ens.biologie.genomique.kenetre.io.CompressionType compression)
Create a standard filename.
-
-
-
Constructor Detail
-
StepOutputDataFile
public StepOutputDataFile(fr.ens.biologie.genomique.eoulsan.core.workflow.StepOutputPort outputPort, Sample sample)
Constructor.- Parameters:
outputPort
- output port that create the filesample
- sample of the file
-
StepOutputDataFile
public StepOutputDataFile(fr.ens.biologie.genomique.eoulsan.core.workflow.StepOutputPort outputPort, Sample sample, int fileIndex)
Constructor.- Parameters:
outputPort
- output port that create the filesample
- sample of the filefileIndex
- file index of the file for multi-file data
-
-
Method Detail
-
getStep
public AbstractStep getStep()
Get the workflow step that produced the file.- Returns:
- the workflow step
-
getPortName
public String getPortName()
Get the port name that produced the file.- Returns:
- the port name
-
getFormat
public DataFormat getFormat()
Get the format of the output- Returns:
- the DataFormat of the output
-
getSample
public Sample getSample()
Get the sample that produced the file.- Returns:
- the Sample
-
getFileIndex
public int getFileIndex()
Get file index.- Returns:
- the file index
-
isMayNotExist
public boolean isMayNotExist()
-
getDataFile
public DataFile getDataFile()
Get the file as a DataFile.- Returns:
- a DataFile
-
compareTo
public int compareTo(StepOutputDataFile o)
- Specified by:
compareTo
in interfaceComparable<StepOutputDataFile>
-
newStandardFilename
public static String newStandardFilename(Step step, String portName, DataFormat format, Sample sample, int fileIndex, fr.ens.biologie.genomique.kenetre.io.CompressionType compression)
Create a standard filename.- Parameters:
step
- the step that generated the fileportName
- the port name that generated the fileformat
- the format of the filesample
- the sample of the filefileIndex
- file index of the file for multi-file datacompression
- the compression of the file- Returns:
- a file name as a String
-
dataFileCount
public static int dataFileCount(fr.ens.biologie.genomique.eoulsan.core.workflow.StepOutputPort outputPort, Sample sample, boolean existingFiles)
Get the count of files that exists for a step, a format and sample (case of multi-files data).- Parameters:
outputPort
- output port that create the filesample
- sample of the fileexistingFiles
- true if existence of file must be tested. If false the return value will be the maximum number files- Returns:
- the number of files
-
-