logger.debug("metadata = {}", ((ProtocolResult)r).getMetadata());
}
}
public static void testQuery() throws Exception {
DataSource myDS = new ProtocolDataSource("http://DBpedia.org/sparql");
Connection conn = myDS.getConnection(NoCredentials.INSTANCE);
Command query = conn.createCommand("SELECT ?p ?o WHERE { <http://dbpedia.org/resource/Terry_Gilliam> ?p ?o }");
Solutions solutions = query.executeQuery();
showMetadata(solutions);
logger.debug("vars = {}", solutions.getVariables());
int row = 0;
while(solutions.next()) {
logger.debug("Row {}: {}", ++row, solutions.getResult());
}
solutions.close();
query.close();
conn.close();
myDS.close();
}