public class NTriplesWriter extends AbstractRDFWriter implements RDFWriter
| Modifier and Type | Field and Description | 
|---|---|
| protected Writer | writer | 
| protected boolean | writingStarted | 
namespaceTable| Constructor and Description | 
|---|
| NTriplesWriter(OutputStream out)Creates a new NTriplesWriter that will write to the supplied OutputStream. | 
| NTriplesWriter(Writer writer)Creates a new NTriplesWriter that will write to the supplied Writer. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | endRDF()Signals the end of the RDF data. | 
| RDFFormat | getRDFFormat()Gets the RDF format that this RDFWriter uses. | 
| Collection<RioSetting<?>> | getSupportedSettings() | 
| void | handleComment(String comment)Handles a comment. | 
| void | handleNamespace(String prefix,
               String name)Handles a namespace declaration/definition. | 
| void | handleStatement(Statement st)Handles a statement. | 
| void | startRDF()Signals the start of the RDF data. | 
| protected void | writeValue(Value value)Writes the N-Triples representation of the given  Value. | 
getWriterConfig, set, setWriterConfigclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWriterConfig, set, setWriterConfigprotected final Writer writer
protected boolean writingStarted
public NTriplesWriter(OutputStream out)
out - The OutputStream to write the N-Triples document to.public NTriplesWriter(Writer writer)
writer - The Writer to write the N-Triples document to.public RDFFormat getRDFFormat()
RDFWritergetRDFFormat in interface RDFWriterpublic void startRDF()
              throws RDFHandlerException
RDFHandlerstartRDF in interface RDFHandlerRDFHandlerException - If the RDF handler has encountered an unrecoverable error.public void endRDF()
            throws RDFHandlerException
RDFHandlerendRDF in interface RDFHandlerRDFHandlerException - If the RDF handler has encountered an unrecoverable error.public void handleNamespace(String prefix, String name)
RDFHandlerhandleNamespace in interface RDFHandlerhandleNamespace in class AbstractRDFWriterprefix - The prefix for the namespace, or an empty string in case of a default namespace.name - The URI that the prefix maps to.public void handleStatement(Statement st) throws RDFHandlerException
RDFHandlerhandleStatement in interface RDFHandlerst - The statement.RDFHandlerException - If the RDF handler has encountered an unrecoverable error.public void handleComment(String comment) throws RDFHandlerException
RDFHandlerhandleComment in interface RDFHandlercomment - The comment.RDFHandlerException - If the RDF handler has encountered an unrecoverable error.public final Collection<RioSetting<?>> getSupportedSettings()
getSupportedSettings in interface RDFWritergetSupportedSettings in class AbstractRDFWriterRioSettings that are supported by this RDFWriter.protected void writeValue(Value value) throws IOException
Value.value - The value to write.IOExceptionCopyright © 2015-2020 Eclipse Foundation. All Rights Reserved.