public interface RDFWriter extends RDFHandler
A writer to serialize RDF statements
in a particular RDF format.
RDFWriterFactory
Modifier and Type | Method and Description |
---|---|
void |
comment(String theComment)
Write a comment to the output.
|
void |
end()
Signals the writing process is completed.
|
RDFFormat |
format()
The
format this writer will serialize output in. |
void |
handle(Statement theStmt)
Write the given
Statement |
void |
namespace(String thePrefix,
String theIRI)
Provide a namespace to the writer.
|
void |
start()
Signals that the RDF writing process is starting.
|
void start()
start
in interface RDFHandler
void handle(@Nonnull Statement theStmt)
Statement
handle
in interface RDFHandler
theStmt
- the statement to writestarted
prior to writing Statements, but it is not required as not all
syntaxes will have a preamble requirement, such as the opening `rdf:RDF` tag in RDF/XML.
It should not be possible to continue writing statements after the writing processes has ended
void namespace(@Nonnull String thePrefix, @Nonnull String theIRI)
started
, in which case, the namespace bindings
are buffered and written when appropriate after writing has begun.namespace
in interface RDFHandler
thePrefix
- the namespace prefixtheIRI
- the associated IRIvoid comment(@Nonnull String theComment)
started
at this point; comments can be written prior to any actual
serialized RDFtheComment
- the comment to writevoid end()
InputStream
is *not* closed, but the caller
should not call additional methods on this writer as that will normally yield syntax errors in the output.end
in interface RDFHandler
Copyright © 2010-2016 Stardog Union. All Rights Reserved.