public class TurtleWriter extends RDFWriterBase implements RDFWriter
| Modifier and Type | Field and Description |
|---|---|
protected URI |
lastWrittenPredicate |
protected Resource |
lastWrittenSubject |
protected boolean |
statementClosed
Flag indicating whether the last written statement has been closed.
|
protected IndentingWriter |
writer |
protected boolean |
writingStarted |
namespaceTable| Constructor and Description |
|---|
TurtleWriter(OutputStream out)
Creates a new TurtleWriter that will write to the supplied OutputStream.
|
TurtleWriter(Writer writer)
Creates a new TurtleWriter that will write to the supplied Writer.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
closePreviousStatement() |
void |
endRDF() |
RDFFormat |
getRDFFormat() |
void |
handleComment(String comment) |
void |
handleNamespace(String prefix,
String name) |
void |
handleStatement(Statement st) |
void |
startRDF() |
protected void |
writeBNode(BNode bNode) |
protected void |
writeCommentLine(String line) |
protected void |
writeLiteral(Literal lit) |
protected void |
writeNamespace(String prefix,
String name) |
protected void |
writePredicate(URI predicate) |
protected void |
writeResource(Resource res) |
protected void |
writeURI(URI uri) |
protected void |
writeValue(Value val) |
getSupportedSettings, getWriterConfig, setWriterConfigclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetSupportedSettings, getWriterConfig, setWriterConfigprotected IndentingWriter writer
protected boolean writingStarted
protected boolean statementClosed
protected Resource lastWrittenSubject
protected URI lastWrittenPredicate
public TurtleWriter(OutputStream out)
out - The OutputStream to write the Turtle document to.public TurtleWriter(Writer writer)
writer - The Writer to write the Turtle document to.public RDFFormat getRDFFormat()
getRDFFormat in interface RDFWriterpublic void startRDF()
throws RDFHandlerException
startRDF in interface RDFHandlerRDFHandlerExceptionpublic void endRDF()
throws RDFHandlerException
endRDF in interface RDFHandlerRDFHandlerExceptionpublic void handleNamespace(String prefix, String name) throws RDFHandlerException
handleNamespace in interface RDFHandlerhandleNamespace in class RDFWriterBaseRDFHandlerExceptionpublic void handleStatement(Statement st) throws RDFHandlerException
handleStatement in interface RDFHandlerRDFHandlerExceptionpublic void handleComment(String comment) throws RDFHandlerException
handleComment in interface RDFHandlerRDFHandlerExceptionprotected void writeCommentLine(String line) throws IOException
IOExceptionprotected void writeNamespace(String prefix, String name) throws IOException
IOExceptionprotected void writePredicate(URI predicate) throws IOException
IOExceptionprotected void writeValue(Value val) throws IOException
IOExceptionprotected void writeResource(Resource res) throws IOException
IOExceptionprotected void writeURI(URI uri) throws IOException
IOExceptionprotected void writeBNode(BNode bNode) throws IOException
IOExceptionprotected void writeLiteral(Literal lit) throws IOException
IOExceptionprotected void closePreviousStatement()
throws IOException
IOExceptionCopyright © 2001-2014 Aduna. All Rights Reserved.