Package com.bazaarvoice.jolt.shiftr.spec
Class ShiftrLeafSpec
- java.lang.Object
-
- com.bazaarvoice.jolt.shiftr.spec.ShiftrSpec
-
- com.bazaarvoice.jolt.shiftr.spec.ShiftrLeafSpec
-
- All Implemented Interfaces:
BaseSpec
public class ShiftrLeafSpec extends ShiftrSpec
Leaf level Spec object. If this Spec's PathElement matches the input (successful parallel tree walk) this Spec has the information needed to write the given data to the output object.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<? extends PathEvaluatingTraversal>
shiftrWriters
private static TraversalBuilder
TRAVERSAL_BUILDER
-
Fields inherited from class com.bazaarvoice.jolt.shiftr.spec.ShiftrSpec
pathElement
-
-
Constructor Summary
Constructors Constructor Description ShiftrLeafSpec(java.lang.String rawKey, java.lang.Object rhs)
-
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 do the work of outputting data and return true.-
Methods inherited from class com.bazaarvoice.jolt.shiftr.spec.ShiftrSpec
getPathElement
-
-
-
-
Field Detail
-
TRAVERSAL_BUILDER
private static final TraversalBuilder TRAVERSAL_BUILDER
-
shiftrWriters
private final java.util.List<? extends PathEvaluatingTraversal> shiftrWriters
-
-
Method Detail
-
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 do the work of outputting data and return true.- Returns:
- true if this this spec "handles" the inputkey such that no sibling specs need to see it
-
-