Package org.openrdf.model.impl

Examples of org.openrdf.model.impl.ValueFactoryImpl.createStatement()


                        if (c instanceof URI) {
                            // A named graph
                            final BNode ng = vf.createBNode();
                            writer.handleStatement(vf.createStatement(dataset, SPARQL_SD.namedGraph, ng));
                            writer.handleStatement(vf.createStatement(ng, RDF.TYPE, SPARQL_SD.NamedGraph));
                            writer.handleStatement(vf.createStatement(ng, SPARQL_SD.name, c));
                            final BNode g = vf.createBNode();
                            writer.handleStatement(vf.createStatement(ng, SPARQL_SD.graph, g));
                            writer.handleStatement(vf.createStatement(g, RDF.TYPE, SPARQL_SD.Graph));
                            // TODO: Number of triples here? This can be expensive!
                            writer.handleStatement(vf.createStatement(g, vf.createURI("http://rdfs.org/ns/void#triples"), vf.createLiteral(kiwiCon.size(c))));
View Full Code Here


                            final BNode ng = vf.createBNode();
                            writer.handleStatement(vf.createStatement(dataset, SPARQL_SD.namedGraph, ng));
                            writer.handleStatement(vf.createStatement(ng, RDF.TYPE, SPARQL_SD.NamedGraph));
                            writer.handleStatement(vf.createStatement(ng, SPARQL_SD.name, c));
                            final BNode g = vf.createBNode();
                            writer.handleStatement(vf.createStatement(ng, SPARQL_SD.graph, g));
                            writer.handleStatement(vf.createStatement(g, RDF.TYPE, SPARQL_SD.Graph));
                            // TODO: Number of triples here? This can be expensive!
                            writer.handleStatement(vf.createStatement(g, vf.createURI("http://rdfs.org/ns/void#triples"), vf.createLiteral(kiwiCon.size(c))));

                        }
View Full Code Here

                            writer.handleStatement(vf.createStatement(dataset, SPARQL_SD.namedGraph, ng));
                            writer.handleStatement(vf.createStatement(ng, RDF.TYPE, SPARQL_SD.NamedGraph));
                            writer.handleStatement(vf.createStatement(ng, SPARQL_SD.name, c));
                            final BNode g = vf.createBNode();
                            writer.handleStatement(vf.createStatement(ng, SPARQL_SD.graph, g));
                            writer.handleStatement(vf.createStatement(g, RDF.TYPE, SPARQL_SD.Graph));
                            // TODO: Number of triples here? This can be expensive!
                            writer.handleStatement(vf.createStatement(g, vf.createURI("http://rdfs.org/ns/void#triples"), vf.createLiteral(kiwiCon.size(c))));

                        }
                    }
View Full Code Here

                            writer.handleStatement(vf.createStatement(ng, SPARQL_SD.name, c));
                            final BNode g = vf.createBNode();
                            writer.handleStatement(vf.createStatement(ng, SPARQL_SD.graph, g));
                            writer.handleStatement(vf.createStatement(g, RDF.TYPE, SPARQL_SD.Graph));
                            // TODO: Number of triples here? This can be expensive!
                            writer.handleStatement(vf.createStatement(g, vf.createURI("http://rdfs.org/ns/void#triples"), vf.createLiteral(kiwiCon.size(c))));

                        }
                    }
                } finally {
                    cID.close();
View Full Code Here

        final Literal litWithNewline = vf.createLiteral("literal with newline\n");
        final Literal litWithSingleQuotes = vf.createLiteral("'''some single quote text''' - abc");
        final Literal litWithDoubleQuotes = vf
                .createLiteral("\"\"\"some double quote text\"\"\" - abc");

        final Statement st1 = vf.createStatement(bnode, uri1, plainLit);
        final Statement st2 = vf.createStatement(uri1, uri2, langLit, uri2);
        final Statement st3 = vf.createStatement(uri1, uri2, dtLit);
        final Statement st4 = vf.createStatement(uri1, uri2, litWithNewline);
        final Statement st5 = vf.createStatement(uri1, uri2, litWithSingleQuotes);
        final Statement st6 = vf.createStatement(uri1, uri2, litWithDoubleQuotes);
View Full Code Here

        final Literal litWithSingleQuotes = vf.createLiteral("'''some single quote text''' - abc");
        final Literal litWithDoubleQuotes = vf
                .createLiteral("\"\"\"some double quote text\"\"\" - abc");

        final Statement st1 = vf.createStatement(bnode, uri1, plainLit);
        final Statement st2 = vf.createStatement(uri1, uri2, langLit, uri2);
        final Statement st3 = vf.createStatement(uri1, uri2, dtLit);
        final Statement st4 = vf.createStatement(uri1, uri2, litWithNewline);
        final Statement st5 = vf.createStatement(uri1, uri2, litWithSingleQuotes);
        final Statement st6 = vf.createStatement(uri1, uri2, litWithDoubleQuotes);
View Full Code Here

        final Literal litWithDoubleQuotes = vf
                .createLiteral("\"\"\"some double quote text\"\"\" - abc");

        final Statement st1 = vf.createStatement(bnode, uri1, plainLit);
        final Statement st2 = vf.createStatement(uri1, uri2, langLit, uri2);
        final Statement st3 = vf.createStatement(uri1, uri2, dtLit);
        final Statement st4 = vf.createStatement(uri1, uri2, litWithNewline);
        final Statement st5 = vf.createStatement(uri1, uri2, litWithSingleQuotes);
        final Statement st6 = vf.createStatement(uri1, uri2, litWithDoubleQuotes);

        final ByteArrayOutputStream out = new ByteArrayOutputStream();
View Full Code Here

                .createLiteral("\"\"\"some double quote text\"\"\" - abc");

        final Statement st1 = vf.createStatement(bnode, uri1, plainLit);
        final Statement st2 = vf.createStatement(uri1, uri2, langLit, uri2);
        final Statement st3 = vf.createStatement(uri1, uri2, dtLit);
        final Statement st4 = vf.createStatement(uri1, uri2, litWithNewline);
        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);
View Full Code Here

        final Statement st1 = vf.createStatement(bnode, uri1, plainLit);
        final Statement st2 = vf.createStatement(uri1, uri2, langLit, uri2);
        final Statement st3 = vf.createStatement(uri1, uri2, dtLit);
        final Statement st4 = vf.createStatement(uri1, uri2, litWithNewline);
        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();
View Full Code Here

        final Statement st1 = vf.createStatement(bnode, uri1, plainLit);
        final Statement st2 = vf.createStatement(uri1, uri2, langLit, uri2);
        final Statement st3 = vf.createStatement(uri1, uri2, dtLit);
        final Statement st4 = vf.createStatement(uri1, uri2, litWithNewline);
        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);
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.