Search in sources :

Example 1 with ResultSetFormatter

use of org.apache.jena.query.ResultSetFormatter in project jena by apache.

the class RDFConnectionExample3 method main.

public static void main(String... args) {
    Query query = QueryFactory.create("SELECT * { <http://example.org/book/book1> ?p ?o }");
    String queryService = "http://sparql.org/books/query";
    // Query service, no update, no graph store protocol.
    try (RDFConnection conn = RDFConnectionFactory.connect(queryService, null, null)) {
        conn.queryResultSet(query, ResultSetFormatter::out);
    }
}
Also used : ResultSetFormatter(org.apache.jena.query.ResultSetFormatter) Query(org.apache.jena.query.Query) RDFConnection(org.apache.jena.rdfconnection.RDFConnection)

Aggregations

Query (org.apache.jena.query.Query)1 ResultSetFormatter (org.apache.jena.query.ResultSetFormatter)1 RDFConnection (org.apache.jena.rdfconnection.RDFConnection)1