Package org.aksw.jenax.ron
Class RdfElementVisitorRdfToJsonNt
java.lang.Object
org.aksw.jenax.ron.RdfElementVisitorRdfToJsonNt
- All Implemented Interfaces:
RdfElementVisitor<com.google.gson.JsonElement>
public class RdfElementVisitorRdfToJsonNt
extends Object
implements RdfElementVisitor<com.google.gson.JsonElement>
Json-NT is simply json where keys and literals are all strings that contain
RDF terms in n-triples serialization.
The format is sub-par from a parsing perspective because the document needs to be parsed first as
JSON and then each string literal as an RDF term.
However, other than that it is very easy to work with.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetPlainString(org.apache.jena.graph.Node node) static com.google.gson.JsonElementnodeToJsonElement(org.apache.jena.graph.Node node) static Stringpath0ToName(org.apache.jena.sparql.path.P_Path0 path) static Stringpath0ToNt(org.apache.jena.sparql.path.P_Path0 path) com.google.gson.JsonElementcom.google.gson.JsonElementvisit(RdfLiteral element) com.google.gson.JsonElementcom.google.gson.JsonElement
-
Constructor Details
-
RdfElementVisitorRdfToJsonNt
public RdfElementVisitorRdfToJsonNt()
-
-
Method Details
-
visit
- Specified by:
visitin interfaceRdfElementVisitor<com.google.gson.JsonElement>
-
visit
- Specified by:
visitin interfaceRdfElementVisitor<com.google.gson.JsonElement>
-
visit
- Specified by:
visitin interfaceRdfElementVisitor<com.google.gson.JsonElement>
-
visit
- Specified by:
visitin interfaceRdfElementVisitor<com.google.gson.JsonElement>
-
path0ToName
-
getPlainString
-
path0ToNt
-
nodeToJsonElement
public static com.google.gson.JsonElement nodeToJsonElement(org.apache.jena.graph.Node node)
-