@Override public boolean getValue() throws OWLException { try { return resultSet.getValue(); } catch (OntopConnectionException e) { throw new OntopOWLException(e); } }
@Override public void close() throws OWLException { try { resultSet.close(); } catch (OntopConnectionException e) { throw new OntopOWLException(e); } } }
private boolean executeConsistencyQuery(String strQuery) throws OWLException { try (OntopConnection connection = queryEngine.getConnection(); OntopStatement st = connection.createStatement()) { AskQuery query = inputQueryFactory.createAskQuery(strQuery); BooleanResultSet trs = st.execute(query); if (trs != null) { boolean b = trs.getValue(); trs.close(); if (b) return false; } return true; } catch (Exception e) { throw new OWLException(e); } }
@Override public boolean evaluate() throws QueryEvaluationException { AskQuery query = factory.createAskQuery(getQueryString(), getParsedQuery()); try (OntopStatement stm = conn.createStatement(); BooleanResultSet rs = stm.execute(query)) { return rs.getValue(); } catch (OntopConnectionException | OntopQueryAnsweringException e) { throw new QueryEvaluationException(e); } }
@Override public boolean evaluate() throws QueryEvaluationException { AskQuery query = factory.createAskQuery(getQueryString(), getParsedQuery()); try (OntopStatement stm = conn.createStatement(); BooleanResultSet rs = stm.execute(query)) { return rs.getValue(); } catch (OntopConnectionException | OntopQueryAnsweringException e) { throw new QueryEvaluationException(e); } }