public TupleQueryResult getQueryResult() { return new IteratingTupleQueryResult(bindingNames, bindingSetList); } }
@Override protected void handleClose() throws QueryEvaluationException { try { super.handleClose(); } finally { queue.done(); } try { finishedParsing.await(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } finally { queue.checkException(); } }
getBindings(), getIncludeInferred(), getMaxExecutionTime()); bindingsIter2 = enforceMaxQueryTime(bindingsIter1); result = new IteratingTupleQueryResult(new ArrayList<>(tupleExpr.getBindingNames()), bindingsIter2); allGood = true; try { if (result != null) { result.close();
getBindings(), getIncludeInferred(), getMaxExecutionTime()); bindingsIter2 = enforceMaxQueryTime(bindingsIter1); result = new IteratingTupleQueryResult(new ArrayList<>(tupleExpr.getBindingNames()), bindingsIter2); allGood = true; try { if (result != null) { result.close();
public TupleQueryResult getQueryResult() { return new IteratingTupleQueryResult(bindingNames, bindingSetList); } }
bindingsIter2 = enforceMaxQueryTime(bindingsIter1); result = new IteratingTupleQueryResult(new ArrayList<String>(tupleExpr.getBindingNames()), bindingsIter2); allGood = true; try { if (result != null) { result.close();
@Override protected void handleClose() throws QueryEvaluationException { try { super.handleClose(); } finally { queue.done(); } try { finishedParsing.await(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); } finally { queue.checkException(); } }
public TupleQueryResult getQueryResult() { return new IteratingTupleQueryResult(bindingNames, bindingSetList); } }
new IteratingTupleQueryResult(columnNames, contexts)); model.put(QueryResultView.FILENAME_HINT_KEY, "contexts"); model.put(QueryResultView.FACTORY_KEY, factory);
/** * Returns a {@link TupleQueryResult} that returns at most the specified maximum number of solutions, * starting at the supplied offset. * * @param queryResult * a query result possibly containing more solutions than the specified maximum. * @param limit * the maximum number of solutions to return. If set to 0 or lower, no limit will be applied. * @param offset * the number of solutions to skip at the beginning. If set to 0 or lower, no offset will be * applied. * @return A {@link TupleQueryResult} that will at return at most the specified maximum number of * solutions. If neither {@code limit} nor {@code offset} are applied, this returns the original * {@code queryResult}. */ public static TupleQueryResult limitResults(TupleQueryResult queryResult, long limit, long offset) { CloseableIteration<BindingSet, QueryEvaluationException> iter = queryResult; if (offset > 0) { iter = new OffsetIteration<>(iter, offset); } if (limit > 0) { iter = new LimitIteration<>(iter, limit); } if (!(iter instanceof TupleQueryResult)) { return new IteratingTupleQueryResult(queryResult.getBindingNames(), iter); } return (TupleQueryResult)iter; }
/** * Returns a {@link TupleQueryResult} that returns at most the specified maximum number of solutions, * starting at the supplied offset. * * @param queryResult * a query result possibly containing more solutions than the specified maximum. * @param limit * the maximum number of solutions to return. If set to 0 or lower, no limit will be applied. * @param offset * the number of solutions to skip at the beginning. If set to 0 or lower, no offset will be * applied. * @return A {@link TupleQueryResult} that will at return at most the specified maximum number of * solutions. If neither {@code limit} nor {@code offset} are applied, this returns the original * {@code queryResult}. */ public static TupleQueryResult limitResults(TupleQueryResult queryResult, long limit, long offset) { CloseableIteration<BindingSet, QueryEvaluationException> iter = queryResult; if (offset > 0) { iter = new OffsetIteration<>(iter, offset); } if (limit > 0) { iter = new LimitIteration<>(iter, limit); } if (!(iter instanceof TupleQueryResult)) { return new IteratingTupleQueryResult(queryResult.getBindingNames(), iter); } return (TupleQueryResult)iter; }
/** * Returns a {@link TupleQueryResult} that returns at most the specified maximum number of solutions, * starting at the supplied offset. * * @param queryResult * a query result possibly containing more solutions than the specified maximum. * @param limit * the maximum number of solutions to return. If set to 0 or lower, no limit will be applied. * @param offset * the number of solutions to skip at the beginning. If set to 0 or lower, no offset will be * applied. * @return A {@link TupleQueryResult} that will at return at most the specified maximum number of * solutions. If neither {@code limit} nor {@code offset} are applied, this returns the original * {@code queryResult}. */ public static TupleQueryResult limitResults(TupleQueryResult queryResult, long limit, long offset) { CloseableIteration<BindingSet, QueryEvaluationException> iter = queryResult; if (offset > 0) { iter = new OffsetIteration<>(iter, offset); } if (limit > 0) { iter = new LimitIteration<>(iter, limit); } if (!(iter instanceof TupleQueryResult)) { return new IteratingTupleQueryResult(queryResult.getBindingNames(), iter); } return (TupleQueryResult)iter; }
bindingNames.add("writable"); model.put(QueryResultView.QUERY_RESULT_KEY, new IteratingTupleQueryResult(bindingNames, bindingSets));
new IteratingTupleQueryResult(columnNames, namespaces));