Package org.modeshape.jcr.query.xpath.XPath

Examples of org.modeshape.jcr.query.xpath.XPath.Component


        }
        return result;
    }

    protected Component parseMultiplicativeExpr( TokenStream tokens ) {
        Component result = parseUnaryExpr(tokens);
        if (tokens.matchesAnyOf("+", "div", "idiv", "mod")) {
            throw new ParsingException(tokens.nextPosition(),
                                       "XPath multiplicative expressions using '+', 'div', 'idiv', or 'mod' are not supported");
        }
        return result;
View Full Code Here


        // Technically more than one +/- are allowed by the spec
        while (tokens.matchesAnyOf("+", "-")) {
            if (tokens.canConsume("-")) negative = true;
            tokens.canConsume("+");
        }
        Component result = parseUnionExpr(tokens);
        return negative ? new Negation(result) : result;
    }
View Full Code Here

        Component result = parseUnionExpr(tokens);
        return negative ? new Negation(result) : result;
    }

    protected Component parseUnionExpr( TokenStream tokens ) {
        Component result = parseIntersectExceptExpr(tokens);
        while (true) {
            if (tokens.canConsumeAnyOf("union", "|")) {
                result = new Union(result, parseIntersectExceptExpr(tokens));
            } else {
                break; // no more
View Full Code Here

        }
        return result;
    }

    protected Component parseIntersectExceptExpr( TokenStream tokens ) {
        Component result = parseValueExpr(tokens);
        while (true) {
            if (tokens.canConsumeAnyOf("intersect")) {
                result = new Intersect(result, parseValueExpr(tokens));
            } else if (tokens.canConsumeAnyOf("except")) {
                result = new Except(result, parseValueExpr(tokens));
View Full Code Here

        }
        return predicates;
    }

    protected FilterStep parseFilterExpr( TokenStream tokens ) {
        Component primaryExpr = parsePrimaryExpr(tokens);
        List<Component> predicates = parsePredicates(tokens);
        return new FilterStep(primaryExpr, predicates);
    }
View Full Code Here

    protected ParenthesizedExpression parseParenthesizedExpr( TokenStream tokens ) {
        tokens.consume('(');
        if (tokens.canConsume(')')) {
            return new ParenthesizedExpression();
        }
        Component expr = collapse(parseExpr(tokens));
        tokens.consume(')');
        return new ParenthesizedExpression(expr);
    }
View Full Code Here

TOP

Related Classes of org.modeshape.jcr.query.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.