if (asynchronous) {
QueryTask task = new QueryTask(query, sink);
taskSet.add(task);
} else {
GetStatementsQuery sesameQuery;
try {
sesameQuery = new GetStatementsQuery(query, this);
} catch (GetStatementsQuery.InvalidQueryException e) {
logger.fine("invalid query: " + e.getMessage());
return;
}
Sink<Value> valueSink = new Sink<Value>() {
public void put(final Value val) throws RippleException {
//System.out.println("got value: " + val);
sink.put(canonicalValue(new RDFValue(val)));
}
};
try {
sesameQuery.getValues(sailConnection, valueSink);
} catch (RippleException e) {
reset(true);
throw e;
}
//getStatements( query.subject, query.predicate, query.object, stSink, query.includeInferred );