use of ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowIdSet in project irida by phac-nml.
the class IridaWorkflowsServiceIT method setup.
@Before
public void setup() throws IOException, URISyntaxException, IridaWorkflowException {
Path workflowVersion1DirectoryPath = Paths.get(TestAnalysis.class.getResource("workflows/TestAnalysis/1.0").toURI());
Path workflowVersion2DirectoryPath = Paths.get(TestAnalysis.class.getResource("workflows/TestAnalysis/2.0").toURI());
Path workflowPhylogenomicsDirectoryPath = Paths.get(TestAnalysis.class.getResource("workflows/AnalysisPhylogenomicsPipeline/0.1").toURI());
iridaWorkflowsService = new IridaWorkflowsService(new IridaWorkflowSet(Sets.newHashSet()), new IridaWorkflowIdSet(Sets.newHashSet()));
testWorkflow1v1 = iridaWorkflowLoaderService.loadIridaWorkflowFromDirectory(workflowVersion1DirectoryPath);
testWorkflow1v2 = iridaWorkflowLoaderService.loadIridaWorkflowFromDirectory(workflowVersion2DirectoryPath);
testWorkflowPhylogenomics = iridaWorkflowLoaderService.loadIridaWorkflowFromDirectory(workflowPhylogenomicsDirectoryPath);
}
use of ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowIdSet in project irida by phac-nml.
the class IridaWorkflowsConfig method defaultIridaWorkflows.
/**
* A set of workflow ids to use as defaults.
*
* @return A set of workflow ids to use as defaults.
*/
@Bean
public IridaWorkflowIdSet defaultIridaWorkflows() {
Set<UUID> defaultWorkflowIds = Sets.newHashSet();
for (AnalysisType analysisType : AnalysisType.values()) {
String analysisDefaultProperyName = IRIDA_DEFAULT_WORKFLOW_PREFIX + "." + analysisType;
logger.trace("Getting default workflow id from property '" + analysisDefaultProperyName + "'");
String analysisDefaultId = environment.getProperty(analysisDefaultProperyName);
if (analysisDefaultId == null) {
logger.warn("No default workflow id associated with property '" + analysisDefaultProperyName + "'");
} else {
try {
UUID id = UUID.fromString(analysisDefaultId);
logger.debug("Adding default workflow " + analysisDefaultProperyName + "=" + analysisDefaultId);
defaultWorkflowIds.add(id);
} catch (IllegalArgumentException e) {
logger.error("Default workflow id for " + analysisDefaultProperyName + "=" + analysisDefaultId + " is not a valid workflow id");
}
}
}
return new IridaWorkflowIdSet(defaultWorkflowIds);
}
use of ca.corefacility.bioinformatics.irida.model.workflow.config.IridaWorkflowIdSet in project irida by phac-nml.
the class IridaWorkflowsServiceTest method setup.
@Before
public void setup() throws IridaWorkflowException {
iridaWorkflow = IridaWorkflowTestBuilder.buildTestWorkflow(iridaWorkflowId, IridaWorkflowTestBuilder.Input.SINGLE, "reference");
iridaWorkflow2 = IridaWorkflowTestBuilder.buildTestWorkflow(iridaWorkflowId2, IridaWorkflowTestBuilder.Input.SINGLE, "reference");
iridaWorkflow3 = IridaWorkflowTestBuilder.buildTestWorkflow(iridaWorkflowId3, IridaWorkflowTestBuilder.Input.SINGLE, "reference");
iridaWorkflowSet = new IridaWorkflowSet(Sets.newHashSet(iridaWorkflow, iridaWorkflow2));
defaultIridaWorkflowIdSet = new IridaWorkflowIdSet(Sets.newHashSet());
iridaWorkflowsService = new IridaWorkflowsService(iridaWorkflowSet, defaultIridaWorkflowIdSet);
}
Aggregations