org.aksw.commons.sparql.api.core
Class ConstructIterator

java.lang.Object
  extended by org.aksw.commons.collections.PrefetchIterator<com.hp.hpl.jena.graph.Triple>
      extended by org.aksw.commons.sparql.api.core.ConstructIterator
All Implemented Interfaces:
Iterator<com.hp.hpl.jena.graph.Triple>

public class ConstructIterator
extends org.aksw.commons.collections.PrefetchIterator<com.hp.hpl.jena.graph.Triple>

Author:
Claus Stadler

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


Constructor Summary
ConstructIterator(com.hp.hpl.jena.sparql.syntax.Template template, com.hp.hpl.jena.query.ResultSet rs)
           
 
Method Summary
protected  Iterator<com.hp.hpl.jena.graph.Triple> prefetch()
          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
close, hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstructIterator

public ConstructIterator(com.hp.hpl.jena.sparql.syntax.Template template,
                         com.hp.hpl.jena.query.ResultSet rs)
Method Detail

prefetch

protected Iterator<com.hp.hpl.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<com.hp.hpl.jena.graph.Triple>
Returns:
Throws:
Exception


Copyright © 2012. All Rights Reserved.