Class NullStep

java.lang.Object
nz.org.riskscape.engine.pipeline.NullStep
All Implemented Interfaces:
Identified, Step

public class NullStep extends Object implements Step

A Pipeline Step that does nothing. It is mostly here for completeness and is useful in cases where a null might want to be returned or where something needs to be present that isn't an actual useful thing. If realized, this step produces an empty relation that yields an empty struct.

TODO We may want to tweak it slightly so that if given input it yields a Restrictor that always says no.

  • Field Details

    • INSTANCE

      public static final NullStep INSTANCE
  • Constructor Details

    • NullStep

      public NullStep()
  • Method Details

    • getParameterSet

      public ParameterSet getParameterSet()
      Description copied from interface: Step

      The set of Parameters this step accepts. These should be used to populate a map for the Step.realize(RealizationInput) method

      Specified by:
      getParameterSet in interface Step
    • getInputArity

      public com.google.common.collect.Range<Integer> getInputArity()
      Specified by:
      getInputArity in interface Step
      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...
    • realize

      public ResultOrProblems<? extends Realized> realize(RealizationInput stepInput)
      Description copied from interface: Step

      Does the parameter validation required to produce an functor for the next Step.

      Specified by:
      realize in interface 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.
    • getId

      public String getId()
      Specified by:
      getId in interface Identified
      Returns:
      id
    • getDescription

      public RiskscapeMessage getDescription()
      Specified by:
      getDescription in interface Step
      Returns:
      A human digestible description for this step.
    • toString

      public String toString()
      Overrides:
      toString in class Object