Package xbird.xquery.expr

Examples of xbird.xquery.expr.XQExpression.visit()


    }

    public XQExpression visit(DistinctSortExpr expr, XQueryContext ctxt) throws XQueryException {
        XQExpression step = expr.getStepExpr();
        assert (step != null);
        step.visit(this, ctxt);
        boolean isLoopInvariant = step.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(step);
            return hookLoopInvariant(expr);
        }
View Full Code Here


    }

    public XQExpression visit(DocConstructor constructor, XQueryContext ctxt)
            throws XQueryException {
        XQExpression expr = constructor.getExpr();
        expr.visit(this, ctxt);
        boolean isLoopInvariant = expr.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(expr);
            return hookLoopInvariant(constructor);
        }
View Full Code Here

            throws XQueryException {
        boolean isLoopInvariant = true;
        String name = constructor.getElemName();
        if(name == null) {
            XQExpression nameExpr = constructor.getNameExpr();
            nameExpr.visit(this, ctxt);
            isLoopInvariant &= nameExpr.isLoopInvariant();
        }
        for(AttributeConstructorBase att : constructor.getAttributes()) {
            att.visit(this, ctxt);
            isLoopInvariant &= att.isLoopInvariant();
View Full Code Here

        return proxy;
    }

    public XQExpression visit(ExtensionExpr expr, XQueryContext ctxt) throws XQueryException {
        XQExpression e = expr.getExpr();
        e.visit(this, ctxt);
        boolean isLoopInvariant = e.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(e);
            return hookLoopInvariant(expr);
        }
View Full Code Here

    }

    public XQExpression visit(FilterExpr expr, XQueryContext ctxt) throws XQueryException {
        boolean isLoopInvariant = true;
        XQExpression e = expr.getSourceExpr();
        e.visit(this, ctxt);
        isLoopInvariant &= e.isLoopInvariant();
        for(XQExpression p : expr.getPredicates()) {
            p.visit(this, ctxt);
            isLoopInvariant &= p.isLoopInvariant();
        }
View Full Code Here

            isLoopInvariant &= filteredRet2.isLoopInvariant();
        } else {
            // #2-1 where filtering
            XQExpression where = flwr.getWhereExpr();
            if(where != null) {
                where.visit(this, ctxt);
                isLoopInvariant &= where.isLoopInvariant();
            }
            // #2-2 return
            XQExpression ret = flwr.getReturnExpr();
            assert (ret != null);
View Full Code Here

                isLoopInvariant &= where.isLoopInvariant();
            }
            // #2-2 return
            XQExpression ret = flwr.getReturnExpr();
            assert (ret != null);
            ret.visit(this, ctxt);
            isLoopInvariant &= ret.isLoopInvariant();
        }
        // #3 order by sorting
        for(OrderSpec o : flwr.getOrderSpecs()) {
            o.visit(this, ctxt);
View Full Code Here

    public XQExpression visit(IfExpr expr, XQueryContext ctxt) throws XQueryException {
        boolean isLoopInvariant = true;
        // if
        XQExpression cond = expr.getCondExpr();
        cond.visit(this, ctxt);
        isLoopInvariant &= cond.isLoopInvariant();
        // then
        XQExpression then = expr.getThenExpr();
        then.visit(this, ctxt);
        isLoopInvariant &= then.isLoopInvariant();
View Full Code Here

        XQExpression cond = expr.getCondExpr();
        cond.visit(this, ctxt);
        isLoopInvariant &= cond.isLoopInvariant();
        // then
        XQExpression then = expr.getThenExpr();
        then.visit(this, ctxt);
        isLoopInvariant &= then.isLoopInvariant();
        // else
        XQExpression els = expr.getElseExpr();
        els.visit(this, ctxt);
        isLoopInvariant &= els.isLoopInvariant();
View Full Code Here

        XQExpression then = expr.getThenExpr();
        then.visit(this, ctxt);
        isLoopInvariant &= then.isLoopInvariant();
        // else
        XQExpression els = expr.getElseExpr();
        els.visit(this, ctxt);
        isLoopInvariant &= els.isLoopInvariant();
        if(isLoopInvariant) {
            removeInvariants(cond);
            removeInvariants(then);
            removeInvariants(els);
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.