org.trippi.impl.kowari
Class KowariTripleIterator

java.lang.Object
  extended by org.trippi.TripleIterator
      extended by org.trippi.impl.kowari.KowariTripleIterator

public class KowariTripleIterator
extends TripleIterator

A TripleIterator that wraps a Kowari Answer object containing triples.

Author:
cwilper@cs.cornell.edu

Field Summary
 
Fields inherited from class org.trippi.TripleIterator
INPUT_FORMATS, OUTPUT_FORMATS
 
Constructor Summary
KowariTripleIterator(org.kowari.query.Answer answer)
          Initialize the iterator given a Kowari Answer.
 
Method Summary
 void close()
          Release resources held by this iterator.
 void finalize()
          Ensure close() gets called at garbage collection time.
 boolean hasNext()
          Return true if there are any more triples.
 org.jrdf.graph.Triple next()
          Return the next triple.
 
Methods inherited from class org.trippi.TripleIterator
addToGraph, count, deleteFromGraph, fromStream, fromStream, setAliasMap, toStream
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KowariTripleIterator

public KowariTripleIterator(org.kowari.query.Answer answer)
                     throws TrippiException
Initialize the iterator given a Kowari Answer.

Throws:
TrippiException - if there is an error positioning to the first result.
Method Detail

hasNext

public boolean hasNext()
Description copied from class: TripleIterator
Return true if there are any more triples.

Specified by:
hasNext in class TripleIterator

next

public org.jrdf.graph.Triple next()
                           throws TrippiException
Description copied from class: TripleIterator
Return the next triple.

Specified by:
next in class TripleIterator
Throws:
TrippiException

close

public void close()
           throws TrippiException
Description copied from class: TripleIterator
Release resources held by this iterator.

Specified by:
close in class TripleIterator
Throws:
TrippiException

finalize

public void finalize()
              throws TrippiException
Ensure close() gets called at garbage collection time.

Overrides:
finalize in class java.lang.Object
Throws:
TrippiException