de.fuberlin.wiwiss.ng4j.impl
Class NamedGraphStatementIterator

java.lang.Object
  extended by com.hp.hpl.jena.util.iterator.NiceIterator
      extended by com.hp.hpl.jena.util.iterator.WrappedIterator
          extended by com.hp.hpl.jena.rdf.model.impl.StmtIteratorImpl
              extended by de.fuberlin.wiwiss.ng4j.impl.NamedGraphStatementIterator
All Implemented Interfaces:
StmtIterator, ClosableIterator, ExtendedIterator, Iterator

public class NamedGraphStatementIterator
extends com.hp.hpl.jena.rdf.model.impl.StmtIteratorImpl

Helper implementation of StmtIterator that wraps a StmtIterator and returns all of its elements as NamedGraphStatements instead of simple Jena Statements. This is somewhat hackish, but I couldn't figure out another way to make sure that NamedGraphModel always returns NamedGraphStatements.

Author:
Richard Cyganiak (richard@cyganiak.de)

Field Summary
 
Fields inherited from class com.hp.hpl.jena.util.iterator.WrappedIterator
base, removeDenied
 
Constructor Summary
NamedGraphStatementIterator(StmtIterator source, NamedGraphModel model)
           
 
Method Summary
 Object next()
           
 
Methods inherited from class com.hp.hpl.jena.rdf.model.impl.StmtIteratorImpl
nextStatement, remove
 
Methods inherited from class com.hp.hpl.jena.util.iterator.WrappedIterator
close, close, create, createNoRemove, forTestingOnly_getBase, hasNext
 
Methods inherited from class com.hp.hpl.jena.util.iterator.NiceIterator
andThen, andThen, asList, asSet, emptyIterator, ensureHasNext, filterDrop, filterKeep, mapWith, noElements, removeNext, toList, toSet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.jena.util.iterator.ExtendedIterator
andThen, filterDrop, filterKeep, mapWith, removeNext, toList, toSet
 
Methods inherited from interface com.hp.hpl.jena.util.iterator.ClosableIterator
close
 
Methods inherited from interface java.util.Iterator
hasNext
 

Constructor Detail

NamedGraphStatementIterator

public NamedGraphStatementIterator(StmtIterator source,
                                   NamedGraphModel model)
Method Detail

next

public Object next()
Specified by:
next in interface Iterator
Overrides:
next in class com.hp.hpl.jena.rdf.model.impl.StmtIteratorImpl