Package com.bazaarvoice.jolt.cardinality
Class CardinalityLeafSpec
- java.lang.Object
-
- com.bazaarvoice.jolt.cardinality.CardinalitySpec
-
- com.bazaarvoice.jolt.cardinality.CardinalityLeafSpec
-
- All Implemented Interfaces:
BaseSpec
public class CardinalityLeafSpec extends CardinalitySpec
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 Modifier and Type Class Description static classCardinalityLeafSpec.CardinalityRelationship
-
Field Summary
Fields Modifier and Type Field Description private CardinalityLeafSpec.CardinalityRelationshipcardinalityRelationship-
Fields inherited from class com.bazaarvoice.jolt.cardinality.CardinalitySpec
pathElement
-
-
Constructor Summary
Constructors Constructor Description CardinalityLeafSpec(java.lang.String rawKey, java.lang.Object rhs)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanapplyCardinality(java.lang.String inputKey, java.lang.Object input, WalkedPath walkedPath, java.lang.Object parentContainer)If this CardinalitySpec matches the inputkey, then do the work of modifying the data and return true.java.lang.ObjectapplyToParentContainer(java.lang.String inputKey, java.lang.Object input, WalkedPath walkedPath, java.lang.Object parentContainer)This should only be used by composite specs with an '@' childprivate MatchedElementgetMatch(java.lang.String inputKey, WalkedPath walkedPath)private java.lang.ObjectperformCardinalityAdjustment(java.lang.String inputKey, java.lang.Object input, WalkedPath walkedPath, java.util.Map parentContainer, MatchedElement thisLevel)-
Methods inherited from class com.bazaarvoice.jolt.cardinality.CardinalitySpec
apply, getPathElement, parse
-
-
-
-
Field Detail
-
cardinalityRelationship
private CardinalityLeafSpec.CardinalityRelationship cardinalityRelationship
-
-
Method Detail
-
applyCardinality
public boolean applyCardinality(java.lang.String inputKey, java.lang.Object input, WalkedPath walkedPath, java.lang.Object parentContainer)If this CardinalitySpec matches the inputkey, then do the work of modifying the data and return true.- Specified by:
applyCardinalityin classCardinalitySpec- Returns:
- true if this this spec "handles" the inputkey such that no sibling specs need to see it
-
applyToParentContainer
public java.lang.Object applyToParentContainer(java.lang.String inputKey, java.lang.Object input, WalkedPath walkedPath, java.lang.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 java.lang.Object performCardinalityAdjustment(java.lang.String inputKey, java.lang.Object input, WalkedPath walkedPath, java.util.Map parentContainer, MatchedElement thisLevel)- Returns:
- null if no work was done, otherwise returns the re-parented data
-
getMatch
private MatchedElement getMatch(java.lang.String inputKey, WalkedPath walkedPath)
-
-