|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectse.kmr.scam.rest.util.RDFJSON
public class RDFJSON
A utility class to help converting Sesame Graphs from and to RDF/JSON.
| Constructor Summary | |
|---|---|
RDFJSON()
|
|
| Method Summary | |
|---|---|
static String |
graphToRdfJsonPreordered(Set<org.openrdf.model.Statement> graph)
Outputs an ordered set of Statements directly to JSON |
static Writer |
graphToRdfJsonPreordered(Set<org.openrdf.model.Statement> graph,
Writer writer)
Outputs an ordered set of Statements directly to JSON NOTE: The statements must be ordered by a comparator that orders null before other values, or the contexts may not be written correctly |
static Collection<org.openrdf.model.Statement> |
rdfJsonToGraph(String json)
Implementation using the json.org API. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RDFJSON()
| Method Detail |
|---|
public static Collection<org.openrdf.model.Statement> rdfJsonToGraph(String json)
json - The RDF/JSON string to be parsed and converted into a Collectionpublic static String graphToRdfJsonPreordered(Set<org.openrdf.model.Statement> graph)
graph - A Set of Statements that are preordered in the
order subject>predicate>object>context so that it can be
output directly without any further checks
public static Writer graphToRdfJsonPreordered(Set<org.openrdf.model.Statement> graph,
Writer writer)
graph - A Set of Statements that are preordered in the
order subject>predicate>object>context so that it can be
output directly without any further checkswriter - The output writer to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||