org.openrdf.repository.sparql.query
Class BackgroundTupleResult

java.lang.Object
  extended by org.openrdf.query.impl.TupleQueryResultImpl
      extended by org.openrdf.repository.sparql.query.BackgroundTupleResult
All Implemented Interfaces:
CloseableIteration<BindingSet,QueryEvaluationException>, Iteration<BindingSet,QueryEvaluationException>, Runnable, QueryResult<BindingSet>, TupleQueryResult, TupleQueryResultHandler

public class BackgroundTupleResult
extends TupleQueryResultImpl
implements TupleQueryResult, Runnable, TupleQueryResultHandler

Provides concurrent access to tuple results as they are being parsed.

Author:
James Leigh

Constructor Summary
BackgroundTupleResult(QueueCursor<BindingSet> queue, TupleQueryResultParser parser, InputStream in, org.apache.commons.httpclient.HttpMethod connection)
           
BackgroundTupleResult(TupleQueryResultParser parser, InputStream in, org.apache.commons.httpclient.HttpMethod connection)
           
 
Method Summary
 void close()
           
 void endQueryResult()
           
 List<String> getBindingNames()
           
 void handleSolution(BindingSet bindingSet)
           
 void run()
           
 void startQueryResult(List<String> bindingNames)
           
 
Methods inherited from class org.openrdf.query.impl.TupleQueryResultImpl
hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.aduna.iteration.Iteration
hasNext, next, remove
 

Constructor Detail

BackgroundTupleResult

public BackgroundTupleResult(TupleQueryResultParser parser,
                             InputStream in,
                             org.apache.commons.httpclient.HttpMethod connection)

BackgroundTupleResult

public BackgroundTupleResult(QueueCursor<BindingSet> queue,
                             TupleQueryResultParser parser,
                             InputStream in,
                             org.apache.commons.httpclient.HttpMethod connection)
Method Detail

close

public void close()
           throws QueryEvaluationException
Specified by:
close in interface CloseableIteration<BindingSet,QueryEvaluationException>
Overrides:
close in class TupleQueryResultImpl
Throws:
QueryEvaluationException

getBindingNames

public List<String> getBindingNames()
Specified by:
getBindingNames in interface TupleQueryResult
Overrides:
getBindingNames in class TupleQueryResultImpl

run

public void run()
Specified by:
run in interface Runnable

startQueryResult

public void startQueryResult(List<String> bindingNames)
                      throws TupleQueryResultHandlerException
Specified by:
startQueryResult in interface TupleQueryResultHandler
Throws:
TupleQueryResultHandlerException

handleSolution

public void handleSolution(BindingSet bindingSet)
                    throws TupleQueryResultHandlerException
Specified by:
handleSolution in interface TupleQueryResultHandler
Throws:
TupleQueryResultHandlerException

endQueryResult

public void endQueryResult()
                    throws TupleQueryResultHandlerException
Specified by:
endQueryResult in interface TupleQueryResultHandler
Throws:
TupleQueryResultHandlerException


Copyright © 2004-2009 James Leigh Services Inc.. All Rights Reserved.