Class IridaWorkflowLoaderService
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.workflow.IridaWorkflowLoaderService
-
@Service public class IridaWorkflowLoaderService extends java.lang.Object
Used to load up IRIDA workflows.
-
-
Constructor Summary
Constructors Constructor Description IridaWorkflowLoaderService(org.springframework.oxm.Unmarshaller workflowDescriptionUnmarshaller, AnalysisTypesService analysisTypesService)
Builds a newIridaWorkflowLoaderService
with the given unmarshaller.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<IridaWorkflow>
loadAllWorkflowImplementations(java.nio.file.Path workflowDirectory)
Loads up a set ofIridaWorkflow
s from the given directory.IridaWorkflow
loadIridaWorkflow(java.nio.file.Path descriptionFile, java.nio.file.Path structureFile)
Loads up anIridaWorkflow
from the given information files.IridaWorkflow
loadIridaWorkflowFromDirectory(java.nio.file.Path workflowDirectory)
Loads up a workflow from the given directory.IridaWorkflowDescription
loadWorkflowDescription(java.nio.file.Path descriptionFile)
Loads up the workflow description from the given file.IridaWorkflowStructure
loadWorkflowStructure(java.nio.file.Path structureFile)
Loads up the structure of the workflow given the file.
-
-
-
Constructor Detail
-
IridaWorkflowLoaderService
@Autowired public IridaWorkflowLoaderService(org.springframework.oxm.Unmarshaller workflowDescriptionUnmarshaller, AnalysisTypesService analysisTypesService)
Builds a newIridaWorkflowLoaderService
with the given unmarshaller.- Parameters:
workflowDescriptionUnmarshaller
- The unmarshaller to use.analysisTypesService
- TheAnalysisTypesService
to use.
-
-
Method Detail
-
loadAllWorkflowImplementations
public java.util.Set<IridaWorkflow> loadAllWorkflowImplementations(java.nio.file.Path workflowDirectory) throws java.io.IOException, IridaWorkflowLoadException
Loads up a set ofIridaWorkflow
s from the given directory.- Parameters:
workflowDirectory
- The directory containing the different workflow implementations and files.- Returns:
- A set of
IridaWorkflow
s for all implementations. - Throws:
java.io.IOException
- If there was an issue reading one of the workflow files.IridaWorkflowLoadException
- If there was an issue when loading up the workflows.
-
loadIridaWorkflowFromDirectory
public IridaWorkflow loadIridaWorkflowFromDirectory(java.nio.file.Path workflowDirectory) throws java.io.IOException, IridaWorkflowLoadException
Loads up a workflow from the given directory.- Parameters:
workflowDirectory
- The directory containing a single version of a workflow.- Returns:
- An
IridaWorkflow
from this directory. - Throws:
java.io.IOException
- If there was an error reading one of the files.IridaWorkflowLoadException
- If there was an issue loading up the workflow.
-
loadIridaWorkflow
public IridaWorkflow loadIridaWorkflow(java.nio.file.Path descriptionFile, java.nio.file.Path structureFile) throws java.io.IOException, IridaWorkflowLoadException
Loads up anIridaWorkflow
from the given information files.- Parameters:
descriptionFile
- The description file for the workflow.structureFile
- The file describing the structure of a workflow.- Returns:
- An IridaWorkflow object for this workflow.
- Throws:
java.io.IOException
- If there was an issue reading the passed file.IridaWorkflowLoadException
- If there was an issue loading up the workflow.
-
loadWorkflowDescription
public IridaWorkflowDescription loadWorkflowDescription(java.nio.file.Path descriptionFile) throws java.io.IOException, IridaWorkflowLoadException
Loads up the workflow description from the given file.- Parameters:
descriptionFile
- The file to load up a workflow description.- Returns:
- An IridaWorkflowDescription object.
- Throws:
java.io.IOException
- If there was an issue reading the passed file.IridaWorkflowLoadException
- If there was an issue loading up the workflow description.
-
loadWorkflowStructure
public IridaWorkflowStructure loadWorkflowStructure(java.nio.file.Path structureFile) throws java.io.FileNotFoundException
Loads up the structure of the workflow given the file.- Parameters:
structureFile
- The file to load up.- Returns:
- An
IridaWorkflowStructure
defining the structure of the workflow. - Throws:
java.io.FileNotFoundException
- If the structure file could not be found.
-
-