Class FlattenProjection
java.lang.Object
nz.org.riskscape.engine.projection.FlattenProjection
- All Implemented Interfaces:
nz.org.riskscape.engine.projection.Projection
public class FlattenProjection
extends Object
implements nz.org.riskscape.engine.projection.Projection
Projects tuples where nested tuples are flattened in to a new attribute, according to a specific join character, e.g:
{a: {b: Text, c: Text}, {d: {e: Integer}}}
->
{a.b: Text, a.c: Text, d.e: Integer}
-
Field Summary
Fields inherited from interface nz.org.riskscape.engine.projection.Projection
IDENTITY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
flattenVisitStruct
(List<List<nz.org.riskscape.engine.types.Struct.StructMember>> expressions, nz.org.riskscape.engine.types.Struct.StructBuilder copyTo, nz.org.riskscape.engine.types.Struct struct, List<nz.org.riskscape.engine.types.Struct.StructMember> stack, String joinWith, boolean nullable) nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.projection.Projector>
getProjectionFunction
(nz.org.riskscape.engine.types.Struct sourceType) nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.types.Struct>
projectType
(nz.org.riskscape.engine.types.Struct source) protected nz.org.riskscape.engine.projection.FlattenProjection.StructFlattener
structFlattener
(nz.org.riskscape.engine.types.Struct source)
-
Constructor Details
-
FlattenProjection
-
-
Method Details
-
projectType
public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.types.Struct> projectType(nz.org.riskscape.engine.types.Struct source) - Specified by:
projectType
in interfacenz.org.riskscape.engine.projection.Projection
-
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 interfacenz.org.riskscape.engine.projection.Projection
-
structFlattener
protected nz.org.riskscape.engine.projection.FlattenProjection.StructFlattener structFlattener(nz.org.riskscape.engine.types.Struct source) -
flattenVisitStruct
protected void flattenVisitStruct(List<List<nz.org.riskscape.engine.types.Struct.StructMember>> expressions, nz.org.riskscape.engine.types.Struct.StructBuilder copyTo, nz.org.riskscape.engine.types.Struct struct, List<nz.org.riskscape.engine.types.Struct.StructMember> stack, String joinWith, boolean nullable)
-