Interface Step
- All Superinterfaces:
Identified
- 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 RealizedSteps it is given.
-
Field Summary
FieldsModifier 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 ofParameters this step accepts.default booleanhasNamedInput(String namedInput) realize(RealizationInput stepInput) Produce a new pipeline that is the result of realizing this step against the input.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
Parameters this step accepts. These should be used to populate a map for therealize(RealizationInput)method -
realize
Produce a new pipeline that is the result of realizing this step against the input.
- Parameters:
stepInput- the 'payload' for realization.
-
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
-
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
-