public class JSONLDWriter extends AbstractRDFWriter implements RDFWriter
JSONLDInternalRDFParser
.namespaceTable
Constructor and Description |
---|
JSONLDWriter(OutputStream outputStream)
Create a SesameJSONLDWriter using a
OutputStream |
JSONLDWriter(OutputStream outputStream,
String baseURI)
Create a SesameJSONLDWriter using a
OutputStream |
JSONLDWriter(Writer writer)
Create a SesameJSONLDWriter using a
Writer |
JSONLDWriter(Writer writer,
String baseURI)
Create a SesameJSONLDWriter using a
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.
|
void |
handleComment(String comment)
Handles a comment.
|
void |
handleNamespace(String prefix,
String uri)
Handles a namespace declaration/definition.
|
void |
handleStatement(Statement st)
Handles a statement.
|
void |
startRDF()
Signals the start of the RDF data.
|
getSupportedSettings, getWriterConfig, set, setWriterConfig
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getSupportedSettings, getWriterConfig, set, setWriterConfig
public JSONLDWriter(OutputStream outputStream)
OutputStream
outputStream
- The OutputStream to write to.public JSONLDWriter(OutputStream outputStream, String baseURI)
OutputStream
outputStream
- The OutputStream to write to.public JSONLDWriter(Writer writer)
Writer
writer
- The Writer to write to.public void handleNamespace(String prefix, String uri) throws RDFHandlerException
RDFHandler
handleNamespace
in interface RDFHandler
handleNamespace
in class AbstractRDFWriter
prefix
- The prefix for the namespace, or an empty string in case of a default namespace.uri
- The URI that the prefix maps to.RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.public void startRDF() throws RDFHandlerException
RDFHandler
startRDF
in interface RDFHandler
RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.public void endRDF() throws RDFHandlerException
RDFHandler
endRDF
in interface RDFHandler
RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.public void handleStatement(Statement st) throws RDFHandlerException
RDFHandler
handleStatement
in interface RDFHandler
st
- The statement.RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.public void handleComment(String comment) throws RDFHandlerException
RDFHandler
handleComment
in interface RDFHandler
comment
- The comment.RDFHandlerException
- If the RDF handler has encountered an unrecoverable error.public RDFFormat getRDFFormat()
RDFWriter
getRDFFormat
in interface RDFWriter
Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.