use of org.apache.jena.query.ResultSet in project jena by apache.
the class TestSolverTDB method solve_03.
@Test
public void solve_03() {
// Above everything.
ResultSet rs1 = exec("(bgp (:zzzz :p 999999))", graph);
ResultSet rs2 = results("empty");
equals(rs1, rs2);
}
use of org.apache.jena.query.ResultSet in project jena by apache.
the class TestSolverTDB method solve_06.
@Test
public void solve_06() {
ResultSet rs1 = exec("(bgp (:s ?p ?o))", graph);
ResultSet rs2 = results("(row (?p :p) (?o :o))", "(row (?p :p) (?o 10))", "(row (?p :p) (?o :x))");
equals(rs1, rs2);
}
use of org.apache.jena.query.ResultSet in project jena by apache.
the class TestResultSetThrift method test.
private static ResultSetRewindable test(ResultSetRewindable resultSet) {
resultSet.reset();
ByteArrayOutputStream out = new ByteArrayOutputStream();
BinRDF.writeResultSet(out, resultSet, true);
resultSet.reset();
ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray());
ResultSet rs$ = BinRDF.readResultSet(in);
ResultSetRewindable resultSet2 = ResultSetFactory.makeRewindable(rs$);
// Includes bnode labels.
ResultSetCompare.equalsExact(resultSet, resultSet2);
resultSet.reset();
resultSet2.reset();
return resultSet2;
}
use of org.apache.jena.query.ResultSet in project jena by apache.
the class TestResultSetThrift method resultSet_10.
@Test
public void resultSet_10() {
try (InputStream in = IO.openFile(DIR + "/results-1.srj")) {
ResultSet rs = ResultSetFactory.fromJSON(in);
test(ResultSetFactory.copyResults(rs));
} catch (IOException ex) {
IO.exception(ex);
}
}
use of org.apache.jena.query.ResultSet in project jena by apache.
the class TestResultSet method make2Peekable.
private ResultSetPeekable make2Peekable(String var1, Node val1, String var2, Node val2) {
ResultSet rs = make(var1, val1, var2, val2);
ResultSetPeekable rsp = ResultSetFactory.makePeekable(rs);
return rsp;
}
Aggregations