use of org.apache.jena.query.ResultSet in project jena by apache.
the class TestResultSet method test_RS_9.
@Test
public void test_RS_9() {
ResultSet rs = ResultSetFactory.load("testing/ResultSet/output.srx");
test_RS_fmt(rs, ResultsFormat.FMT_RDF_XML, false);
}
use of org.apache.jena.query.ResultSet in project jena by apache.
the class TestResultSet method test_RS_1_str.
@Test
public void test_RS_1_str() {
ResultSetRewindable rs1 = new ResultSetMem();
String x = ResultSetFormatter.asXMLString(rs1);
rs1.reset();
ResultSet rs2 = ResultSetFactory.fromXML(x);
assertTrue(ResultSetCompare.equalsByTerm(rs1, rs2));
}
use of org.apache.jena.query.ResultSet in project jena by apache.
the class TestResultSet method test_RS_cmp_3.
@Test
public void test_RS_cmp_3() {
ResultSet rs1 = make("x", org.apache.jena.graph.NodeFactory.createURI("tag:local"));
ResultSet rs2 = new ResultSetMem();
assertFalse(ResultSetCompare.equalsByTerm(rs1, rs2));
}
use of org.apache.jena.query.ResultSet in project jena by apache.
the class TestResultSet method test_RS_7.
// Into some format.
@Test
public void test_RS_7() {
ResultSet rs = ResultSetFactory.load("testing/ResultSet/output.srx");
test_RS_fmt(rs, ResultsFormat.FMT_RS_XML, true);
}
use of org.apache.jena.query.ResultSet in project jena by apache.
the class TestResultSet method test_RS_2.
@Test
public void test_RS_2() {
ResultSetRewindable rs1 = makeRewindable("x", org.apache.jena.graph.NodeFactory.createURI("tag:local"));
ByteArrayOutputStream arr = new ByteArrayOutputStream();
ResultSetFormatter.outputAsXML(arr, rs1);
rs1.reset();
ByteArrayInputStream ins = new ByteArrayInputStream(arr.toByteArray());
ResultSet rs2 = ResultSetFactory.fromXML(ins);
assertTrue(ResultSetCompare.equalsByTerm(rs1, rs2));
}
Aggregations