public class TriGWriter extends TurtleWriter
TurtleWriter that writes RDF documents in
TriG format by adding graph scopes to the Turtle
document.baseIRI, bufferedStatements, lastWrittenPredicate, lastWrittenSubject, statementClosed, writernamespaceTable, statementConsumer| Constructor and Description |
|---|
TriGWriter(OutputStream out)
Creates a new TriGWriter that will write to the supplied OutputStream.
|
TriGWriter(OutputStream out,
ParsedIRI baseIRI)
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.
|
TriGWriter(Writer writer,
ParsedIRI baseIRI)
Creates a new TriGWriter that will write to the supplied Writer.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
closeActiveContext() |
void |
endRDF() |
RDFFormat |
getRDFFormat() |
void |
startRDF() |
protected void |
writeNamespace(String prefix,
String name) |
protected void |
writeStatement(org.eclipse.rdf4j.model.Resource subj,
org.eclipse.rdf4j.model.IRI pred,
org.eclipse.rdf4j.model.Value obj,
org.eclipse.rdf4j.model.Resource context,
boolean canShortenSubject,
boolean canShortenObject) |
closePreviousStatement, consumeStatement, getModelFactory, getSupportedSettings, getWriter, handleComment, handleNamespace, handleStatementInternal, setModelFactory, writeBase, writeBNode, writeBNode, writeCommentLine, writeLiteral, writePredicate, writeResource, writeResource, writeTriple, writeTripleRDFStar, writeURI, writeValue, writeValuecheckWritingStarted, getFileFormat, getWriterConfig, handleStatement, isWritingStarted, set, setWriterConfigclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWriterConfig, set, setWriterConfighandleStatementacceptsFileFormat, getFileFormatpublic TriGWriter(OutputStream out)
out - The OutputStream to write the TriG document to.public TriGWriter(OutputStream out, ParsedIRI baseIRI)
out - The OutputStream to write the TriG document to.baseIRI - public TriGWriter(Writer writer)
writer - The Writer to write the TriG document to.public RDFFormat getRDFFormat()
getRDFFormat in interface RDFWritergetRDFFormat in class TurtleWriterpublic void startRDF()
throws RDFHandlerException
startRDF in interface RDFHandlerstartRDF in class TurtleWriterRDFHandlerExceptionpublic void endRDF()
throws RDFHandlerException
endRDF in interface RDFHandlerendRDF in class TurtleWriterRDFHandlerExceptionprotected void writeStatement(org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, org.eclipse.rdf4j.model.Resource context, boolean canShortenSubject, boolean canShortenObject) throws IOException
writeStatement in class TurtleWriterIOExceptionprotected void writeNamespace(String prefix, String name) throws IOException
writeNamespace in class TurtleWriterIOExceptionprotected void closeActiveContext()
throws IOException
IOExceptionCopyright © 2015-2022 Eclipse Foundation. All Rights Reserved.