Search in sources :

Example 6 with RDFConnectionRemoteBuilder

use of org.apache.jena.rdfconnection.RDFConnectionRemoteBuilder in project jena by apache.

the class RDFConnectionExample5 method main.

public static void main(String... args) {
    RDFConnectionRemoteBuilder builder = RDFConnectionRemote.newBuilder().destination("http://sparql.org/").queryEndpoint("sparql").updateEndpoint(null).gspEndpoint(null);
    Query query = QueryFactory.create("SELECT * { BIND('Hello'as ?text) }");
    // See example 5.
    try (RDFConnection conn = builder.build()) {
        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) RDFConnectionRemoteBuilder(org.apache.jena.rdfconnection.RDFConnectionRemoteBuilder)

Aggregations

RDFConnectionRemoteBuilder (org.apache.jena.rdfconnection.RDFConnectionRemoteBuilder)6 RDFConnection (org.apache.jena.rdfconnection.RDFConnection)4 Test (org.junit.Test)3 Query (org.apache.jena.query.Query)2 ResultSetFormatter (org.apache.jena.query.ResultSetFormatter)2 RDFConnectionFuseki (org.apache.jena.rdfconnection.RDFConnectionFuseki)2 FusekiServer (org.apache.jena.fuseki.main.FusekiServer)1 Graph (org.apache.jena.graph.Graph)1 Node (org.apache.jena.graph.Node)1 Triple (org.apache.jena.graph.Triple)1 QueryExecution (org.apache.jena.query.QueryExecution)1 Model (org.apache.jena.rdf.model.Model)1