Class BackgroundTupleResult
- java.lang.Object
-
- org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration<E,X>
-
- org.eclipse.rdf4j.common.iteration.IterationWrapper<BindingSet,QueryEvaluationException>
-
- org.eclipse.rdf4j.query.impl.IteratingTupleQueryResult
-
- org.eclipse.rdf4j.query.resultio.helpers.BackgroundTupleResult
-
- All Implemented Interfaces:
AutoCloseable
,Iterable<BindingSet>
,Runnable
,CloseableIteration<BindingSet,QueryEvaluationException>
,Iteration<BindingSet,QueryEvaluationException>
,QueryResult<BindingSet>
,QueryResultHandler
,TupleQueryResult
,TupleQueryResultHandler
@Deprecated(since="4.1.0") public class BackgroundTupleResult extends IteratingTupleQueryResult implements Runnable, TupleQueryResultHandler
Deprecated.Provides concurrent access to tuple results as they are being parsed.- Author:
- James Leigh
-
-
Field Summary
-
Fields inherited from class org.eclipse.rdf4j.common.iteration.IterationWrapper
wrappedIter
-
-
Constructor Summary
Constructors Constructor Description BackgroundTupleResult(QueueCursor<BindingSet> queue, TupleQueryResultParser parser, InputStream in)
Deprecated.BackgroundTupleResult(TupleQueryResultParser parser, InputStream in, WeakReference<?> callerRef)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
endQueryResult()
Deprecated.Indicates the end of a sequence of solutions.List<String>
getBindingNames()
Deprecated.Gets the names of the bindings, in order of projection.void
handleBoolean(boolean value)
Deprecated.Handles the specified boolean value.protected void
handleClose()
Deprecated.Closes this Iteration and also closes the wrapped Iteration if it is aCloseableIteration
.void
handleLinks(List<String> linkUrls)
Deprecated.Handles the links elements which are present in SPARQL Results JSON and SPARQL Results XML documents in the header.void
handleSolution(BindingSet bindingSet)
Deprecated.Handles a solution.void
run()
Deprecated.void
startQueryResult(List<String> bindingNames)
Deprecated.Indicates the start of a sequence of Solutions.-
Methods inherited from class org.eclipse.rdf4j.common.iteration.IterationWrapper
hasNext, next, remove
-
Methods inherited from class org.eclipse.rdf4j.common.iteration.AbstractCloseableIteration
close, isClosed
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.common.iteration.CloseableIteration
close
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Methods inherited from interface org.eclipse.rdf4j.query.QueryResult
hasNext, iterator, next, stream
-
-
-
-
Constructor Detail
-
BackgroundTupleResult
public BackgroundTupleResult(TupleQueryResultParser parser, InputStream in, WeakReference<?> callerRef)
Deprecated.
-
BackgroundTupleResult
public BackgroundTupleResult(QueueCursor<BindingSet> queue, TupleQueryResultParser parser, InputStream in)
Deprecated.
-
-
Method Detail
-
handleClose
protected void handleClose() throws QueryEvaluationException
Deprecated.Description copied from class:IterationWrapper
Closes this Iteration and also closes the wrapped Iteration if it is aCloseableIteration
.- Overrides:
handleClose
in classIterationWrapper<BindingSet,QueryEvaluationException>
- Throws:
QueryEvaluationException
-
getBindingNames
public List<String> getBindingNames()
Deprecated.Description copied from interface:TupleQueryResult
Gets the names of the bindings, in order of projection.- Specified by:
getBindingNames
in interfaceTupleQueryResult
- Overrides:
getBindingNames
in classIteratingTupleQueryResult
- Returns:
- The binding names, in order of projection.
-
startQueryResult
public void startQueryResult(List<String> bindingNames) throws TupleQueryResultHandlerException
Deprecated.Description copied from interface:QueryResultHandler
Indicates the start of a sequence of Solutions. The supplied bindingNames are an indication of the values that are in the Solutions. For example, a SPARQL query like select ?X ?Y where { ?X ?P ?Y } will have binding names X and Y.- Specified by:
startQueryResult
in interfaceQueryResultHandler
- Parameters:
bindingNames
- An ordered set of binding names.- Throws:
TupleQueryResultHandlerException
- If there was an error during the starting of the query result handler. This exception may be thrown if theQueryResultHandler.handleBoolean(boolean)
method was called before this method and the handler cannot process both boolean and tuple results simultaneously.
-
handleSolution
public void handleSolution(BindingSet bindingSet) throws TupleQueryResultHandlerException
Deprecated.Description copied from interface:QueryResultHandler
Handles a solution.- Specified by:
handleSolution
in interfaceQueryResultHandler
- Parameters:
bindingSet
- A single set of tuple results, with binding names bound to values. Each of the binding names in the solution must have previously been registered with theQueryResultHandler.startQueryResult(List)
method.- Throws:
TupleQueryResultHandlerException
- If there was an error during the handling of the query solution. This exception may be thrown if theQueryResultHandler.handleBoolean(boolean)
method was called before this method and the handler cannot process both boolean and tuple results simultaneously.
-
endQueryResult
public void endQueryResult() throws TupleQueryResultHandlerException
Deprecated.Description copied from interface:QueryResultHandler
Indicates the end of a sequence of solutions.- Specified by:
endQueryResult
in interfaceQueryResultHandler
- Throws:
TupleQueryResultHandlerException
- If there was an error during the ending of the query result handler. This exception may be thrown if theQueryResultHandler.handleBoolean(boolean)
method was called before this method and the handler cannot process both boolean and tuple results simultaneously.
-
handleBoolean
public void handleBoolean(boolean value) throws QueryResultHandlerException
Deprecated.Description copied from interface:QueryResultHandler
Handles the specified boolean value.- Specified by:
handleBoolean
in interfaceQueryResultHandler
- Parameters:
value
- The boolean value to handle.- Throws:
QueryResultHandlerException
- If there was an error during the handling of this value. This exception may be thrown if theQueryResultHandler.startQueryResult(List)
,QueryResultHandler.handleSolution(BindingSet)
orQueryResultHandler.endQueryResult()
methods were called before this method was called, and the handler cannot process both boolean and tuple results simultaneously.
-
handleLinks
public void handleLinks(List<String> linkUrls) throws QueryResultHandlerException
Deprecated.Description copied from interface:QueryResultHandler
Handles the links elements which are present in SPARQL Results JSON and SPARQL Results XML documents in the header.NOTE: If the format does not support links, it must silently ignore a call to this method.
An accumulating handler should accumulate these links.
- Specified by:
handleLinks
in interfaceQueryResultHandler
- Parameters:
linkUrls
- The URLs of the links to handle.- Throws:
QueryResultHandlerException
- If there was an error handling the set of link URLs. This error is not thrown in cases where links are not supported.- See Also:
- "link"
-
-