SPARQL { public static Boolean executeAsk(final String query, final String endpoint) { QueryExecutionFactory qef = new QueryExecutionFactoryHttp(endpoint); QueryExecution qe = qef.createQueryExecution(query); closeExecFactory(qef); return qe.execAsk(); } SPARQL();  SPARQL(final String endpoint); Set<RDFNode> sparql(final String query); static Set<String> extractAnswerStrings(final Set<RDFNode> answers); static Results executeSelect(final String query, final String endpoint); static Boolean executeAsk(final String query, final String endpoint); long getCacheTimeToLive(); void setCacheTimeToLive(final long timeToLive); static boolean isValidSparqlQuery(final String sparql); static boolean isEndpointAlive(final String endpoint); public QueryExecutionFactory qef; }
@Test public void testAsk() { assertFalse(SPARQL.executeAsk("PREFIX foaf: <http: assertTrue(SPARQL.executeAsk("PREFIX foaf: <http: }