Class SetAttributeProjection

java.lang.Object
nz.org.riskscape.engine.projection.SetAttributeProjection
All Implemented Interfaces:
nz.org.riskscape.engine.projection.Projection

public class SetAttributeProjection extends Object implements nz.org.riskscape.engine.projection.Projection

Allows attributes to be replaced or added to the input via a set of arbitrary expressions against the input. Similar to {*, new_attribute: foo, replace_me: bar}.

This projection could be replaced or implemented with a select expression once/if https://gitlab.catalyst.net.nz/riskscape/riskscape/-/issues/300 is implemented

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected class 
     
  • Field Summary

    Fields inherited from interface nz.org.riskscape.engine.projection.Projection

    IDENTITY
  • Constructor Summary

    Constructors
    Constructor
    Description
    SetAttributeProjection(Map<String,nz.org.riskscape.rl.ast.Expression> setAttributes, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.projection.Projector>
    getProjectionFunction(nz.org.riskscape.engine.types.Struct sourceType)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface nz.org.riskscape.engine.projection.Projection

    projectType
  • Constructor Details

    • SetAttributeProjection

      public SetAttributeProjection(Map<String,nz.org.riskscape.rl.ast.Expression> setAttributes, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer)
  • Method Details

    • getProjectionFunction

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.projection.Projector> getProjectionFunction(nz.org.riskscape.engine.types.Struct sourceType)
      Specified by:
      getProjectionFunction in interface nz.org.riskscape.engine.projection.Projection