Class AnalysisTypesServiceImpl
- java.lang.Object
-
- ca.corefacility.bioinformatics.irida.service.impl.AnalysisTypesServiceImpl
-
- All Implemented Interfaces:
AnalysisTypesService
@Component public class AnalysisTypesServiceImpl extends java.lang.Object implements AnalysisTypesService
A service for managing registeredAnalysisType
s.
-
-
Constructor Summary
Constructors Constructor Description AnalysisTypesServiceImpl()
Builds a new defaultAnalysisTypesServiceImpl
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Set<AnalysisType>
executableAnalysisTypes()
Gets all executableAnalysisType
s.AnalysisType
fromString(java.lang.String string)
Gets aAnalysisType
from the given string.java.util.Optional<java.lang.String>
getViewerForAnalysisType(AnalysisType analysisType)
Get the viewer for a givenAnalysisType
boolean
isValid(AnalysisType analysisType)
Whether or not this analysis type is valid (has been registered).void
registerDefaultTypes()
Register some defaultAnalysisType
s from theBuiltInAnalysisTypes
listvoid
registerRunnableType(AnalysisType type)
Register a newAnalysisType
that can be run as a pipelinevoid
registerRunnableType(AnalysisType type, java.lang.String viewer)
Register a newAnalysisType
thatcna be run as a pipeline.void
registerUnrunnableType(AnalysisType type)
Register anAnalysisType
that cannot be run as a pipelinejava.util.Collection<AnalysisType>
values()
Gets allAnalysisType
s as aCollection
.
-
-
-
Constructor Detail
-
AnalysisTypesServiceImpl
public AnalysisTypesServiceImpl()
Builds a new defaultAnalysisTypesServiceImpl
.
-
-
Method Detail
-
executableAnalysisTypes
public java.util.Set<AnalysisType> executableAnalysisTypes()
Gets all executableAnalysisType
s.- Specified by:
executableAnalysisTypes
in interfaceAnalysisTypesService
- Returns:
- All executable
AnalysisType
s.
-
fromString
public AnalysisType fromString(java.lang.String string)
Gets aAnalysisType
from the given string.- Specified by:
fromString
in interfaceAnalysisTypesService
- Parameters:
string
- The string to match to theAnalysisType
.- Returns:
- The particular
AnalysisType
.
-
values
public java.util.Collection<AnalysisType> values()
Gets allAnalysisType
s as aCollection
.- Specified by:
values
in interfaceAnalysisTypesService
- Returns:
- All
AnalysisType
s as aCollection
.
-
isValid
public boolean isValid(AnalysisType analysisType)
Whether or not this analysis type is valid (has been registered).- Specified by:
isValid
in interfaceAnalysisTypesService
- Parameters:
analysisType
- TheAnalysisType
.- Returns:
- True if valid, false otherwise.
-
registerRunnableType
public void registerRunnableType(AnalysisType type)
Register a newAnalysisType
that can be run as a pipeline- Specified by:
registerRunnableType
in interfaceAnalysisTypesService
- Parameters:
type
- theAnalysisType
to run
-
registerRunnableType
public void registerRunnableType(AnalysisType type, java.lang.String viewer)
Register a newAnalysisType
thatcna be run as a pipeline. Include the name of a "viewer" that should be used for the results.- Specified by:
registerRunnableType
in interfaceAnalysisTypesService
- Parameters:
type
- TheAnalysisType
to registerviewer
- the name of the viewer to view results
-
registerUnrunnableType
public void registerUnrunnableType(AnalysisType type)
Register anAnalysisType
that cannot be run as a pipeline- Specified by:
registerUnrunnableType
in interfaceAnalysisTypesService
- Parameters:
type
- theAnalysisType
to register
-
getViewerForAnalysisType
public java.util.Optional<java.lang.String> getViewerForAnalysisType(AnalysisType analysisType)
Get the viewer for a givenAnalysisType
- Specified by:
getViewerForAnalysisType
in interfaceAnalysisTypesService
- Parameters:
analysisType
- theAnalysisType
to get a viewer for- Returns:
- an optional for the name of the viewer if it's available
-
registerDefaultTypes
public void registerDefaultTypes()
Register some defaultAnalysisType
s from theBuiltInAnalysisTypes
list- Specified by:
registerDefaultTypes
in interfaceAnalysisTypesService
-
-