Package com.hp.hpl.jena.sparql.algebra.op

Examples of com.hp.hpl.jena.sparql.algebra.op.OpBGP


    static boolean doFilterPlacement = true ;
   
    public static Op transform(ExprList exprs, BasicPattern bgp)
    {
        if ( ! doFilterPlacement )
            return OpFilter.filter(exprs, new OpBGP(bgp)) ;
        // Mutated
        ExprList exprs2 = new ExprList(exprs) ;
        Op op = transformFilterBGP(exprs2, new HashSet<Var>(), bgp) ;
        // Remaining filters? e.g. ones mentioning var s not used anywhere.
        op = buildFilter(exprs2, op) ;
View Full Code Here


        // Any filters that depend on no variables.
        Op op = insertAnyFilter(exprs, patternVarsScope, null) ;
       
        for ( Triple triple : pattern )
        {
            OpBGP opBGP = getBGP(op) ;
            if ( opBGP == null )
            {
                // Last thing was not a BGP (so it likely to be a filter)
                // Need to pass the results from that into the next triple.
                // Which is a join and sequence is a special case of join
                // which always evaluates by passing results of the early
                // part into the next element of the sequence.
               
                opBGP = new OpBGP() ;   
                op = OpSequence.create(op, opBGP) ;
            }
           
            opBGP.getPattern().add(triple) ;
            // Update variables in scope.
            VarUtils.addVarsFromTriple(patternVarsScope, triple) ;
           
            // Attempt to place any filters
            op = insertAnyFilter(exprs, patternVarsScope, op) ;
View Full Code Here

   */
  @Override
  public Op transform(OpBGP opBGP) {
    BasicPattern pattern = opBGP.getPattern();
    BasicPattern pattern2 = this.reorder.reorder(pattern);
    return new OpBGP(pattern2);
  }
View Full Code Here

    static private Op flush(BasicPattern bp, Op op)
    {
        if ( bp == null || bp.isEmpty() )
            return op ;
       
        OpBGP opBGP = new OpBGP(bp) ;
        op = OpSequence.create(op, opBGP) ;
        return op ;
    }
View Full Code Here

        // Find the triples invoking property functions, and those not.
        findPropertyFunctions(context, pattern, registry, propertyFunctionTriples) ;
       
        if ( propertyFunctionTriples.size() == 0 )
            //No property functions.
            return new OpBGP(pattern) ;
       
        Map<Triple, PropertyFunctionInstance> pfInvocations = new HashMap<Triple, PropertyFunctionInstance>() // Map triple => property function instance
        // Removes triples of list arguments.  This mutates 'triples'
        findPropertyFunctionArgs(context, triples, propertyFunctionTriples, pfInvocations) ;
       
View Full Code Here

        {
            if ( op == null )
                return OpTable.unit() ;
            return op ;
        }
        OpBGP opBGP = new OpBGP(pattern) ;
        return OpSequence.create(op, opBGP) ;
    }
View Full Code Here

        Triple triple = new Triple(s, p ,o) ;
       
        // Evaluate as an algebra expression
        BasicPattern pattern = new BasicPattern() ;
        pattern.add(triple) ;
        Op op = new OpBGP(pattern) ;
        Plan plan = factory.create(op, getDataset(), BindingRoot.create(), null) ;
       
        QueryIterator qIter = plan.iterator() ;
        //List<Triple> triples = new ArrayList<Triple>() ;
        List<Triple> triples = new ArrayList<Triple>() ;
View Full Code Here

    static boolean doFilterPlacement = true ;
   
    public static Op transform(ExprList exprs, BasicPattern bgp)
    {
        if ( ! doFilterPlacement )
            return OpFilter.filter(exprs, new OpBGP(bgp)) ;
        // Mutated
        ExprList exprs2 = new ExprList(exprs) ;
        Op op = transformFilterBGP(exprs2, new HashSet<Var>(), bgp) ;
        // Remaining filters? e.g. ones mentioning var s not used anywhere.
        op = buildFilter(exprs2, op) ;
View Full Code Here

        // Any filters that depend on no variables.
        Op op = insertAnyFilter(exprs, patternVarsScope, null) ;
       
        for ( Triple triple : pattern )
        {
            OpBGP opBGP = getBGP(op) ;
            if ( opBGP == null )
            {
                // Last thing was not a BGP (so it likely to be a filter)
                // Need to pass the results from that into the next triple.
                // Which is a join and sequence is a special case of join
                // which always evaluates by passing results of the early
                // part into the next element of the sequence.
               
                opBGP = new OpBGP() ;   
                op = OpSequence.create(op, opBGP) ;
            }
           
            opBGP.getPattern().add(triple) ;
            // Update variables in scope.
            VarUtils.addVarsFromTriple(patternVarsScope, triple) ;
           
            // Attempt to place any filters
            op = insertAnyFilter(exprs, patternVarsScope, op) ;
View Full Code Here

    @Test
    public void testNumericTimeout() {
        BasicPattern basicPattern = new BasicPattern();
        basicPattern.add(Triple.ANY);
        Node serviceNode = NodeFactory.createURI(SERVICE);
        OpService opService = new OpService(serviceNode, new OpBGP(basicPattern), false);

        Context context = new Context();
        ARQ.setNormalMode(context);

        context.set(Service.queryTimeout, 10);
View Full Code Here

TOP

Related Classes of com.hp.hpl.jena.sparql.algebra.op.OpBGP

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.