Class ConstructIterator

java.lang.Object
org.aksw.commons.collections.PrefetchIterator<org.apache.jena.graph.Triple>
org.aksw.jena_sparql_api.core.ConstructIterator
All Implemented Interfaces:
Closeable, AutoCloseable, Iterator<org.apache.jena.graph.Triple>

public class ConstructIterator extends org.aksw.commons.collections.PrefetchIterator<org.apache.jena.graph.Triple>
Author:
Claus Stadler

Date: 11/5/11 Time: 2:16 PM

  • Constructor Summary

    Constructors
    Constructor
    Description
    ConstructIterator(org.apache.jena.sparql.syntax.Template template, org.apache.jena.query.ResultSet rs)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected Iterator<org.apache.jena.graph.Triple>
    Returns an iterator over the triples generated by instancing the template with each of the result set rows.

    Methods inherited from class org.aksw.commons.collections.PrefetchIterator

    hasNext, next, remove

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.Iterator

    forEachRemaining
  • Constructor Details

    • ConstructIterator

      public ConstructIterator(org.apache.jena.sparql.syntax.Template template, org.apache.jena.query.ResultSet rs)
  • Method Details

    • prefetch

      protected Iterator<org.apache.jena.graph.Triple> prefetch() throws Exception
      Returns an iterator over the triples generated by instancing the template with each of the result set rows. Duplicates are not removed; this can be achieved by wrapping this iterator with a UniqueIterator. TODO We could do some optimization by factoring out constant triples from the template.
      Specified by:
      prefetch in class org.aksw.commons.collections.PrefetchIterator<org.apache.jena.graph.Triple>
      Returns:
      Throws:
      Exception
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class org.aksw.commons.collections.PrefetchIterator<org.apache.jena.graph.Triple>