org.trippi.impl.sesame
Class SesameTripleIterator

java.lang.Object
  extended by org.trippi.TripleIterator
      extended by org.trippi.impl.sesame.SesameTripleIterator
All Implemented Interfaces:
java.lang.Runnable, org.openrdf.sesame.query.GraphQueryResultListener

public class SesameTripleIterator
extends TripleIterator
implements org.openrdf.sesame.query.GraphQueryResultListener, java.lang.Runnable


Field Summary
 
Fields inherited from class org.trippi.TripleIterator
INPUT_FORMATS, OUTPUT_FORMATS
 
Constructor Summary
SesameTripleIterator(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 endGraphQueryResult()
           
 boolean hasNext()
          Return true if there are any more triples.
 void namespace(java.lang.String prefix, java.lang.String name)
           
 org.jrdf.graph.Triple next()
          Return the next triple.
 void reportError(java.lang.String msg)
           
 void run()
           
 void startGraphQueryResult()
           
 void triple(org.openrdf.model.Resource subject, org.openrdf.model.URI predicate, org.openrdf.model.Value object)
           
 
Methods inherited from class org.trippi.TripleIterator
addToGraph, count, deleteFromGraph, fromStream, fromStream, setAliasMap, toStream
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SesameTripleIterator

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

hasNext

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

Specified by:
hasNext in class TripleIterator
Throws:
TrippiException

next

public org.jrdf.graph.Triple next()
                           throws TrippiException
Return the next triple.

Specified by:
next in class TripleIterator
Throws:
TrippiException

close

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

Specified by:
close in class TripleIterator
Throws:
TrippiException

run

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

startGraphQueryResult

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

endGraphQueryResult

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

namespace

public void namespace(java.lang.String prefix,
                      java.lang.String name)
               throws java.io.IOException
Specified by:
namespace in interface org.openrdf.sesame.query.GraphQueryResultListener
Throws:
java.io.IOException

reportError

public void reportError(java.lang.String msg)
                 throws java.io.IOException
Specified by:
reportError in interface org.openrdf.sesame.query.GraphQueryResultListener
Throws:
java.io.IOException

triple

public void triple(org.openrdf.model.Resource subject,
                   org.openrdf.model.URI predicate,
                   org.openrdf.model.Value object)
            throws java.io.IOException
Specified by:
triple in interface org.openrdf.sesame.query.GraphQueryResultListener
Throws:
java.io.IOException