+ " mf:action {} qt:query {query}; " + " qt:data {input} "
+ "USING NAMESPACE " + " mf = <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>, "
+ " qt = <http://www.w3.org/2001/sw/DataAccess/tests/test-query#>, "
+ " tck = <urn:openrdf.org:sesame:tests#> ";
TupleQueryResult tests = con.prepareTupleQuery(QueryLanguage.SERQL, query).evaluate();
while (tests.hasNext()) {
BindingSet testBindings = tests.next();
String testName = ((Literal)testBindings.getValue("testName")).getLabel();
String inputFile = testBindings.getValue("input").toString();
String queryFile = testBindings.getValue("query").toString();
String resultFile = testBindings.getValue("result").toString();
String entailment = ((Literal)testBindings.getValue("entailment")).getLabel();
query = "SELECT graph " + "FROM {} mf:name {testName}; "
+ " mf:action {} qt:graphData {graph} " + "WHERE testName = \""
+ SeRQLUtil.encodeString(testName) + "\" " + "USING NAMESPACE"
+ " mf = <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#>,"
+ " qt = <http://www.w3.org/2001/sw/DataAccess/tests/test-query#>";
List<String> graphNames = new ArrayList<String>();
TupleQueryResult graphs = con.prepareTupleQuery(QueryLanguage.SERQL, query).evaluate();
while (graphs.hasNext()) {
BindingSet graphBindings = graphs.next();
graphNames.add(graphBindings.getValue("graph").toString());
}
graphs.close();
suite.addTest(new SeRQLQueryTest(testName, inputFile, graphNames, queryFile, resultFile, entailment));
}
tests.close();