Package com.github.jsonldjava.core

Examples of com.github.jsonldjava.core.JsonLdTripleCallback


    @Override
    public void read(InputStream in, String baseURI, ContentType ct, final StreamRDF output,
            Context context) {
        try {
            final Object jsonObject = JSONUtils.fromInputStream(in);
            final JSONLDTripleCallback callback = new JSONLDTripleCallback() {

                @Override
                // public Object call(Map<String, Object> dataset) {
                public Object call(RDFDataset dataset) {
                    for (final String gn : dataset.keySet()) {
View Full Code Here


                add("<http://localhost:8080/foo1> <http://foo.com/code> \"123\"^^<http://www.w3.org/2001/XMLSchema#string> .");
                add("<http://localhost:8080/foo2> <http://foo.com/code> \"ABC\"^^<http://www.w3.org/2001/XMLSchema#string> .");
            }
        };

        final JSONLDTripleCallback callback = new JenaTripleCallback();
        final Model model = (Model) JsonLdProcessor.toRDF(input, callback);

        final StringWriter w = new StringWriter();
        model.write(w, "N-TRIPLE");
View Full Code Here

TOP

Related Classes of com.github.jsonldjava.core.JsonLdTripleCallback

Copyright © 2018 www.massapicom. 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.