Interface Step
- All Superinterfaces:
Identified
- All Known Subinterfaces:
NestedPipelineStep
- All Known Implementing Classes:
NullStep
A processing Step
that can be added to a Pipeline
. Note that steps themselves are not owned by a
pipeline and implementations should be immutable, relatively state-less and reusable.
A pipeline will bring steps together in a directed acyclic graph, and call the realize method in dependency order,
passing each realized step in to the next.
Realization should return an object that implements exactly one of the FUNCTOR_INTERFACES
that is realized
using the given inputs. This step should not perform any data processing, it should just validate the inputs against
its parameters and produce a functor that will accept data of the type it has been told it will receive (as per
the list of RealizedStep
s it is given.
-
Field Summary
Modifier and TypeFieldDescriptionThe supported set of interfaces a Step can produce during realization. -
Method Summary
Modifier and TypeMethodDescriptiongetDeclaredParameter
(String name) Deprecated.use getParameterSet() insteadcom.google.common.collect.Range<Integer>
The set ofParameter
s this step accepts.default boolean
hasNamedInput
(String namedInput) default NamedStep
ResultOrProblems<? extends Realized>
realize
(RealizationInput stepInput) Does the parameter validation required to produce an functor for the nextStep
.Methods inherited from interface nz.org.riskscape.engine.Identified
getId, getIdentifiedClass
-
Field Details
-
FUNCTOR_INTERFACES
The supported set of interfaces a Step can produce during realization.
-
-
Method Details
-
getDescription
RiskscapeMessage getDescription()- Returns:
- A human digestible description for this step.
-
getDeclaredParameters
Deprecated.use getParameterSet() instead -
getParameterSet
ParameterSet getParameterSet()The set of
Parameter
s this step accepts. These should be used to populate a map for therealize(RealizationInput)
method -
realize
Does the parameter validation required to produce an functor for the next
Step
.- Parameters:
stepInput
- the data and context that go in to realizing a step- Returns:
- a realized functor that will work when given data of the types specified by inputs.
-
getInputArity
com.google.common.collect.Range<Integer> getInputArity()- Returns:
- a range that describes the number of inputs this step supports. NB a bit unsure whether we really need this - at the moment it's defined by the functor... but it's possible we might need a n-input join functor...
-
getDeclaredParameter
-
named
-
getInputNames
- Returns:
- a list of input names, in the order that the step expects. Will be empty for steps that do not support named inputs.
-
getDefaultInputName
- Returns:
- the input name to attach un-named pipeline edges to, if named inputs are supported
-
hasNamedInput
- Returns:
- true if this step has a named input that matches
namedInput
-
getDeclaredParameterNames
- Returns:
- a List of the names of parameters that this step declares
-