@Test
public void testOpenQueryType()
{
final SecurityEvaluator eval = new MockSecurityEvaluator(true, true,
true, true, true, true);
final SecuredModel model = Factory.getInstance(eval,
"http://example.com/securedModel", baseModel);
try
{
final String query = "prefix fn: <http://www.w3.org/2005/xpath-functions#> "
+ " SELECT ?foo ?bar WHERE "
+ " { ?foo a <http://example.com/class> ; "
+ "?bar [] ."
+ " } ";
final QueryExecution qexec = QueryExecutionFactory.create(query,
model);
try
{
final ResultSet results = qexec.execSelect();
int count = 0;
for (; results.hasNext();)
{
count++;
final QuerySolution soln = results.nextSolution();
}
Assert.assertEquals(8, count);
}
finally
{
qexec.close();
}
}
finally
{
model.close();
}
}