Examples of LiteralPathElement


Examples of com.bazaarvoice.jolt.common.pathelement.LiteralPathElement

    public Object transform( Object input ) {

        Map<String,Object> output = new HashMap<String,Object>();

        // Create a root LiteralPathElement so that # is useful at the root level
        LiteralPathElement rootLpe = new LiteralPathElement( ROOT_KEY );
        WalkedPath walkedPath = new WalkedPath();
        walkedPath.add( rootLpe );

        rootSpec.apply( ROOT_KEY, input, walkedPath, output );
View Full Code Here

Examples of com.bazaarvoice.jolt.common.pathelement.LiteralPathElement

        }
        else if ( key.contains("*") ) {
            return Arrays.<PathElement>asList( new StarRegexPathElement( key ) );
        }
        else {
            return Arrays.<PathElement>asList( new LiteralPathElement( key ) );
        }
    }
View Full Code Here

Examples of com.bazaarvoice.jolt.common.pathelement.LiteralPathElement

     * @return true if this this spec "handles" the inputKey such that no sibling specs need to see it
     */
    @Override
    public boolean apply( String inputKey, Object input, WalkedPath walkedPath, Map<String,Object> output )
    {
        LiteralPathElement thisLevel = pathElement.match( inputKey, walkedPath );
        if ( thisLevel == null ) {
            return false;
        }

        // add ourselves to the path, so that our children can reference us
View Full Code Here

Examples of com.bazaarvoice.jolt.common.pathelement.LiteralPathElement

     * @return true if this this spec "handles" the inputkey such that no sibling specs need to see it
     */
    @Override
    public boolean apply( String inputKey, Object input, WalkedPath walkedPath, Map<String,Object> output ){

        LiteralPathElement thisLevel = pathElement.match( inputKey, walkedPath );
        if ( thisLevel == null ) {
            return false;
        }

        Object data;
View Full Code Here

Examples of com.bazaarvoice.jolt.common.pathelement.LiteralPathElement

     * @return true if this this spec "handles" the inputkey such that no sibling specs need to see it
     */
    @Override
    public boolean apply( String inputKey, Object input, WalkedPath walkedPath, Object parentContainer ) {

        LiteralPathElement thisLevel = getMatch( inputKey, walkedPath );
        if ( thisLevel == null ) {
            return false;
        }
        performCardinalityAdjustment( inputKey, input, walkedPath, (Map) parentContainer, thisLevel );
        return true;
View Full Code Here

Examples of com.bazaarvoice.jolt.common.pathelement.LiteralPathElement

     *
     * @return null if no work was done, otherwise returns the re-parented data
     */
    public Object applyToParentContainer ( String inputKey, Object input, WalkedPath walkedPath, Object parentContainer ) {

        LiteralPathElement thisLevel = getMatch( inputKey, walkedPath );
        if ( thisLevel == null ) {
            return null;
        }
        return performCardinalityAdjustment( inputKey, input, walkedPath, (Map) parentContainer, thisLevel );
    }
View Full Code Here

Examples of com.bazaarvoice.jolt.common.pathelement.LiteralPathElement

     *
     * @return true if this this spec "handles" the inputkey such that no sibling specs need to see it
     */
    @Override
    public boolean apply( String inputKey, Object input, WalkedPath walkedPath, Object parentContainer ) {
        LiteralPathElement thisLevel = pathElement.match( inputKey, walkedPath );
        if ( thisLevel == null ) {
            return false;
        }

        walkedPath.add( thisLevel );
View Full Code Here

Examples of com.bazaarvoice.jolt.common.pathelement.LiteralPathElement

            else {
                return Arrays.<PathElement>asList( new StarRegexPathElement( key ) );
            }
        }
        else {
            return Arrays.<PathElement>asList( new LiteralPathElement( key ) );
        }
    }
View Full Code Here

Examples of com.bazaarvoice.jolt.common.pathelement.LiteralPathElement

    public Object transform( Object input ) {

        Map<String,Object> output = new HashMap<String,Object>();

        // Create a root LiteralPathElement so that # is useful at the root level
        LiteralPathElement rootLpe = new LiteralPathElement( ROOT_KEY );
        WalkedPath walkedPath = new WalkedPath();
        walkedPath.add( rootLpe );

        rootSpec.apply( ROOT_KEY, input, walkedPath, output );
View Full Code Here

Examples of com.bazaarvoice.jolt.common.pathelement.LiteralPathElement

     * @return true if this this spec "handles" the inputkey such that no sibling specs need to see it
     */
    @Override
    public boolean apply( String inputKey, Object input, WalkedPath walkedPath, Map<String,Object> output ){

        LiteralPathElement thisLevel = pathElement.match( inputKey, walkedPath );
        if ( thisLevel == null ) {
            return false;
        }

        Object data;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.