Interface FileProcessor
-
- All Known Implementing Classes:
AutomatedAnalysisFileProcessor
,ChecksumFileProcessor
,CoverageFileProcessor
,FastqcFileProcessor
,GzipFileProcessor
public interface FileProcessor
Responsible for processing aSequenceFile
after the file has been uploaded to the server.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description java.lang.Boolean
modifiesFile()
If theFileProcessor
throws aFileProcessorException
, theFileProcessor
should inform the caller whether or not proceeding with the remainingFileProcessor
instances in the chain is safe.void
process(SequencingObject sequencingObject)
Process the providedSequenceFile
, then (optionally) proceed to the next processor in the chain.default boolean
shouldProcessFile(SequencingObject sequencingObject)
This method asks the file processor whether it should act on this file.
-
-
-
Method Detail
-
process
void process(SequencingObject sequencingObject)
Process the providedSequenceFile
, then (optionally) proceed to the next processor in the chain. Any modifications to theSequenceFile
made by theFileProcessor
should be persisted by theFileProcessor
itself -- theFileProcessingChain
*does not* handle persistence.- Parameters:
sequencingObject
- theSequencingObject
to process- Throws:
FileProcessorException
- when processing fails.
-
modifiesFile
java.lang.Boolean modifiesFile()
If theFileProcessor
throws aFileProcessorException
, theFileProcessor
should inform the caller whether or not proceeding with the remainingFileProcessor
instances in the chain is safe. If theFileProcessor
modifies the file, then proceeding with the remainingFileProcessor
in the chain is not safe.- Returns:
- whether or not the
FileProcessor
modifies theSequenceFile
.
-
shouldProcessFile
default boolean shouldProcessFile(SequencingObject sequencingObject)
This method asks the file processor whether it should act on this file. The processor may have some settings that would not run on certain files.- Parameters:
sequencingObject
- theSequencingObject
to check- Returns:
- true if the processor should act on the file
-
-