public class TriGStarWriter extends TriGWriter
TriGWriter
that writes RDF-star documents in the TriG-star format by including the RDF-star
triples.baseIRI, bufferedStatements, lastWrittenPredicate, lastWrittenSubject, statementClosed, writer
namespaceTable, statementConsumer
Constructor and Description |
---|
TriGStarWriter(OutputStream out)
Creates a new TriGStarWriter that will write to the supplied OutputStream.
|
TriGStarWriter(OutputStream out,
ParsedIRI baseIRI)
Creates a new TriGStarWriter that will write to the supplied OutputStream using the supplied base IRI.
|
TriGStarWriter(Writer writer)
Creates a new TriGStarWriter that will write to the supplied Writer.
|
TriGStarWriter(Writer writer,
ParsedIRI baseIRI)
Creates a new TriGStarWriter that will write to the supplied Writer using the supplied base IRI.
|
Modifier and Type | Method and Description |
---|---|
boolean |
acceptsFileFormat(FileFormat format)
Check if this Sink accepts the supplied
FileFormat . |
RDFFormat |
getRDFFormat()
Gets the RDF format that this RDFWriter uses.
|
protected void |
writeTriple(Triple triple,
boolean canShorten) |
closeActiveContext, endRDF, startRDF, writeNamespace, writeStatement
closePreviousStatement, consumeStatement, getModelFactory, getSupportedSettings, getWriter, handleComment, handleNamespace, handleStatementInternal, setModelFactory, writeBase, writeBNode, writeBNode, writeCommentLine, writeLiteral, writePredicate, writeResource, writeResource, writeTripleRDFStar, writeURI, writeValue, writeValue
checkWritingStarted, getFileFormat, getWriterConfig, handleStatement, isWritingStarted, set, setWriterConfig
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getWriterConfig, set, setWriterConfig
handleStatement
getFileFormat
public TriGStarWriter(OutputStream out)
out
- The OutputStream to write the TriG-star document to.public TriGStarWriter(OutputStream out, ParsedIRI baseIRI)
out
- The OutputStream to write the TriG-star document to.baseIRI
- The base IRI to use.public TriGStarWriter(Writer writer)
writer
- The Writer to write the TriG-star document to.public RDFFormat getRDFFormat()
RDFWriter
getRDFFormat
in interface RDFWriter
getRDFFormat
in class TriGWriter
public boolean acceptsFileFormat(FileFormat format)
Sink
FileFormat
.format
- the FileFormat
to check.true
if the sink accepts the supplied format, false
otherwise.protected void writeTriple(Triple triple, boolean canShorten) throws IOException
writeTriple
in class TurtleWriter
IOException
Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.