public class RDFJSONWriter extends RDFWriterBase implements RDFWriter
RDFWriter implementation for the RDF/JSON formatnamespaceTable| Constructor and Description |
|---|
RDFJSONWriter(OutputStream out,
RDFFormat actualFormat) |
RDFJSONWriter(Writer writer,
RDFFormat actualFormat) |
| Modifier and Type | Method and Description |
|---|---|
void |
endRDF() |
RDFFormat |
getRDFFormat() |
Collection<RioSetting<?>> |
getSupportedSettings() |
void |
handleComment(String comment) |
void |
handleNamespace(String prefix,
String uri) |
void |
handleStatement(Statement statement) |
static void |
modelToRdfJsonInternal(Model graph,
WriterConfig writerConfig,
com.fasterxml.jackson.core.JsonGenerator jg) |
static String |
resourceToString(Resource uriOrBnode)
Returns the correct syntax for a Resource, depending on whether it is a
URI or a Blank Node (ie, BNode)
|
void |
startRDF() |
static void |
writeObject(Value object,
Set<Resource> contexts,
com.fasterxml.jackson.core.JsonGenerator jg)
Helper method to reduce complexity of the JSON serialisation algorithm Any
null contexts will only be serialised to JSON if there are also non-null
contexts in the contexts array
|
getWriterConfig, setWriterConfigclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetWriterConfig, setWriterConfigpublic RDFJSONWriter(OutputStream out, RDFFormat actualFormat)
public void endRDF()
throws RDFHandlerException
endRDF in interface RDFHandlerRDFHandlerExceptionpublic RDFFormat getRDFFormat()
getRDFFormat in interface RDFWriterpublic Collection<RioSetting<?>> getSupportedSettings()
getSupportedSettings in interface RDFWritergetSupportedSettings in class RDFWriterBasepublic void handleComment(String comment) throws RDFHandlerException
handleComment in interface RDFHandlerRDFHandlerExceptionpublic void handleNamespace(String prefix, String uri) throws RDFHandlerException
handleNamespace in interface RDFHandlerhandleNamespace in class RDFWriterBaseRDFHandlerExceptionpublic void handleStatement(Statement statement) throws RDFHandlerException
handleStatement in interface RDFHandlerRDFHandlerExceptionpublic void startRDF()
throws RDFHandlerException
startRDF in interface RDFHandlerRDFHandlerExceptionpublic static void writeObject(Value object, Set<Resource> contexts, com.fasterxml.jackson.core.JsonGenerator jg) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
object - The RDF value to serialisevalueArray - The JSON Array to serialise the object tocontexts - The set of contexts that are relevant to this object, including
null contexts as they are found.IOExceptioncom.fasterxml.jackson.core.JsonGenerationExceptionJSONExceptionpublic static String resourceToString(Resource uriOrBnode)
uriOrBnode - The resource to serialise to a stringpublic static void modelToRdfJsonInternal(Model graph, WriterConfig writerConfig, com.fasterxml.jackson.core.JsonGenerator jg) throws IOException, com.fasterxml.jackson.core.JsonGenerationException
IOExceptioncom.fasterxml.jackson.core.JsonGenerationExceptionCopyright © 2001-2014 Aduna. All Rights Reserved.