Package com.bazaarvoice.jolt.common
Class PathElementBuilder
- java.lang.Object
-
- com.bazaarvoice.jolt.common.PathElementBuilder
-
public class PathElementBuilder extends java.lang.Object
Static utility class that creates PathElement(s) given a string key from a json spec document
-
-
Constructor Summary
Constructors Modifier Constructor Description private
PathElementBuilder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MatchablePathElement
buildMatchablePathElement(java.lang.String rawJsonKey)
Create a path element and ensures it is a Matchable Path Elementstatic java.util.List<PathElement>
parseDotNotationRHS(java.lang.String dotNotation)
Parse the dotNotation of the RHS.static java.util.List<PathElement>
parseList(java.util.List<java.lang.String> keys, java.lang.String refDotNotation)
static PathElement
parseSingleKeyLHS(java.lang.String origKey)
Visible for Testing.
-
-
-
Method Detail
-
buildMatchablePathElement
public static MatchablePathElement buildMatchablePathElement(java.lang.String rawJsonKey)
Create a path element and ensures it is a Matchable Path Element
-
parseSingleKeyLHS
public static PathElement parseSingleKeyLHS(java.lang.String origKey)
Visible for Testing. Inspects the key in a particular order to determine the correct sublass of PathElement to create.- Parameters:
origKey
- String that should represent a single PathElement- Returns:
- a concrete implementation of PathElement
-
parseDotNotationRHS
public static java.util.List<PathElement> parseDotNotationRHS(java.lang.String dotNotation)
Parse the dotNotation of the RHS.
-
parseList
public static java.util.List<PathElement> parseList(java.util.List<java.lang.String> keys, java.lang.String refDotNotation)
- Parameters:
refDotNotation
- the original dotNotation string used for error messages- Returns:
- List of PathElements based on the provided List
keys
-
-