Package com.hp.hpl.jena.sparql.expr

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


        return new OpTriple(t2) ;
    }
   
    @Override public Op transform(OpFilter opFilter, Op subOp)
    {
        ExprList exprList = opFilter.getExprs() ;
        ExprList exprList2 = NodeTransformLib.transform(transform, exprList) ;
        if ( exprList2 == exprList )
            return super.transform(opFilter, subOp) ;
        return OpFilter.filter(exprList2, subOp) ;
    }       
View Full Code Here


        return opTable ;
    }
   
    @Override public Op transform(OpLeftJoin opLeftJoin, Op left, Op right)
    {
        ExprList exprList = opLeftJoin.getExprs() ;
        ExprList exprList2 = exprList ;
        if ( exprList != null )
            exprList2 = NodeTransformLib.transform(transform, exprList) ;
        if ( exprList2 == exprList )
            return super.transform(opLeftJoin, left, right) ;
        return OpLeftJoin.create(left, right, exprList2) ;
View Full Code Here

        {
            start(opFilter, NoNL) ;
//            int x = out.getCurrentOffset() ;
//            out.incIndent(x) ;
           
            ExprList exprs = opFilter.getExprs() ;
            if ( exprs == null )
            { start() ; finish() ; }
            else
                WriterExpr.output(out, exprs, sContext) ;
            out.println();
View Full Code Here

    public boolean isList()             { return argList != null  ; }
    public boolean isNode()             { return arg != null  ; }
   
    public ExprList asExprList(PropFuncArg pfArg)
    {
        ExprList exprList = new ExprList() ;
        if ( pfArg.isNode() )
        {
            Node n = pfArg.getArg() ;
            Expr expr = ExprUtils.nodeToExpr(n) ;
            exprList.add(expr) ;
            return exprList ;
        }
       
        for ( Iterator<Node> iter = pfArg.getArgList().iterator() ; iter.hasNext() ; )
        {
            Node n = iter.next() ;
            Expr expr = ExprUtils.nodeToExpr(n) ;
            exprList.add(expr) ;
        }
        return exprList ;
    }
View Full Code Here

  private final List<Triple> bgp;
  private final SecNode graphIRI;
 
  private static ExprList createArgs( List<Node> variables )
  {
    ExprList retval = new ExprList();
    for (Node n : variables )
    {
      retval.add( new ExprVar( n ));
    }
    return retval;
  }
View Full Code Here

   
    rewriter.visit( new OpBGP( BasicPattern.wrap(Arrays.asList(triples))));
    Op op = rewriter.getResult();
    Assert.assertTrue( "Should have been an OpFilter", op instanceof OpFilter );
    OpFilter filter = (OpFilter) op;
    ExprList eLst = filter.getExprs();
    Assert.assertEquals( 1, eLst.size());
    Assert.assertTrue( "Should have been a SecuredFunction", eLst.get(0) instanceof SecuredFunction);
    op = filter.getSubOp();
    Assert.assertTrue( "Should have been a OpBGP", op instanceof OpBGP);
    BasicPattern basicPattern = ((OpBGP)op).getPattern();
    Assert.assertEquals( 3, basicPattern.size() );
   
View Full Code Here

        else
            acc.add(opUnion.getRight()) ;
    }

    protected QueryIterator execute(OpFilter opFilter, QueryIterator input) {
        ExprList exprs = opFilter.getExprs() ;

        Op base = opFilter.getSubOp() ;
        QueryIterator qIter = exec(base, input) ;

        for (Expr expr : exprs)
View Full Code Here

    public TransformFilterPlacementConservative( ) {}

    @Override
    public Op transform(OpFilter opFilter, Op x) {
        // Destructive use of exprs - copy it.
        ExprList exprs = ExprList.copy(opFilter.getExprs());
        Set<Var> varsScope = new HashSet<>();

        Op op = transform(exprs, varsScope, x);
        if (op == x)
            // Didn't do anything.
View Full Code Here

    public boolean isList()             { return argList != null  ; }
    public boolean isNode()             { return arg != null  ; }
   
    public ExprList asExprList(PropFuncArg pfArg)
    {
        ExprList exprList = new ExprList() ;
        if ( pfArg.isNode() )
        {
            Node n = pfArg.getArg() ;
            Expr expr = ExprUtils.nodeToExpr(n) ;
            exprList.add(expr) ;
            return exprList ;
        }

        for ( Node n : pfArg.getArgList() )
        {
            Expr expr = ExprUtils.nodeToExpr( n );
            exprList.add( expr );
        }
        return exprList ;
    }
View Full Code Here

        }
       
        @Override
        public Op transform(OpFilter filter, Op op)
        {
            ExprList exprs = filter.getExprs().copySubstitute(binding) ;
            if ( exprs == filter.getExprs() )
                return filter ;
            return OpFilter.filter(exprs, op) ;
        }
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.expr.ExprList

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.