Examples of fromRDF()


Examples of com.github.jsonldjava.core.JsonLdApi.fromRDF()

            opts.setCompactArrays(true);
            // opts.keepFreeFloatingNodes = false;
            final JsonLdApi api = new JsonLdApi(opts);
            final JenaRDFParser parser = new JenaRDFParser();
            final RDFDataset result = parser.parse(dataset);
            Object obj = api.fromRDF(result);
            final Map<String, Object> localCtx = new HashMap<String, Object>();
            localCtx.put("@context", ctx);

            // TODO: How/when to do simplify vs compact?
            // if (false)
View Full Code Here

Examples of com.github.jsonldjava.core.JsonLdApi.fromRDF()

        final JsonLdOptions options = new JsonLdOptions();
        options.format = "application/ld+json";
        final JsonLdApi api = new JsonLdApi(options);
        final RDFDataset dataset = new RDFDataset(api);
        final Object json = api.fromRDF(dataset);
        final String jsonStr = JSONUtils.toPrettyString(json);
        System.out.println(jsonStr);
        // [ {
        // "@id" : "http://example.com/test",
        // "http://example.com/value" : [ {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.