JsonLDWriter extends WriterDatasetRIOTBase { private RDFFormat.JSONLDVariant getVariant() { return (RDFFormat.JSONLDVariant) format.getVariant(); } JsonLDWriter(RDFFormat syntaxForm); @Override Lang getLang(); @Override void write(Writer out, DatasetGraph dataset, PrefixMap prefixMap, String baseURI, Context context); @Override void write(OutputStream out, DatasetGraph dataset, PrefixMap prefixMap, String baseURI, Context context); static Object toJsonLDJavaAPI(RDFFormat.JSONLDVariant variant, DatasetGraph dataset, PrefixMap prefixMap, String baseURI, Context jenaContext); static final Symbol JSONLD_CONTEXT; static final Symbol JSONLD_CONTEXT_SUBSTITUTION; static final Symbol JSONLD_FRAME; static final Symbol JSONLD_OPTIONS; static final Symbol JSONLD_ADD_ALL_PREFIXES_TO_CONTEXT; }
@Test public final void roundTrip() { String ns = "http: Model m = simpleModel(ns); m.setNsPrefix("ex", ns); for (RDFFormat f : JSON_LD_FORMATS) { if (((RDFFormat.JSONLDVariant) f.getVariant()).isFrame()) continue; String s = toString(m, f, null); Model m2 = parse(s); assertTrue(m2.isIsomorphicWith(m)); } }