org.aksw.commons.reader
Class NTripleIterator
java.lang.Object
org.aksw.commons.collections.SinglePrefetchIterator<com.hp.hpl.jena.graph.Triple>
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NTripleIterator
public NTripleIterator(InputStream in,
String base)
NTripleIterator
public NTripleIterator(Reader reader,
String base)
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.