Package com.bazaarvoice.jolt.cardinality
Class CardinalityLeafSpec
java.lang.Object
com.bazaarvoice.jolt.cardinality.CardinalitySpec
com.bazaarvoice.jolt.cardinality.CardinalityLeafSpec
- All Implemented Interfaces:
BaseSpec
Leaf level CardinalitySpec object.
If this CardinalitySpec's PathElement matches the input (successful parallel tree walk)
this CardinalitySpec has the information needed to write the given data to the output object.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class com.bazaarvoice.jolt.cardinality.CardinalitySpec
pathElement
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
applyCardinality
(String inputKey, Object input, WalkedPath walkedPath, Object parentContainer) If this CardinalitySpec matches the inputkey, then do the work of modifying the data and return true.applyToParentContainer
(String inputKey, Object input, WalkedPath walkedPath, Object parentContainer) This should only be used by composite specs with an '@' childprivate MatchedElement
getMatch
(String inputKey, WalkedPath walkedPath) private Object
performCardinalityAdjustment
(String inputKey, Object input, WalkedPath walkedPath, Map parentContainer, MatchedElement thisLevel) Methods inherited from class com.bazaarvoice.jolt.cardinality.CardinalitySpec
apply, getPathElement, parse
-
Field Details
-
cardinalityRelationship
-
-
Constructor Details
-
CardinalityLeafSpec
-
-
Method Details
-
applyCardinality
public boolean applyCardinality(String inputKey, Object input, WalkedPath walkedPath, Object parentContainer) If this CardinalitySpec matches the inputkey, then do the work of modifying the data and return true.- Specified by:
applyCardinality
in classCardinalitySpec
- Returns:
- true if this this spec "handles" the inputkey such that no sibling specs need to see it
-
applyToParentContainer
public Object applyToParentContainer(String inputKey, Object input, WalkedPath walkedPath, Object parentContainer) This should only be used by composite specs with an '@' child- Returns:
- null if no work was done, otherwise returns the re-parented data
-
performCardinalityAdjustment
private Object performCardinalityAdjustment(String inputKey, Object input, WalkedPath walkedPath, Map parentContainer, MatchedElement thisLevel) - Returns:
- null if no work was done, otherwise returns the re-parented data
-
getMatch
-