Package org.jboss.dna.jcr.xpath.XPath

Examples of org.jboss.dna.jcr.xpath.XPath.Component


    protected Component parseXPath( TokenStream tokens ) {
        return parseExpr(tokens);
    }

    protected Component parseExpr( TokenStream tokens ) {
        Component result = parseExprSingle(tokens);
        if (tokens.matches(',')) {
            throw new ParsingException(tokens.nextPosition(), "Multiple XPath expressions are not supported");
        }
        return result;
    }
View Full Code Here


        }
        return parseOrExpr(tokens);
    }

    protected Component parseOrExpr( TokenStream tokens ) {
        Component result = parseAndExpr(tokens);
        while (tokens.canConsume("or")) {
            result = new Or(result, parseInstanceofExpr(tokens));
        }
        return result;
    }
View Full Code Here

        }
        return result;
    }

    protected Component parseAndExpr( TokenStream tokens ) {
        Component result = parseInstanceofExpr(tokens);
        while (tokens.canConsume("and")) {
            result = new And(result, parseInstanceofExpr(tokens));
        }
        return result;
    }
View Full Code Here

        }
        return result;
    }

    protected Component parseInstanceofExpr( TokenStream tokens ) {
        Component result = parseTreatExpr(tokens);
        if (tokens.matches("instance", "of")) {
            throw new ParsingException(tokens.nextPosition(), "XPath 'instance of' expressions are not supported");
        }
        return result;
    }
View Full Code Here

        }
        return result;
    }

    protected Component parseTreatExpr( TokenStream tokens ) {
        Component result = parseCastableExpr(tokens);
        if (tokens.matches("treat", "as")) {
            throw new ParsingException(tokens.nextPosition(), "XPath 'treat as' expressions are not supported");
        }
        return result;
    }
View Full Code Here

        }
        return result;
    }

    protected Component parseCastableExpr( TokenStream tokens ) {
        Component result = parseCastExpr(tokens);
        if (tokens.matches("castable", "as")) {
            throw new ParsingException(tokens.nextPosition(), "XPath 'castable as' expressions are not supported");
        }
        return result;
    }
View Full Code Here

        }
        return result;
    }

    protected Component parseCastExpr( TokenStream tokens ) {
        Component result = parseComparisonExpr(tokens);
        if (tokens.matches("cast", "as")) {
            throw new ParsingException(tokens.nextPosition(), "XPath 'cast as' expressions are not supported");
        }
        return result;
    }
View Full Code Here

        }
        return result;
    }

    protected Component parseComparisonExpr( TokenStream tokens ) {
        Component result = parseRangeExpr(tokens);
        // General comparison is optional ...
        Operator operator = parseGeneralComp(tokens);
        if (operator == null) parseValueComp(tokens);
        if (operator != null) {
            return new Comparison(result, operator, parseRangeExpr(tokens));
View Full Code Here

        }
        return null;
    }

    protected Component parseRangeExpr( TokenStream tokens ) {
        Component result = parseAdditiveExpr(tokens);
        if (tokens.matches("to")) {
            throw new ParsingException(tokens.nextPosition(), "XPath range expressions with 'to' are not supported");
        }
        return result;
    }
View Full Code Here

        }
        return result;
    }

    protected Component parseAdditiveExpr( TokenStream tokens ) {
        Component result = parseMultiplicativeExpr(tokens);
        while (true) {
            if (tokens.canConsume("+")) {
                result = new Add(result, parseMultiplicativeExpr(tokens));
            } else if (tokens.canConsume("-")) {
                result = new Subtract(result, parseMultiplicativeExpr(tokens));
View Full Code Here

TOP

Related Classes of org.jboss.dna.jcr.xpath.XPath.Component

Copyright © 2018 www.massapicom. 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.