Package xbird.xquery.expr

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


        if(variable.getResult() == null) {
            XQExpression e = variable.getValue();
            if(e == null) {
                return variable;
            }
            e.visit(this, ctxt);
            isLoopInvariant = e.isLoopInvariant();
            if(isLoopInvariant) {
                removeInvariants(e);
            }
        }
View Full Code Here


        return expr;
    }

    public XQExpression visit(XQueryModule module, XQueryContext ctxt) throws XQueryException {
        XQExpression body = module.getExpression();
        body.visit(this, ctxt);
        return null;
    }

    public XQExpression visit(XQExpression expr, XQueryContext ctxt) throws XQueryException {
        if(expr instanceof AdditiveExpr) {
View Full Code Here

                            }
                            _detected = true;
                            return path;
                        }
                    }
                    step.visit(this, ctxt);
                }
            }
            super.visit(path, ctxt);
            return path;
        }
View Full Code Here

                assert (filterExpr != null);
                srcExpr.visit(this, ctxt);
                if(srcExpr == _target) {
                    variable.setValue(filterExpr);
                }
                filterExpr.visit(this, ctxt);
            }
            return variable;
        }

        @Override
View Full Code Here

                } else {
                    nodeps.add(andExpr);
                }
            }
        } else {
            whereExpr.visit(dependancyChecker, null);
            if(dependancyChecker.hasDependancy()) {
                dependancies.put(dependancyChecker.getDependent(), whereExpr);
            } else {
                nodeps.add(whereExpr);
            }
View Full Code Here

     */
    private static XQExpression applyIfCondPullup(final FLWRExpr flwr) throws XQueryException {
        final XQExpression retExpr = flwr.getFilteredReturnExpr();
        if(retExpr instanceof IfExpr) {
            final DependancyChecker dependancyChecker = new DependancyChecker(flwr.getClauses());
            retExpr.visit(dependancyChecker, null);
            if(!dependancyChecker.hasDependancy()) {
                final IfExpr ifExpr = (IfExpr) retExpr;
                flwr._filteredReturnExpr = ifExpr.getThenExpr();
                flwr.setReturnExpr(null);
                ifExpr.setThenExpr(flwr);
View Full Code Here

*/
public abstract class AbstractXQueryParserVisitor implements XQueryParserVisitor {

    public XQExpression visit(AdditiveExpr op, XQueryContext ctxt) throws XQueryException {
        XQExpression left = op.getLeftOperand();
        left.visit(this, ctxt);
        XQExpression right = op.getRightOperand();
        right.visit(this, ctxt);
        return op;
    }

View Full Code Here

    public XQExpression visit(AdditiveExpr op, XQueryContext ctxt) throws XQueryException {
        XQExpression left = op.getLeftOperand();
        left.visit(this, ctxt);
        XQExpression right = op.getRightOperand();
        right.visit(this, ctxt);
        return op;
    }

    public XQExpression visit(AndExpr expr, XQueryContext ctxt) throws XQueryException {
        for(XQExpression e : expr.getExpressions()) {
View Full Code Here

    public XQExpression visit(AttributeConstructor constructor, XQueryContext ctxt)
            throws XQueryException {
        final QualifiedName name = constructor.getName();
        if(name == null) {
            XQExpression nameExpr = constructor.getNameExpr();
            nameExpr.visit(this, ctxt);
        }
        for(XQExpression v : constructor.getValueExprs()) {
            v.visit(this, ctxt);
        }
        return constructor;
View Full Code Here

        return null;
    }

    public XQExpression visit(CaseClause clause, XQueryContext ctxt) throws XQueryException {
        XQExpression e = clause.getReturnExpr();
        e.visit(this, ctxt);
        return clause;
    }

    public XQExpression visit(CastableExpr expr, XQueryContext ctxt) throws XQueryException {
        XQExpression e = expr.getExpression();
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.