Search in sources :

Example 21 with QueryExec

use of org.apache.jena.sparql.exec.QueryExec in project jena by apache.

the class AbstractTestRDFLink method query_01.

@Test
public void query_01() {
    try (RDFLink link = link()) {
        Txn.executeRead(link, () -> {
            try (QueryExec qExec = link.query("SELECT ?x {}")) {
                RowSet rs = qExec.select();
                assertNotNull(rs);
            }
        });
    }
}
Also used : QueryExec(org.apache.jena.sparql.exec.QueryExec) RowSet(org.apache.jena.sparql.exec.RowSet) Test(org.junit.Test)

Aggregations

QueryExec (org.apache.jena.sparql.exec.QueryExec)21 Test (org.junit.Test)18 DatasetGraph (org.apache.jena.sparql.core.DatasetGraph)14 EnvTest (org.apache.jena.test.conn.EnvTest)12 RowSet (org.apache.jena.sparql.exec.RowSet)11 RDFLink (org.apache.jena.rdflink.RDFLink)10 HttpRequestModifier (org.apache.jena.http.sys.HttpRequestModifier)5 Binding (org.apache.jena.sparql.engine.binding.Binding)5 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)4 Graph (org.apache.jena.graph.Graph)4 Node (org.apache.jena.graph.Node)4 Triple (org.apache.jena.graph.Triple)3 RegistryRequestModifier (org.apache.jena.http.sys.RegistryRequestModifier)3 RDFLinkFactory (org.apache.jena.rdflink.RDFLinkFactory)3 SSE (org.apache.jena.sparql.sse.SSE)3 AfterClass (org.junit.AfterClass)3 Before (org.junit.Before)3 BeforeClass (org.junit.BeforeClass)3 HashMap (java.util.HashMap)2 List (java.util.List)2