org.trippi.impl.sesame
Class SesameTupleIterator

java.lang.Object
  extended by org.trippi.TupleIterator
      extended by org.trippi.impl.sesame.SesameTupleIterator
All Implemented Interfaces:
java.lang.Runnable, org.openrdf.sesame.query.TableQueryResultListener

public class SesameTupleIterator
extends TupleIterator
implements org.openrdf.sesame.query.TableQueryResultListener, java.lang.Runnable


Field Summary
 
Fields inherited from class org.trippi.TupleIterator
INPUT_FORMATS, OUTPUT_FORMATS
 
Constructor Summary
SesameTupleIterator(org.openrdf.sesame.constants.QueryLanguage lang, java.lang.String queryText, org.openrdf.sesame.repository.SesameRepository repository)
           
 
Method Summary
 void close()
          Release resources held by this iterator.
 void endTableQueryResult()
           
 void endTuple()
           
 void error(org.openrdf.sesame.query.QueryErrorType errType, java.lang.String msg)
           
 boolean hasNext()
          Return true if there are any more tuples.
 java.lang.String[] names()
          Get the names of the binding variables.
 java.util.Map next()
          Return the next tuple.
 void run()
           
 void startTableQueryResult()
           
 void startTableQueryResult(java.lang.String[] names)
           
 void startTuple()
           
 void tupleValue(org.openrdf.model.Value value)
           
 
Methods inherited from class org.trippi.TupleIterator
count, finalize, fromStream, main, nextTriples, setAliasMap, toStream
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SesameTupleIterator

public SesameTupleIterator(org.openrdf.sesame.constants.QueryLanguage lang,
                           java.lang.String queryText,
                           org.openrdf.sesame.repository.SesameRepository repository)
                    throws TrippiException
Throws:
TrippiException
Method Detail

names

public java.lang.String[] names()
                         throws TrippiException
Get the names of the binding variables. These will be the keys in the map for result.

Specified by:
names in class TupleIterator
Throws:
TrippiException

hasNext

public boolean hasNext()
                throws TrippiException
Return true if there are any more tuples.

Specified by:
hasNext in class TupleIterator
Throws:
TrippiException

next

public java.util.Map next()
                   throws TrippiException
Return the next tuple.

Specified by:
next in class TupleIterator
Throws:
TrippiException

close

public void close()
           throws TrippiException
Release resources held by this iterator.

Specified by:
close in class TupleIterator
Throws:
TrippiException

run

public void run()
Specified by:
run in interface java.lang.Runnable

startTableQueryResult

public void startTableQueryResult()
                           throws java.io.IOException
Specified by:
startTableQueryResult in interface org.openrdf.sesame.query.TableQueryResultListener
Throws:
java.io.IOException

startTableQueryResult

public void startTableQueryResult(java.lang.String[] names)
                           throws java.io.IOException
Specified by:
startTableQueryResult in interface org.openrdf.sesame.query.TableQueryResultListener
Throws:
java.io.IOException

endTableQueryResult

public void endTableQueryResult()
                         throws java.io.IOException
Specified by:
endTableQueryResult in interface org.openrdf.sesame.query.TableQueryResultListener
Throws:
java.io.IOException

error

public void error(org.openrdf.sesame.query.QueryErrorType errType,
                  java.lang.String msg)
           throws java.io.IOException
Specified by:
error in interface org.openrdf.sesame.query.TableQueryResultListener
Throws:
java.io.IOException

startTuple

public void startTuple()
                throws java.io.IOException
Specified by:
startTuple in interface org.openrdf.sesame.query.TableQueryResultListener
Throws:
java.io.IOException

tupleValue

public void tupleValue(org.openrdf.model.Value value)
                throws java.io.IOException
Specified by:
tupleValue in interface org.openrdf.sesame.query.TableQueryResultListener
Throws:
java.io.IOException

endTuple

public void endTuple()
              throws java.io.IOException
Specified by:
endTuple in interface org.openrdf.sesame.query.TableQueryResultListener
Throws:
java.io.IOException