Examples of ExprList


Examples of com.hp.hpl.jena.sparql.expr.ExprList

        // Algebra operations that involve an Expr, and so might include NOT EXISTS
       
        @Override
        public void visit(OpFilter opFilter)
        {
            ExprList ex = new ExprList() ;
            boolean changed = false ;
            for ( Expr e : opFilter.getExprs() )
            {
                Expr e2 = ExprTransformer.transform(exprTransform, e) ;
                ex.add(e2) ;
                if ( e != e2 )
                    changed = true ;
            }
            OpFilter f = opFilter ;
            if ( changed )
View Full Code Here

Examples of com.hp.hpl.jena.sparql.expr.ExprList

    {
        if ( ! doFilterPlacement )
            return super.transform(opFilter, x) ;
       
        // Destructive use of exprs - copy it.
        ExprList exprs = new ExprList(opFilter.getExprs()) ;
        Set<Var> varsScope = new HashSet<Var>() ;
       
        Op op = transform(exprs, varsScope, x) ;
        if ( op == x )
            // Didn't do anything.
View Full Code Here

Examples of com.hp.hpl.jena.sparql.expr.ExprList

        return new OpLeftJoin(left, right, exprs) ;
    }
   
    public static Op create(Op left, Op right, Expr expr)
    {
        return new OpLeftJoin(left, right, expr == null ? null : new ExprList(expr)) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.expr.ExprList

            acc.add( opUnion.getRight() ) ;
    }
   
    protected QueryIterator execute(OpFilter opFilter, QueryIterator input)
    {
        ExprList exprs = opFilter.getExprs() ;
       
        Op base = opFilter.getSubOp() ;
        QueryIterator qIter = executeOp(base, input) ;

        for ( Expr expr : exprs )
View Full Code Here

Examples of com.hp.hpl.jena.sparql.expr.ExprList

    public TransformFilterPlacement(boolean includeBGPs)
    { this.includeBGPs = includeBGPs ; }

    @Override
    public Op transform(OpFilter opFilter, Op x) {
        ExprList exprs = opFilter.getExprs() ;
        Placement placement = transform(exprs, x) ;
        if ( placement == null
            // Didn't do anything.
            return super.transform(opFilter, x) ;
        Op op = buildFilter(placement) ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.expr.ExprList

            return transform(input.getExprs(), input.getSubOp()) ;
       
        // Thrown the filter expressions into the general list to be placed.
        // Add to keep the application order (original filter then additional exprs)
        // Not important, but nice.
        ExprList exprs2 = ExprList.copy(input.getExprs()) ;
        exprs2.addAll(exprs);
        return transform(exprs2, input.getSubOp()) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.expr.ExprList

    // An improvement might be to put any filters that apply to exactly one triple
    // directly on the triple pattern.  At the moment, the filter is put over
    // the block leading up to the triple pattern.
   
    private static Placement placeBGP(ExprList exprsIn, BasicPattern pattern) {
        ExprList exprs = ExprList.copy(exprsIn) ;
        Set<Var> patternVarsScope = DS.set() ;
        // Any filters that depend on no variables.
        Op op = insertAnyFilter$(exprs, patternVarsScope, null) ;

        for (Triple triple : pattern) {
View Full Code Here

Examples of com.hp.hpl.jena.sparql.expr.ExprList

     * but do not break up the BasicPattern in any way.
     */
    private Placement wrapBGP(ExprList exprsIn, BasicPattern pattern) {
        Set<Var> vs = DS.set();
        VarUtils.addVars(vs, pattern);
        ExprList pushed = new ExprList();
        ExprList unpushed = new ExprList();
        for (Expr e : exprsIn) {
            Set<Var> eVars = e.getVarsMentioned();
            if (vs.containsAll(eVars))
                pushed.add(e);
            else
                unpushed.add(e);
        }
       
        // Can't push anything into a filter around this BGP
        if (pushed.size() == 0) return null;
       
View Full Code Here

Examples of com.hp.hpl.jena.sparql.expr.ExprList

        else
            return wrapQuadPattern(exprsIn, graphNode, pattern) ;
    }
   
    private static Placement placeQuadPattern(ExprList exprsIn, Node graphNode, BasicPattern pattern) {
        ExprList exprs = ExprList.copy(exprsIn) ;
        Set<Var> patternVarsScope = DS.set() ;
        // Any filters that depend on no variables.

        if ( Var.isVar(graphNode) ) {
            // Add in the graph node of the quad block.
View Full Code Here

Examples of com.hp.hpl.jena.sparql.expr.ExprList

    private static Placement wrapQuadPattern(ExprList exprsIn, Node graphNode, BasicPattern pattern) {
        Set<Var> vs = DS.set();
        VarUtils.addVars(vs, pattern);
        if (Var.isVar(graphNode))
            vs.add(Var.alloc(graphNode));
        ExprList pushed = new ExprList();
        ExprList unpushed = new ExprList();
        for (Expr e : exprsIn) {
            Set<Var> eVars = e.getVarsMentioned();
            if (vs.containsAll(eVars)) {
                pushed.add(e);
            } else {
                unpushed.add(e);
            }
        }

        // Can't push anything into a filter around this quadpattern
        if (pushed.size() == 0) return null;
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.