Class StepOutputDataFile
java.lang.Object
fr.ens.biologie.genomique.eoulsan.core.workflow.StepOutputDataFile
- All Implemented Interfaces:
Comparable<StepOutputDataFile>
This class define an output file of workflow set.
- Since:
- 2.0
- Author:
- Laurent Jourdren
-
Constructor Summary
ConstructorsConstructorDescriptionStepOutputDataFile(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
Modifier and TypeMethodDescriptionintstatic 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).booleanGet the file as a DataFile.intGet file index.Get the format of the outputGet the port name that produced the file.Get the sample that produced the file.getStep()Get the workflow step that produced the file.inthashCode()booleanstatic StringnewStandardFilename(Step step, String portName, DataFormat format, Sample sample, int fileIndex, fr.ens.biologie.genomique.kenetre.io.CompressionType compression) Create a standard filename.
-
Constructor Details
-
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 Details
-
getStep
Get the workflow step that produced the file.- Returns:
- the workflow step
-
getPortName
Get the port name that produced the file.- Returns:
- the port name
-
getFormat
Get the format of the output- Returns:
- the DataFormat of the output
-
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
Get the file as a DataFile.- Returns:
- a DataFile
-
compareTo
- Specified by:
compareToin interfaceComparable<StepOutputDataFile>
-
equals
-
hashCode
public int hashCode() -
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
-