Package org.openrdf.rio

Examples of org.openrdf.rio.WriterConfig


   
    private WriterConfig config;
   
    public SPARQLResultsHTMLWriter(OutputStream out) {
        this.out = out;
        this.config = new WriterConfig();
    }
View Full Code Here


                + "@prefix dc:    <http://purl.org/dc/elements/1.1/> ."
                + " :G { "
                + "  <http://www.example.com/archive/100/v1> dc:isVersionOf <http://www.example.com/resource/100>    .        }";
        Model parse = Rio.parse(new StringReader(input), "", RDFFormat.TRIG);

        WriterConfig config = new WriterConfig();
        config.set(JSONLDSettings.JSONLD_MODE, JSONLDMode.COMPACT);

        StringWriter output = new StringWriter();
        Rio.write(parse, output, RDFFormat.JSONLD, config);

        System.out.println(output);
View Full Code Here

        final Statement st5 = vf.createStatement(uri1, uri2, litWithSingleQuotes);
        final Statement st6 = vf.createStatement(uri1, uri2, litWithDoubleQuotes);

        final ByteArrayOutputStream out = new ByteArrayOutputStream();
        final RDFWriter rdfWriter = rdfWriterFactory.getWriter(out);
        final WriterConfig writerConfig = rdfWriter.getWriterConfig();
        writerConfig.set(BasicWriterSettings.RDF_LANGSTRING_TO_LANG_LITERAL, true);
        writerConfig.set(BasicWriterSettings.XSD_STRING_TO_PLAIN_LITERAL, true);
        rdfWriter.handleNamespace("ex", ex);
        rdfWriter.startRDF();
        rdfWriter.handleStatement(st1);
        rdfWriter.handleStatement(st2);
        rdfWriter.handleStatement(st3);
View Full Code Here

TOP

Related Classes of org.openrdf.rio.WriterConfig

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.