- All Superinterfaces:
- All Known Implementing Classes:
public interface RDFWriter extends RDFHandler
A writer to serialize
RDF statementsin a particular RDF format.
- Michael Grove
- See Also:
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
comment(java.lang.String theComment)Write a comment to the output.
end()Signals the writing process is completed.
formatthis writer will serialize output in.
handle(Statement theStmt)Write the given
namespace(java.lang.String thePrefix, java.lang.String theIRI)Provide a namespace to the writer.
start()Signals that the RDF writing process is starting.
void start()Signals that the RDF writing process is starting.
void handle(@Nonnull Statement theStmt)Write the given
- Specified by:
theStmt- the statement to write
- Implementation Notes:
- It is generally assumed that output has to be
startedprior 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
void namespace(@Nonnull java.lang.String thePrefix, @Nonnull java.lang.String theIRI)Provide a namespace to the writer. This method can be called before writing has
started, in which case, the namespace bindings are buffered and written when appropriate after writing has begun.
void comment(@Nonnull java.lang.String theComment)Write a comment to the output. Writing need not be
startedat this point; comments can be written prior to any actual serialized RDF
theComment- the comment to write
void end()Signals the writing process is completed. The underlying
InputStreamis *not* closed, but the caller should not call additional methods on this writer as that will normally yield syntax errors in the output.