public void Construct(SelectableSource source, StatementSink sink)
{
if (!(query is ConstructQuery))
throw new InvalidOperationException("Only CONSTRUCT queries are supported by this method (" + query.GetType() + ").");
ConstructQuery q = (ConstructQuery)query;
RdfSourceWrapper sourcewrapper = BindLogic(source);
try {
RdfGraph graph = q.execute(sourcewrapper);
WriteGraph(graph, sourcewrapper, sink);
} catch (name.levering.ryan.sparql.common.QueryException e) {
throw new QueryExecutionException("Error executing query: " + e.Message, e);
}
}