public GraphQuery prepareGraphQuery(QueryLanguage language, final String query, String baseURI) throws RepositoryException, MalformedQueryException {
if (language != QueryLanguage.SPARQL)
throw new UnsupportedQueryLanguageException(" : Only SPARQL queries are supported");
GraphQuery q = new VirtuosoGraphQuery() {
public GraphQueryResult evaluate() throws QueryEvaluationException {
return executeSPARQLForGraphResult(query, getDataset(), getIncludeInferred(), getBindings());
}
public void evaluate(RDFHandler handler) throws QueryEvaluationException, RDFHandlerException {