Package org.aksw.jenax.io.json.writer
Class RdfObjectNotationWriterViaJson
java.lang.Object
org.aksw.jenax.io.json.writer.RdfObjectNotationWriterViaJson
- All Implemented Interfaces:
Flushable,ObjectNotationWriter<org.apache.jena.sparql.path.P_Path0,,org.apache.jena.graph.Node> ObjectNotationWriterExt<org.apache.jena.sparql.path.P_Path0,,org.apache.jena.graph.Node, RdfObjectNotationWriter> RdfObjectNotationWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.google.gson.Gsonprotected com.google.gson.stream.JsonWriter -
Constructor Summary
ConstructorsConstructorDescriptionRdfObjectNotationWriterViaJson(com.google.gson.Gson gson, com.google.gson.stream.JsonWriter jsonWriter) RdfObjectNotationWriterViaJson(com.google.gson.Gson gson, com.google.gson.stream.JsonWriter jsonWriter, boolean rdfTermMode) -
Method Summary
Modifier and TypeMethodDescriptionendArray()voidflush()name(org.apache.jena.sparql.path.P_Path0 name) static StringnodeToJsonKey(org.apache.jena.graph.Node name) static StringnodeToJsonKey(org.apache.jena.sparql.path.P_Path0 name) static com.google.gson.JsonElementtoJson(org.apache.jena.graph.Node value) value(org.apache.jena.graph.Node value) Write a primitive value (should exclude null)
-
Field Details
-
gson
protected com.google.gson.Gson gson -
jsonWriter
protected com.google.gson.stream.JsonWriter jsonWriter
-
-
Constructor Details
-
RdfObjectNotationWriterViaJson
public RdfObjectNotationWriterViaJson(com.google.gson.Gson gson, com.google.gson.stream.JsonWriter jsonWriter) -
RdfObjectNotationWriterViaJson
public RdfObjectNotationWriterViaJson(com.google.gson.Gson gson, com.google.gson.stream.JsonWriter jsonWriter, boolean rdfTermMode)
-
-
Method Details
-
flush
- Specified by:
flushin interfaceFlushable- Throws:
IOException
-
beginArray
- Specified by:
beginArrayin interfaceObjectNotationWriter<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node> - Specified by:
beginArrayin interfaceObjectNotationWriterExt<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node, RdfObjectNotationWriter> - Throws:
IOException
-
endArray
- Specified by:
endArrayin interfaceObjectNotationWriter<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node> - Specified by:
endArrayin interfaceObjectNotationWriterExt<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node, RdfObjectNotationWriter> - Throws:
IOException
-
beginObject
- Specified by:
beginObjectin interfaceObjectNotationWriter<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node> - Specified by:
beginObjectin interfaceObjectNotationWriterExt<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node, RdfObjectNotationWriter> - Throws:
IOException
-
endObject
- Specified by:
endObjectin interfaceObjectNotationWriter<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node> - Specified by:
endObjectin interfaceObjectNotationWriterExt<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node, RdfObjectNotationWriter> - Throws:
IOException
-
name
- Specified by:
namein interfaceObjectNotationWriter<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node> - Specified by:
namein interfaceObjectNotationWriterExt<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node, RdfObjectNotationWriter> - Throws:
IOException
-
value
Description copied from interface:ObjectNotationWriterWrite a primitive value (should exclude null)- Specified by:
valuein interfaceObjectNotationWriter<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node> - Specified by:
valuein interfaceObjectNotationWriterExt<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node, RdfObjectNotationWriter> - Throws:
IOException
-
nullValue
- Specified by:
nullValuein interfaceObjectNotationWriter<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node> - Specified by:
nullValuein interfaceObjectNotationWriterExt<org.apache.jena.sparql.path.P_Path0,org.apache.jena.graph.Node, RdfObjectNotationWriter> - Specified by:
nullValuein interfaceRdfObjectNotationWriter- Throws:
IOException
-
toJson
public static com.google.gson.JsonElement toJson(org.apache.jena.graph.Node value) -
nodeToJsonKey
-
nodeToJsonKey
-