Package com.bazaarvoice.jolt.common
Class PathEvaluatingTraversal
java.lang.Object
com.bazaarvoice.jolt.common.PathEvaluatingTraversal
- Direct Known Subclasses:
ShiftrWriter
,TransposeReader
Combines a Traversr with the ability to evaluate References against a WalkedPath.
Convenience class for path based off a single dot notation String,
like "rating.invalid input: '&'1(2).invalid input: '&'.value".
This processes the dot notation path into internal data structures, so
that the String processing only happens once.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<EvaluatablePathElement> private final Traversr
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Traversr
createTraversr
(List<String> paths) evaluate
(WalkedPath walkedPath) Use the supplied WalkedPath, in the evaluation of each of our PathElements.get
(int index) Testing method.read
(Object data, WalkedPath walkedPath) int
size()
void
Use the supplied WalkedPath, in the evaluation of each of our PathElements to build a concrete output path.
-
Field Details
-
elements
-
traversr
-
-
Constructor Details
-
PathEvaluatingTraversal
-
-
Method Details
-
createTraversr
-
write
Use the supplied WalkedPath, in the evaluation of each of our PathElements to build a concrete output path. Then use that output path to write the given data to the output.- Parameters:
data
- data to writeoutput
- data structure we are going to write the data towalkedPath
- reference used to lookup reference values like "invalid input: '&'1(2)"
-
read
-
evaluate
Use the supplied WalkedPath, in the evaluation of each of our PathElements. If our PathElements contained a TransposePathElement, we may return null.- Parameters:
walkedPath
- used to lookup/evaluate PathElement references values like "invalid input: '&'1(2)"- Returns:
- null or fully evaluated Strings, possibly with concrete array references like "photos.[3]"
-
size
public int size() -
get
-
getCanonicalForm
Testing method.
-