Class BasePathAndGroupReference

java.lang.Object
com.bazaarvoice.jolt.common.reference.BasePathAndGroupReference
All Implemented Interfaces:
PathAndGroupReference, PathReference
Direct Known Subclasses:
AmpReference, DollarReference

public abstract class BasePathAndGroupReference extends Object implements PathAndGroupReference
All "References" extend this class and support three level of syntactic sugar Example with the AmpReference 1 "invalid input: '&'" 2 "invalid input: '&'0" 3 "invalid input: '&'(0,0)" all three mean the same thing. References are used to look up values in a WalkedPath. In the CanonicalForm the first entry is how far up the WalkedPath to look for a LiteralPathElement, and the second entry is which part of that LiteralPathElement to ask for.
  • Field Details

    • keyGroup

      private final int keyGroup
    • pathIndex

      private final int pathIndex
  • Constructor Details

    • BasePathAndGroupReference

      public BasePathAndGroupReference(String refStr)
  • Method Details

    • getToken

      protected abstract char getToken()
    • getPathIndex

      public int getPathIndex()
      Specified by:
      getPathIndex in interface PathReference
    • getKeyGroup

      public int getKeyGroup()
      Specified by:
      getKeyGroup in interface PathAndGroupReference
    • getCanonicalForm

      public String getCanonicalForm()
      Builds the non-syntactic sugar / maximally expanded and unique form of this reference.
      Specified by:
      getCanonicalForm in interface PathReference
      Returns:
      canonical form : aka "invalid input: '&'" -> "invalid input: '&'(0,0)