org.openrdf.query.impl
Class TupleQueryResultImpl

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

public class TupleQueryResultImpl
extends Object
implements TupleQueryResult

A generic implementation of the TupleQueryResult interface.


Constructor Summary
TupleQueryResultImpl(List<String> bindingNames, CloseableIteration<? extends BindingSet,QueryEvaluationException> bindingSetIter)
          Creates a query result object with the supplied binding names.
TupleQueryResultImpl(List<String> bindingNames, Iterable<? extends BindingSet> bindingSets)
          Creates a query result object with the supplied binding names.
TupleQueryResultImpl(List<String> bindingNames, Iterator<? extends BindingSet> bindingSetIter)
           
 
Method Summary
 void close()
           
 List<String> getBindingNames()
          Gets the names of the bindings, in order of projection.
 boolean hasNext()
           
 BindingSet next()
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TupleQueryResultImpl

public TupleQueryResultImpl(List<String> bindingNames,
                            Iterable<? extends BindingSet> bindingSets)
Creates a query result object with the supplied binding names. The supplied list of binding names is assumed to be constant; care should be taken that the contents of this list doesn't change after supplying it to this solution.

Parameters:
bindingNames - The binding names, in order of projection.

TupleQueryResultImpl

public TupleQueryResultImpl(List<String> bindingNames,
                            Iterator<? extends BindingSet> bindingSetIter)

TupleQueryResultImpl

public TupleQueryResultImpl(List<String> bindingNames,
                            CloseableIteration<? extends BindingSet,QueryEvaluationException> bindingSetIter)
Creates a query result object with the supplied binding names. The supplied list of binding names is assumed to be constant; care should be taken that the contents of this list doesn't change after supplying it to this solution.

Parameters:
bindingNames - The binding names, in order of projection.
Method Detail

getBindingNames

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

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

close

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

hasNext

public boolean hasNext()
                throws QueryEvaluationException
Specified by:
hasNext in interface Iteration<BindingSet,QueryEvaluationException>
Throws:
QueryEvaluationException

next

public BindingSet next()
                throws QueryEvaluationException
Specified by:
next in interface Iteration<BindingSet,QueryEvaluationException>
Throws:
QueryEvaluationException

remove

public void remove()
            throws QueryEvaluationException
Specified by:
remove in interface Iteration<BindingSet,QueryEvaluationException>
Throws:
QueryEvaluationException


Copyright © 2001-2007 Aduna. All Rights Reserved.