@Override protected QueryEvaluationException convert(Exception exception) { return new QueryEvaluationException(exception); } };
private void rfe10256_fail(TupleQuery tupleQuery) throws QueryEvaluationException { try { tupleQuery.evaluate(); fail("expected QueryEvaluationException"); } catch (QueryEvaluationException e) { if (e.getMessage().contains("Undefined functor in Prolog query")) { // good } else { throw e; } } }
@Override protected QueryEvaluationException convert(Exception e) { return new QueryEvaluationException(e); } };
@Override protected void handleSailException(SailException e) throws QueryEvaluationException { throw new QueryEvaluationException(e); } };
@Override protected void throwInterruptedException() throws QueryEvaluationException { throw new QueryEvaluationException("Query evaluation exceeded specified timeout " + evaluationTimeout + "s"); } };
@Override protected QueryEvaluationException convert(Exception e) { throw new QueryEvaluationException(e); }
@Override protected QueryEvaluationException convert(Exception e) { throw new QueryEvaluationException(e); }
@Override public void remove() throws QueryEvaluationException { throw new QueryEvaluationException("The query result is read-only. Elements cannot be removed"); }
@Override protected QueryEvaluationException convert(Exception e) { throw new QueryEvaluationException(e); }
@Override protected QueryEvaluationException convert(Exception e) { throw new QueryEvaluationException(e); }
@Override public CloseableIteration<? extends Statement, QueryEvaluationException> getStatements(Resource subj, IRI pred, Value obj, Resource... contexts) throws QueryEvaluationException { try { return new ExceptionConvertingIteration<Statement, QueryEvaluationException>(createScanner(startTime, subj, pred, obj, contexts)) { @Override protected QueryEvaluationException convert(Exception e) { return new QueryEvaluationException(e); } }; } catch (SailException ex) { throw new QueryEvaluationException(ex); } }
@Override protected QueryEvaluationException convert(Exception e) { throw new QueryEvaluationException(e); }
@Override public void remove() throws QueryEvaluationException { throw new QueryEvaluationException("The query result is read-only. Elements cannot be removed"); }
@Override protected QueryEvaluationException convert(Exception e) { throw new QueryEvaluationException(e); }
protected QueryEvaluationException convert(Exception e) { return new QueryEvaluationException(e); }
@Override protected void increment() throws QueryEvaluationException { if (used.incrementAndGet() > maxSize) { throw new QueryEvaluationException( "Size limited reached inside order operator query, max size is:" + maxSize); } }
@Override protected void increment() throws QueryEvaluationException { if (used.incrementAndGet() > maxSize) { throw new QueryEvaluationException( "Size limited reached inside order operator query, max size is:" + maxSize); } }
@Override protected BindingSet getNextElement() throws QueryEvaluationException { try { while (true) { BindingSet bs = queue.poll(1, TimeUnit.SECONDS); if (exception != null) throw new QueryEvaluationException(exception); if (timeout > 0 && System.currentTimeMillis() - startTime > 1000l * timeout) throw new QueryEvaluationException("Query evaluation exceeded specified timeout " + timeout + "s"); if (bs != null) { return bs == NULL ? null : bs; } } } catch (InterruptedException ex) { throw new QueryEvaluationException(ex); } }
@Override protected void put(Map<BindingSet, List<BindingSet>> hashTable, BindingSet hashKey, List<BindingSet> hashValue) throws QueryEvaluationException { List<BindingSet> put = hashTable.put(hashKey, hashValue); if (put == null && used.incrementAndGet() > maxSize) { throw new QueryEvaluationException(SIZE_LIMIT_REACHED + maxSize); } }
protected void putHashTableEntry(Map<BindingSetHashKey, List<BindingSet>> hashTable, BindingSetHashKey hashKey, List<BindingSet> hashValue) throws QueryEvaluationException { List<BindingSet> put = hashTable.put(hashKey, hashValue); if (put == null && used.incrementAndGet() > maxSize) { throw new QueryEvaluationException(SIZE_LIMIT_REACHED + maxSize); } }