Package org.eclipse.rdf4j.rio.turtlestar
Class TurtleStarWriter
java.lang.Object
org.eclipse.rdf4j.rio.helpers.AbstractRDFWriter
org.eclipse.rdf4j.rio.turtle.TurtleWriter
org.eclipse.rdf4j.rio.turtlestar.TurtleStarWriter
- All Implemented Interfaces:
CharSink,Sink,RDFHandler,RDFWriter
An extension of
TurtleWriter that writes RDF-star documents in the Turtle-star format by including the
RDF-star triples.- Author:
- Pavel Mihaylov
-
Field Summary
Fields inherited from class org.eclipse.rdf4j.rio.turtle.TurtleWriter
baseIRI, bufferedStatements, lastWrittenPredicate, lastWrittenSubject, statementClosed, writerFields inherited from class org.eclipse.rdf4j.rio.helpers.AbstractRDFWriter
namespaceTable, statementConsumer -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new TurtleStarWriter that will write to the supplied OutputStream.TurtleStarWriter(OutputStream out, ParsedIRI baseIRI) Creates a new TurtleStarWriter that will write to the supplied OutputStream using the supplied base IRI.TurtleStarWriter(Writer writer) Creates a new TurtleStarWriter that will write to the supplied Writer.TurtleStarWriter(Writer writer, ParsedIRI baseIRI) Creates a new TurtleStarWriter that will write to the supplied Writer using the supplied base IRI. -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptsFileFormat(FileFormat format) Check if this Sink accepts the suppliedFileFormat.Gets the RDF format that this RDFWriter uses.protected voidwriteTriple(Triple triple, boolean canShorten) Methods inherited from class org.eclipse.rdf4j.rio.turtle.TurtleWriter
closePreviousStatement, consumeStatement, endRDF, getModelFactory, getSupportedSettings, getWriter, handleComment, handleNamespace, handleStatementInternal, setModelFactory, startRDF, writeBase, writeBNode, writeBNode, writeCommentLine, writeLiteral, writeNamespace, writePredicate, writeResource, writeResource, writeStatement, writeTripleRDFStar, writeURI, writeValue, writeValueMethods inherited from class org.eclipse.rdf4j.rio.helpers.AbstractRDFWriter
checkWritingStarted, getFileFormat, getWriterConfig, handleStatement, isWritingStarted, set, setWriterConfigMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.rdf4j.common.io.Sink
getFileFormat
-
Constructor Details
-
TurtleStarWriter
Creates a new TurtleStarWriter that will write to the supplied OutputStream.- Parameters:
out- The OutputStream to write the TurtleStar document to.
-
TurtleStarWriter
Creates a new TurtleStarWriter that will write to the supplied OutputStream using the supplied base IRI.- Parameters:
out- The OutputStream to write the TurtleStar document to.baseIRI- The base IRI to use.
-
TurtleStarWriter
Creates a new TurtleStarWriter that will write to the supplied Writer.- Parameters:
writer- The Writer to write the TurtleStar document to.
-
TurtleStarWriter
Creates a new TurtleStarWriter that will write to the supplied Writer using the supplied base IRI.- Parameters:
writer- The Writer to write the Turtle document to.baseIRI- The base IRI to use.
-
-
Method Details
-
getRDFFormat
Description copied from interface:RDFWriterGets the RDF format that this RDFWriter uses.- Specified by:
getRDFFormatin interfaceRDFWriter- Overrides:
getRDFFormatin classTurtleWriter
-
acceptsFileFormat
Description copied from interface:SinkCheck if this Sink accepts the suppliedFileFormat.- Parameters:
format- theFileFormatto check.- Returns:
trueif the sink accepts the supplied format,falseotherwise.
-
writeTriple
- Overrides:
writeTriplein classTurtleWriter- Throws:
IOException
-