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 RealizedPipeline realize(RealizationInput input)
      Description copied from interface: Step

      Produce a new pipeline that is the result of realizing this step against the input.

      Specified by:
      realize in interface Step
      Parameters:
      input - the 'payload' for realization.
    • 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