private Boolean parseBooleanResult(Response theResponse) throws QueryResultParseException, UnsupportedQueryResultFormatException, IOException { return QueryResultIO.parseBoolean(theResponse.getContent(), BooleanQueryResultFormat.SPARQL); }
private boolean readExpectedBooleanQueryResult() throws Exception { Optional<QueryResultFormat> bqrFormat = BooleanQueryResultParserRegistry.getInstance().getFileFormatForFileName(resultFileURL); if (bqrFormat.isPresent()) { InputStream in = new URL(resultFileURL).openStream(); try { return QueryResultIO.parseBoolean(in, bqrFormat.get()); } finally { in.close(); } } else { Set<Statement> resultGraph = readExpectedGraphQueryResult(); return DAWGTestResultSetUtil.toBooleanQueryResult(resultGraph); } }