org.aksw.commons.reader
Class NTripleIterator

java.lang.Object
  extended by org.aksw.commons.collections.SinglePrefetchIterator<com.hp.hpl.jena.graph.Triple>
      extended by org.aksw.commons.reader.NTripleIterator
All Implemented Interfaces:
Iterator<com.hp.hpl.jena.graph.Triple>

public class NTripleIterator
extends SinglePrefetchIterator<com.hp.hpl.jena.graph.Triple>

N-Triple Reader Modified by Claus Stadler: Turned the class into an iterator with returns individual triples from the underlying stream. This allows one to process large streams. TODO Make the code more reusable, such as adding a static NTripleIterator.readFromString method.

Version:
Release=$Name: $ Date=$Date: 2010/05/26 20:28:26 $
Author:
Brian McBride, Jeremy Carroll, Dave Banks

Constructor Summary
NTripleIterator(InputStream in, String base)
           
NTripleIterator(Reader reader, String base)
           
 
Method Summary
protected  com.hp.hpl.jena.graph.Node lookupResource(String name)
           
 com.hp.hpl.jena.graph.Triple prefetch()
           
protected  com.hp.hpl.jena.graph.Node readLiteral(boolean wellFormed)
           
protected  String readName()
           
 com.hp.hpl.jena.graph.Node readNode()
           
 com.hp.hpl.jena.graph.Node readResource()
           
protected  String readURI()
           
protected  void skipWhiteSpace()
           
protected  String syntaxErrorMessage(String sort, String msg, int linepos, int charpos)
           
 
Methods inherited from class org.aksw.commons.collections.SinglePrefetchIterator
close, finish, hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NTripleIterator

public NTripleIterator(InputStream in,
                       String base)

NTripleIterator

public NTripleIterator(Reader reader,
                       String base)
Method Detail

prefetch

public com.hp.hpl.jena.graph.Triple prefetch()
Specified by:
prefetch in class SinglePrefetchIterator<com.hp.hpl.jena.graph.Triple>

readResource

public com.hp.hpl.jena.graph.Node readResource()

readNode

public com.hp.hpl.jena.graph.Node readNode()

readLiteral

protected com.hp.hpl.jena.graph.Node readLiteral(boolean wellFormed)

readURI

protected String readURI()

readName

protected String readName()

skipWhiteSpace

protected void skipWhiteSpace()

lookupResource

protected com.hp.hpl.jena.graph.Node lookupResource(String name)

syntaxErrorMessage

protected String syntaxErrorMessage(String sort,
                                    String msg,
                                    int linepos,
                                    int charpos)


Copyright © 2012. All Rights Reserved.