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 intcompareTo(StepOutputDataFile o)static intdataFileCount(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).booleanequals(Object o)DataFilegetDataFile()Get the file as a DataFile.intgetFileIndex()Get file index.DataFormatgetFormat()Get the format of the outputStringgetPortName()Get the port name that produced the file.SamplegetSample()Get the sample that produced the file.AbstractStepgetStep()Get the workflow step that produced the file.inthashCode()booleanisMayNotExist()static StringnewStandardFilename(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:
compareToin 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
-
-