public class NTriplesSerializer extends Pipe<CharSink> implements TripleSink
TripleSink which serializes triples to
CharSink using NTriples syntax.| Modifier and Type | Field and Description |
|---|---|
protected static String |
DOT_EOL |
protected static char |
SPACE |
| Modifier | Constructor and Description |
|---|---|
protected |
NTriplesSerializer(CharSink sink) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addContent(String content) |
void |
addNonLiteral(String subj,
String pred,
String obj) |
void |
addPlainLiteral(String subj,
String pred,
String content,
String lang) |
void |
addTypedLiteral(String subj,
String pred,
String content,
String type) |
static TripleSink |
connect(CharSink sink)
Creates instance of TurtleSerializer connected to specified sink.
|
protected void |
serializeBnodeOrUri(String value) |
protected void |
serializeUri(String uri) |
void |
setBaseUri(String baseUri) |
protected boolean |
setPropertyInternal(String key,
Object value) |
protected void |
startTriple(String subj,
String pred) |
endStream, setProperty, startStreamclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitendStream, setProperty, startStreamprotected static final String DOT_EOL
protected static final char SPACE
protected NTriplesSerializer(CharSink sink)
public static TripleSink connect(CharSink sink)
sink - sink to be connected topublic void addNonLiteral(String subj, String pred, String obj)
addNonLiteral in interface TripleSinkpublic void addPlainLiteral(String subj, String pred, String content, String lang)
addPlainLiteral in interface TripleSinkpublic void addTypedLiteral(String subj, String pred, String content, String type)
addTypedLiteral in interface TripleSinkprotected boolean setPropertyInternal(String key, Object value)
setPropertyInternal in class Pipe<CharSink>public void setBaseUri(String baseUri)
setBaseUri in interface DataSinkprotected void startTriple(String subj, String pred) throws ParseException
ParseExceptionprotected void serializeBnodeOrUri(String value) throws ParseException
ParseExceptionprotected void serializeUri(String uri) throws ParseException
ParseExceptionprotected void addContent(String content) throws ParseException
ParseExceptionCopyright © 2012–2016. All rights reserved.