Examples of oneTimeIterator()


Examples of lupos.datastructures.queryresult.QueryResult.oneTimeIterator()

      for (final TriplePattern tp : this.triplePatterns) {

        final QueryResult zQueryResult = queryResult;

        final Iterator<Bindings> itb = new ImmutableIterator<Bindings>() {
          Iterator<Bindings> oldBindings = zQueryResult.oneTimeIterator();
          Bindings currentBindings = null;
          Iterator<Triple> newTriples = null;
          Bindings next = null;

          @Override
View Full Code Here

Examples of lupos.datastructures.queryresult.QueryResult.oneTimeIterator()

      for (final TriplePattern tp : this.triplePatterns) {

        final QueryResult zQueryResult = queryResult;

        final Iterator<Bindings> itb = new ImmutableIterator<Bindings>() {
          Iterator<Bindings> oldBindings = zQueryResult.oneTimeIterator();
          Bindings currentBindings = null;
          Iterator<Triple> newTriples = null;
          Bindings next = null;

          @Override
View Full Code Here

Examples of lupos.datastructures.queryresult.QueryResult.oneTimeIterator()

      final List<QueryResult> operandResults, final boolean moreThanOnce) {
    final Iterator<Bindings>[] ita = new Iterator[operandResults.size()];
    final Iterator<QueryResult> itqr = operandResults.iterator();
    for (int i = 0; i < operandResults.size(); i++) {
      final QueryResult qr = itqr.next();
      ita[i] = (moreThanOnce) ? qr.iterator() : qr.oneTimeIterator();
    }
    return ita;
  }

  protected Iterator<Bindings>[] getArray(
View Full Code Here

Examples of lupos.datastructures.queryresult.QueryResult.oneTimeIterator()

    /*
     * we will not execute this, if using subgraph-submission
     */
    final List<Triple> lst = new LinkedList<Triple>();
    final QueryResult qr = this.sendDirect(key, "SELECT * WHERE {?s ?p ?o}");
    for (final Iterator<Bindings> it = qr.oneTimeIterator(); it.hasNext();) {
      final Bindings bind = it.next();
      final List<Triple> t = bind.getTriples();
      if (t != null) {
        lst.addAll(t);
      }
View Full Code Here

Examples of lupos.datastructures.queryresult.QueryResult.oneTimeIterator()

    // evaluate query:
    final QueryResult qr = evaluator.getResult(query);

    // use oneTimeIterator() whenever the result need to
    // be iterated only once, otherwise iterator()...
    final Iterator<Bindings> it_query = qr.oneTimeIterator();
    while (it_query.hasNext()) {
      // get next solution of the query...
      final Bindings bindings = it_query.next();
      // print out the bound values of all bindings!
      StringBuilder result=new StringBuilder("{");
View Full Code Here

Examples of lupos.datastructures.queryresult.QueryResult.oneTimeIterator()

    final Variable p=new Variable("p");
    final Variable o=new Variable("o");

    int tripleNumber=0;

    final Iterator<Bindings> it=queryResult.oneTimeIterator();
    Bindings lastBindings=null;
    while(it.hasNext()){
      final Bindings b=it.next();

      if(triplesInOneFile>0 && tripleNumber>=triplesInOneFile){
View Full Code Here

Examples of lupos.datastructures.queryresult.QueryResult.oneTimeIterator()

    @Override
    public void run() {
      try {
        while (QueryResultInBlocks.this.queryresultbuffer.hasNext()) {
          final QueryResult queryResult = QueryResultInBlocks.this.queryresultbuffer.get();
          final Iterator<Bindings> ib = queryResult.oneTimeIterator();
          while (ib.hasNext()) {
            final QueryResult queryresult_new = QueryResult
                .createInstance();
            for (int i = 0; i < BLOCKSIZE && ib.hasNext(); i++) {
              queryresult_new.add(ib.next());
View Full Code Here

Examples of lupos.datastructures.queryresult.QueryResult.oneTimeIterator()

   
    System.out.println(qr);

    // use oneTimeIterator() whenever the result need to
    // be iterated only once, otherwise iterator()...
    final Iterator<Bindings> it_query = qr.oneTimeIterator();
    while (it_query.hasNext()) {
      // get next solution of the query...
      final Bindings bindings = it_query.next();
      // print out the bound values of all bindings!
      StringBuilder result=new StringBuilder("{");
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.