Class ShiftrSpec

  • All Implemented Interfaces:
    BaseSpec
    Direct Known Subclasses:
    ShiftrCompositeSpec, ShiftrLeafSpec

    public abstract class ShiftrSpec
    extends java.lang.Object
    implements BaseSpec
    A Spec Object represents a single line from the JSON Shiftr Spec. At a minimum a single Spec has : Raw LHS spec value Some kind of PathElement (based off that raw LHS value) Additionally there are 2 distinct subclasses of the base Spec LeafSpec : where the RHS is a String or Array of Strings, that specify an write path for the data from this level in the tree CompositeSpec : where the RHS is a map of children Specs Mapping of JSON Shiftr Spec to Spec objects : { rating-*" : { // CompositeSpec with one child and a Star PathElement "&(1)" : { // CompositeSpec with one child and a Reference PathElement "foo: { // CompositeSpec with one child and a Literal PathElement "value" : "Rating-&1.value" // OutputtingSpec with a Literal PathElement and one write path } } } } The tree structure of formed by the CompositeSpecs is what is used during Shiftr transforms to do the parallel tree walk with the input data tree. During the parallel tree walk a stack of data (a WalkedPath) is maintained, and used when a tree walk encounters an Outputting spec to evaluate the wildcards in the write DotNotationPath.
    • Constructor Detail

      • ShiftrSpec

        public ShiftrSpec​(java.lang.String rawJsonKey)