public class TransposePathElement extends BasePathElement implements MatchablePathElement, EvaluatablePathElement
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
canonicalForm |
private TransposeReader |
subPathReader |
private int |
upLevel |
Modifier | Constructor and Description |
---|---|
private |
TransposePathElement(java.lang.String originalKey,
int upLevel,
java.lang.String subPath)
Private constructor used after parsing is done.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
evaluate(WalkedPath walkedPath)
Evaluate this key as if it is an write path element.
|
java.lang.String |
getCanonicalForm()
Get the canonical form of this PathElement.
|
private static TransposePathElement |
innerParse(java.lang.String originalKey,
java.lang.String meat)
Parse the core of the TransposePathElement key, once basic errors have been checked and
syntax has been handled.
|
MatchedElement |
match(java.lang.String dataKey,
WalkedPath walkedPath)
See if this PathElement matches the given dataKey.
|
Optional<java.lang.Object> |
objectEvaluate(WalkedPath walkedPath)
This method is used when the TransposePathElement is used on the LFH as data.
|
static TransposePathElement |
parse(java.lang.String key)
Parse a text value from a Spec, into a TransposePathElement.
|
getRawKey, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getRawKey
private final int upLevel
private final TransposeReader subPathReader
private final java.lang.String canonicalForm
private TransposePathElement(java.lang.String originalKey, int upLevel, java.lang.String subPath)
originalKey
- for referenceupLevel
- How far up the tree to gosubPath
- Where to go down the treepublic static TransposePathElement parse(java.lang.String key)
key
- rawKey from a Jolt Spec fileprivate static TransposePathElement innerParse(java.lang.String originalKey, java.lang.String meat)
originalKey
- The original text for reference.meat
- The string to actually parse into a TransposePathElementpublic Optional<java.lang.Object> objectEvaluate(WalkedPath walkedPath)
walkedPath
- WalkedPath to evaluate againstpublic java.lang.String evaluate(WalkedPath walkedPath)
EvaluatablePathElement
evaluate
in interface EvaluatablePathElement
walkedPath
- "up the tree" list of LiteralPathElements, that may be used by this key as it is computingpublic MatchedElement match(java.lang.String dataKey, WalkedPath walkedPath)
MatchablePathElement
match
in interface MatchablePathElement
dataKey
- String key value from the input datawalkedPath
- "up the tree" list of LiteralPathElements, that may be used by this key as it is computing its matchpublic java.lang.String getCanonicalForm()
PathElement
getCanonicalForm
in interface PathElement