org.openrdf.http.client.helpers
Class FutureTupleQueryResult

java.lang.Object
  extended by org.openrdf.http.client.helpers.FutureTupleQueryResult
All Implemented Interfaces:
Cursor<BindingSet>, QueryResult<BindingSet>, TupleQueryResult, Result<BindingSet>, TupleResult

public class FutureTupleQueryResult
extends Object
implements TupleResult

Author:
James Leigh

Constructor Summary
FutureTupleQueryResult(Future<TupleResult> delegate)
           
 
Method Summary
<C extends Collection<? super BindingSet>>
C
addTo(C collection)
           
 List<BindingSet> asList()
           
 Set<BindingSet> asSet()
           
 void close()
          Closes this cursor, freeing any resources that it is holding.
 List<String> getBindingNames()
          Gets the names of the bindings, in order of projection.
 boolean hasNext()
           
 BindingSet next()
          Returns the next element from this cursor.
 BindingSet singleResult()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openrdf.cursor.Cursor
toString
 

Constructor Detail

FutureTupleQueryResult

public FutureTupleQueryResult(Future<TupleResult> delegate)
Method Detail

getBindingNames

public List<String> getBindingNames()
                             throws StoreException
Description copied from interface: TupleResult
Gets the names of the bindings, in order of projection.

Specified by:
getBindingNames in interface TupleQueryResult
Specified by:
getBindingNames in interface TupleResult
Returns:
The binding names, in order of projection.
Throws:
StoreException

close

public void close()
           throws StoreException
Description copied from interface: Cursor
Closes this cursor, freeing any resources that it is holding. If the cursor has already been closed then invoking this method has no effect. After closing a cursor, any subsequent calls to Cursor.next() will return null.

Note to implementors: this method is also used to abort long running evaluations. It should be implemented in such a way that it can be called concurrently with Cursor.next() and that it stops evaluation as soon as possible. Calls to Cursor.next() that are already in progress are allowed to still return results, but after returning from Cursor.close() , the cursor must not produce any more results.

Specified by:
close in interface Cursor<BindingSet>
Throws:
StoreException

hasNext

public boolean hasNext()
                throws StoreException
Specified by:
hasNext in interface Result<BindingSet>
Throws:
StoreException

next

public BindingSet next()
                throws StoreException
Description copied from interface: Cursor
Returns the next element from this cursor.

Specified by:
next in interface Cursor<BindingSet>
Returns:
the next element from this cursor, or null if the cursor has no more elements.
Throws:
StoreException

singleResult

public BindingSet singleResult()
                        throws StoreException
Specified by:
singleResult in interface Result<BindingSet>
Throws:
StoreException

addTo

public <C extends Collection<? super BindingSet>> C addTo(C collection)
                                               throws StoreException
Specified by:
addTo in interface Result<BindingSet>
Throws:
StoreException

asList

public List<BindingSet> asList()
                        throws StoreException
Specified by:
asList in interface Result<BindingSet>
Throws:
StoreException

asSet

public Set<BindingSet> asSet()
                      throws StoreException
Specified by:
asSet in interface Result<BindingSet>
Throws:
StoreException


Copyright © 2001-2009 Aduna. All Rights Reserved.