QueryLanguage queryLn = getQueryLanguage(params, response);
String baseURI = params.getFirstValue(BASEURI_PARAM_NAME);
try {
RepositoryConnection connection = RequestAtt.getConnection(request);
Query query = connection.prepareQuery(queryLn, queryStr, baseURI);
parseQueryParameters(query, params, connection.getValueFactory());
return query;
}
catch (StoreException e) {
throw new ResourceException(SERVER_ERROR_INTERNAL, "Failed to prepare query", e);