Class BaseStep<T>

java.lang.Object
nz.org.riskscape.engine.steps.BaseStep<T>
All Implemented Interfaces:
nz.org.riskscape.engine.Identified, nz.org.riskscape.engine.pipeline.Step
Direct Known Subclasses:
AsyncSelectStep, EnlargeStep, FilterStep, GroupByStep, JoinStep, ProjectionStep, RelationInputStep, SaveStep, SegmentStep, SelectStep, SortStep, UnionStep, UnnestStep

public abstract class BaseStep<T> extends Object implements nz.org.riskscape.engine.pipeline.Step
  • Field Summary

    Fields inherited from interface nz.org.riskscape.engine.pipeline.Step

    FUNCTOR_INTERFACES
  • Constructor Summary

    Constructors
    Constructor
    Description
    BaseStep(nz.org.riskscape.engine.Engine engine)
     
    BaseStep(nz.org.riskscape.engine.Engine engine, com.google.common.collect.Range<Integer> inputArity, List<String> inputNames)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected nz.org.riskscape.problem.ResultOrProblems<T>
    bindInputs(T parameters, List<nz.org.riskscape.engine.pipeline.RealizedStep> inputs)
     
    protected nz.org.riskscape.problem.ResultOrProblems<T>
    bindParameters(nz.org.riskscape.engine.pipeline.RealizationInput input)
     
    boolean
     
    protected Class<T>
    findParameterClass(Class<?> modelClass)
     
    nz.org.riskscape.engine.i18n.RiskscapeMessage
     
    nz.org.riskscape.engine.Engine
     
     
    final com.google.common.collect.Range<Integer>
     
     
    protected Object
    Finds a Parameter for a Step based on name.
    nz.org.riskscape.engine.bind.JavaParameterSet<T>
     
    int
     
    final nz.org.riskscape.problem.ResultOrProblems<? extends nz.org.riskscape.engine.pipeline.Realized>
    realize(nz.org.riskscape.engine.pipeline.RealizationInput input)
     
    abstract nz.org.riskscape.problem.ResultOrProblems<? extends nz.org.riskscape.engine.pipeline.Realized>
    realize(T parameters)
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface nz.org.riskscape.engine.Identified

    getIdentifiedClass

    Methods inherited from interface nz.org.riskscape.engine.pipeline.Step

    getDeclaredParameter, getDeclaredParameterNames, getDeclaredParameters, getDefaultInputName, hasNamedInput
  • Constructor Details

    • BaseStep

      public BaseStep(nz.org.riskscape.engine.Engine engine)
    • BaseStep

      public BaseStep(nz.org.riskscape.engine.Engine engine, com.google.common.collect.Range<Integer> inputArity, List<String> inputNames)
  • Method Details

    • getId

      public String getId()
      Specified by:
      getId in interface nz.org.riskscape.engine.Identified
    • getDescription

      public nz.org.riskscape.engine.i18n.RiskscapeMessage getDescription()
      Specified by:
      getDescription in interface nz.org.riskscape.engine.pipeline.Step
      Returns:
      A human digestible description for this step.
    • getInputArity

      public final com.google.common.collect.Range<Integer> getInputArity()
      Specified by:
      getInputArity in interface nz.org.riskscape.engine.pipeline.Step
    • realize

      public final nz.org.riskscape.problem.ResultOrProblems<? extends nz.org.riskscape.engine.pipeline.Realized> realize(nz.org.riskscape.engine.pipeline.RealizationInput input)
      Specified by:
      realize in interface nz.org.riskscape.engine.pipeline.Step
    • realize

      public abstract nz.org.riskscape.problem.ResultOrProblems<? extends nz.org.riskscape.engine.pipeline.Realized> realize(T parameters)
    • bindInputs

      protected nz.org.riskscape.problem.ResultOrProblems<T> bindInputs(T parameters, List<nz.org.riskscape.engine.pipeline.RealizedStep> inputs)
    • findParameterClass

      protected Class<T> findParameterClass(Class<?> modelClass)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • bindParameters

      protected nz.org.riskscape.problem.ResultOrProblems<T> bindParameters(nz.org.riskscape.engine.pipeline.RealizationInput input)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getParamContext

      protected Object getParamContext(String name)

      Finds a Parameter for a Step based on name. This is a helper intended for Step sub-classes to report a Problem for a given parameter.

      Returns:
      the Parameter matching the name given, or null if no match was found
    • getParameterSet

      public nz.org.riskscape.engine.bind.JavaParameterSet<T> getParameterSet()
      Specified by:
      getParameterSet in interface nz.org.riskscape.engine.pipeline.Step
    • getEngine

      public nz.org.riskscape.engine.Engine getEngine()
    • getInputNames

      public List<String> getInputNames()
      Specified by:
      getInputNames in interface nz.org.riskscape.engine.pipeline.Step