Examples of SesameJSONLDWriter


Examples of com.github.jsonldjava.sesame.SesameJSONLDWriter

     * @throws RDFHandlerException
     */
    private InputStream writeJSONLD(Model statements) throws RDFHandlerException {
        final StringWriter writer = new StringWriter();

        final RDFWriter jsonldWriter = new SesameJSONLDWriter(writer);
        jsonldWriter.startRDF();
        for (final Statement nextStatement : statements) {
            jsonldWriter.handleStatement(nextStatement);
        }
        jsonldWriter.endRDF();

        // System.out.println(writer.toString());

        return new ByteArrayInputStream(writer.toString().getBytes(Charset.forName("UTF-8")));
    }
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.