|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.rio.turtle.TurtleWriter
org.openrdf.rio.trig.TriGWriter
public class TriGWriter
An extension of TurtleWriter that writes RDF documents in TriG format
by adding graph scopes to the Turtle document.
| Field Summary |
|---|
| Fields inherited from class org.openrdf.rio.turtle.TurtleWriter |
|---|
lastWrittenPredicate, lastWrittenSubject, namespaceTable, statementClosed, writer, writingStarted |
| Constructor Summary | |
|---|---|
TriGWriter(OutputStream out)
Creates a new TriGWriter that will write to the supplied OutputStream. |
|
TriGWriter(Writer writer)
Creates a new TriGWriter that will write to the supplied Writer. |
|
| Method Summary | |
|---|---|
protected void |
closeActiveContext()
|
void |
endRDF()
Signals the end of the RDF data. |
RDFFormat |
getRDFFormat()
Gets the RDF format that this RDFWriter uses. |
void |
handleStatement(Statement st)
Handles a statement. |
void |
startRDF()
Signals the start of the RDF data. |
protected void |
writeCommentLine(String line)
|
protected void |
writeNamespace(String prefix,
String name)
|
| Methods inherited from class org.openrdf.rio.turtle.TurtleWriter |
|---|
closePreviousStatement, handleComment, handleNamespace, writeBNode, writeLiteral, writePredicate, writeResource, writeURI, writeValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TriGWriter(OutputStream out)
out - The OutputStream to write the TriG document to.public TriGWriter(Writer writer)
writer - The Writer to write the TriG document to.| Method Detail |
|---|
public RDFFormat getRDFFormat()
RDFWriter
getRDFFormat in interface RDFWritergetRDFFormat in class TurtleWriter
public void startRDF()
throws RDFHandlerException
RDFHandler
startRDF in interface RDFHandlerstartRDF in class TurtleWriterRDFHandlerException - If the RDF handler has encountered an unrecoverable error.
public void endRDF()
throws RDFHandlerException
RDFHandler
endRDF in interface RDFHandlerendRDF in class TurtleWriterRDFHandlerException - If the RDF handler has encountered an unrecoverable error.
public void handleStatement(Statement st)
throws RDFHandlerException
RDFHandler
handleStatement in interface RDFHandlerhandleStatement in class TurtleWriterst - The statement.
RDFHandlerException - If the RDF handler has encountered an unrecoverable error.
protected void writeCommentLine(String line)
throws IOException
writeCommentLine in class TurtleWriterIOException
protected void writeNamespace(String prefix,
String name)
throws IOException
writeNamespace in class TurtleWriterIOException
protected void closeActiveContext()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||