Examples of QueryIterNullIterator


Examples of com.hp.hpl.jena.sparql.engine.iterator.QueryIterNullIterator

   * @return A query iterator over the contents of the relation
   */
  public static QueryIterator create(Relation relation,
      Collection<BindingMaker> bindingMakers, ExecutionContext execCxt) {
    if (relation.equals(Relation.EMPTY) || relation.condition().isFalse() || bindingMakers.isEmpty()) {
      return new QueryIterNullIterator(execCxt);
    }
    if (relation.isTrivial()) {
      ArrayList<Binding> bindingList = new ArrayList<Binding>();
      for (BindingMaker bindingMaker: bindingMakers) {
        Binding t = bindingMaker.makeBinding(ResultRow.NO_ATTRIBUTES);
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.iterator.QueryIterNullIterator

   * if optimization is possible (e.g., the relation is empty).
   * @return A query iterator over the contents of the node relation
   */
  public static QueryIterator create(NodeRelation table, ExecutionContext execCxt) {
    if (table.baseRelation().condition().isFalse()) {
      return new QueryIterNullIterator(execCxt);
    }
    if (table.baseRelation().isTrivial()) {
      return QueryIterSingleton.create(
          BindingMaker.createFor(table).makeBinding(ResultRow.NO_ATTRIBUTES),
          execCxt);
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.iterator.QueryIterNullIterator

public class IterLib
{
    public static QueryIterator noResults(ExecutionContext execCxt)
    {
        return new QueryIterNullIterator(execCxt) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.iterator.QueryIterNullIterator

    { }
   
    @Override
    public QueryIterator iterator(ExecutionContext execCxt)
    {
        return new QueryIterNullIterator(execCxt) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.iterator.QueryIterNullIterator

    {
        if ( includeOnNoMatch )
            return QueryIterSingleton.create(bindingLeft, execContext) ;
        else
            // No rows - no match
            return new QueryIterNullIterator(execContext) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.iterator.QueryIterNullIterator

               
        if ( out.size() == 0 && includeOnNoMatch )
            out.add(bindingLeft) ;
       
        if ( out.size() == 0 )
            return new QueryIterNullIterator(execContext) ;
        return new QueryIterPlainWrapper(out.iterator(), execContext) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.iterator.QueryIterNullIterator

            if ( conditions != null )
                matches = conditions.isSatisfied(bindingLeft, execContext) ;
        }
       
        if ( ! matches && ! includeOnNoMatch)
            return new QueryIterNullIterator(execContext) ;
        // Matches, or does not match and it's a left join - return the left binding.
        return QueryIterSingleton.create(bindingLeft, execContext) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.iterator.QueryIterNullIterator

        Node nodeVar = argSubject.getArg() ;
        String pattern = NodeUtils.stringLiteral(argObject.getArg()) ;
        if ( pattern == null )
        {
            Log.warn(this, "Pattern must be a plain literal or xsd:string: "+argObject.getArg()) ;
            return new QueryIterNullIterator(execCxt) ;
        }

        if ( false )
            // Old (ARQ 1) way - not recommended.
            return buildSyntax(input, nodeVar, pattern, execCxt) ;
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.iterator.QueryIterNullIterator

    // Subject is bound : still two cases: object bound (do a check) and object unbound (assign the local name)
    private QueryIterator execFixedSubject(Node nodeURI, Node nodeLocalname, Binding binding, ExecutionContext execCxt)
    {
        if ( ! nodeURI.isURI() )
            // Subject bound but not a URI
            return new QueryIterNullIterator(execCxt) ;

        // Subject is bound and a URI - get the localname as a Node
        Node localname = Node.createLiteral(nodeURI.getLocalName()) ;
       
        // Object - unbound variable or a value?
        if ( ! nodeLocalname.isVariable() )
        {
            // Object bound or a query constant.  Is it the same as the calculated value?
            if ( nodeLocalname.equals(localname) )
                // Same
                return QueryIterSingleton.create(binding, execCxt) ;
            // No - different - no match.
            return new QueryIterNullIterator(execCxt) ;
        }
       
        // Object unbound variable - assign the localname to it.
        return QueryIterSingleton.create(binding, Var.alloc(nodeLocalname), localname, execCxt) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.engine.iterator.QueryIterNullIterator

    {
        if ( ! nodeLocalname.isVariable() )
        {
            if ( ! nodeLocalname.isLiteral() )
                // Not a variable, not a literal=> can't match
                return new QueryIterNullIterator(execCxt) ;
       
            if( ! NodeUtils.isStringLiteral(nodeLocalname) )
                // If a typed literal, must be XSD string.
                return new QueryIterNullIterator(execCxt) ;
        }
       
        //Set bindings = new HashSet() ;    // Use a Set if you want unique results.
        List<Binding> bindings = new ArrayList<Binding>() ;   // Use a list if you want counting results.
        Graph graph = execCxt.getActiveGraph() ;
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.