Package com.bazaarvoice.jolt.shiftr.spec
Class ShiftrCompositeSpec
- java.lang.Object
-
- com.bazaarvoice.jolt.shiftr.spec.ShiftrSpec
-
- com.bazaarvoice.jolt.shiftr.spec.ShiftrCompositeSpec
-
- All Implemented Interfaces:
BaseSpec
,OrderedCompositeSpec
public class ShiftrCompositeSpec extends ShiftrSpec implements OrderedCompositeSpec
Spec that has children, which it builds and then manages during Transforms.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<ShiftrSpec>
computedChildren
private static ComputedKeysComparator
computedKeysComparator
private ExecutionStrategy
executionStrategy
private java.util.Map<java.lang.String,ShiftrSpec>
literalChildren
private static java.util.HashMap<java.lang.Class,java.lang.Integer>
orderMap
private static SpecBuilder<ShiftrSpec>
specBuilder
private java.util.List<ShiftrSpec>
specialChildren
-
Fields inherited from class com.bazaarvoice.jolt.shiftr.spec.ShiftrSpec
pathElement
-
-
Constructor Summary
Constructors Constructor Description ShiftrCompositeSpec(java.lang.String rawKey, java.util.Map<java.lang.String,java.lang.Object> spec)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
apply(java.lang.String inputKey, Optional<java.lang.Object> inputOptional, WalkedPath walkedPath, java.util.Map<java.lang.String,java.lang.Object> output, java.util.Map<java.lang.String,java.lang.Object> context)
If this Spec matches the inputKey, then perform one step in the Shiftr parallel treewalk.ExecutionStrategy
determineExecutionStrategy()
java.util.List<ShiftrSpec>
getComputedChildren()
java.util.Map<java.lang.String,ShiftrSpec>
getLiteralChildren()
-
Methods inherited from class com.bazaarvoice.jolt.shiftr.spec.ShiftrSpec
getPathElement
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.bazaarvoice.jolt.common.spec.BaseSpec
getPathElement
-
-
-
-
Field Detail
-
orderMap
private static final java.util.HashMap<java.lang.Class,java.lang.Integer> orderMap
-
computedKeysComparator
private static final ComputedKeysComparator computedKeysComparator
-
specBuilder
private static final SpecBuilder<ShiftrSpec> specBuilder
-
specialChildren
private final java.util.List<ShiftrSpec> specialChildren
-
literalChildren
private final java.util.Map<java.lang.String,ShiftrSpec> literalChildren
-
computedChildren
private final java.util.List<ShiftrSpec> computedChildren
-
executionStrategy
private final ExecutionStrategy executionStrategy
-
-
Method Detail
-
getLiteralChildren
public java.util.Map<java.lang.String,ShiftrSpec> getLiteralChildren()
- Specified by:
getLiteralChildren
in interfaceOrderedCompositeSpec
-
getComputedChildren
public java.util.List<ShiftrSpec> getComputedChildren()
- Specified by:
getComputedChildren
in interfaceOrderedCompositeSpec
-
determineExecutionStrategy
public ExecutionStrategy determineExecutionStrategy()
- Specified by:
determineExecutionStrategy
in interfaceOrderedCompositeSpec
-
apply
public boolean apply(java.lang.String inputKey, Optional<java.lang.Object> inputOptional, WalkedPath walkedPath, java.util.Map<java.lang.String,java.lang.Object> output, java.util.Map<java.lang.String,java.lang.Object> context)
If this Spec matches the inputKey, then perform one step in the Shiftr parallel treewalk. Step one level down the input "tree" by carefully handling the List/Map nature the input to get the "one level down" data. Step one level down the Spec tree by carefully and efficiently applying our children to the "one level down" data.
-
-