public boolean ask(final String queryStr,String externalQueryId) throws Exception {
  final RepositoryConnection cxn=cxn();
  UUID queryId=null;
  try {
    final BooleanQuery query=(BooleanQuery)cxn.prepareBooleanQuery(QueryLanguage.SPARQL,queryStr);
    setMaxQueryTime(query);
    if (query instanceof BigdataSailBooleanQuery && cxn instanceof BigdataSailRepositoryConnection) {
      final BigdataSailBooleanQuery bdtq=(BigdataSailBooleanQuery)query;
      queryId=setupQuery((BigdataSailRepositoryConnection)cxn,bdtq.getASTContainer(),QueryType.ASK,externalQueryId);
    }
    final boolean result=query.evaluate();
    return result;
  }
  finally {
    if (queryId != null) {
      finalizeQuery(queryId);
    }
  }
}

public boolean ask ( final String queryStr , String externalQueryId ) throws Exception { final RepositoryConnection cxn = cxn ( ) ; UUID queryId = null ; try { final BooleanQuery query = ( BooleanQuery ) cxn . prepareBooleanQuery ( QueryLanguage . SPARQL , queryStr ) ; setMaxQueryTime ( query ) ; if ( query instanceof BigdataSailBooleanQuery && cxn instanceof BigdataSailRepositoryConnection ) { final BigdataSailBooleanQuery bdtq = ( BigdataSailBooleanQuery ) query ; queryId = setupQuery ( ( BigdataSailRepositoryConnection ) cxn , bdtq . getASTContainer ( ) , QueryType . ASK , externalQueryId ) ; } final boolean result = query . evaluate ( ) ; return result ; } finally { if ( queryId != null ) { finalizeQuery ( queryId ) ; } } }
select results using a sparql query .
