protected void assertOpenConn() throws SailException { if(!openConn) { throw new SailException("Closed"); } }
/** * Unsupported API. */ @Override public void removeStatement(UpdateContext op, Resource subj, URI pred, Value obj, Resource... contexts) throws SailException { throw new SailException(ERR_OPENRDF_QUERY_MODEL); }
@Override protected void throwInterruptedException() throws SailException { throw new SailException("execution took too long"); } };
@Override protected void throwInterruptedException() throws SailException { throw new SailException("execution took too long"); } };
/** * Unsupported API. */ @Override public void startUpdate(UpdateContext op) throws SailException { throw new SailException(ERR_OPENRDF_QUERY_MODEL); }
protected void assertOpenConn() throws SailException { if(!openConn) { throw new SailException("Closed"); } }
protected void assertWritableConn() throws SailException { assertOpenConn(); if (readOnly) { throw new SailException("Read-only"); } }
/** * Manually call the garbage collector for the triple store. Otherwise it will run every hour. */ public void garbageCollect() throws SailException { try { persistence.garbageCollect(); } catch (SQLException e) { throw new SailException("error calling garbage collector",e); } }
@Override protected void closeInternal() throws SailException { try { databaseConnection.close(); } catch (SQLException e) { throw new SailException("database error while closing connection",e); } }
@Override public boolean hasNext() throws SailException { try { return evaluate.hasNext(); } catch (final QueryEvaluationException e) { throw new SailException(e); } }
protected void clearInternal(Resource... contexts) throws SailException { try { repoConnection.clear(contexts); } catch (RepositoryException e) { throw new SailException(e); } }
protected String getNamespaceInternal(String prefix) throws SailException { try { return repoConnection.getNamespace(prefix); } catch (RepositoryException e) { throw new SailException(e); } }
protected void removeStatementsInternal(Resource subj, IRI pred, Value obj, Resource... contexts) throws SailException { try { repoConnection.remove(subj, pred, obj, contexts); } catch (RepositoryException e) { throw new SailException(e); } }
protected long sizeInternal(Resource... contexts) throws SailException { try { return repoConnection.size(); } catch (RepositoryException e) { throw new SailException(e); } }
public boolean hasNext() throws SailException { try { return innerIter.hasNext(); } catch (RepositoryException e) { throw new SailException(e); } }
@Override public InferencerConnection getConnection() throws SailException { try { InferencerConnection con = (InferencerConnection)super.getConnection(); return new DirectTypeHierarchyInferencerConnection(con); } catch (ClassCastException e) { throw new SailException(e.getMessage(), e); } }
@Override protected void clearInternal(final Resource... aresource) throws SailException { try { final RyaURI[] graphs = new RyaURI[aresource.length]; for (int i = 0 ; i < graphs.length ; i++){ graphs[i] = RdfToRyaConversions.convertResource(aresource[i]); } ryaDAO.dropGraph(conf, graphs); } catch (final RyaDAOException e) { throw new SailException(e); } }
protected CloseableIteration<? extends Statement, SailException> getStatementsInternal( Resource subj, IRI pred, Value obj, boolean includeInferred, Resource... contexts) throws SailException { try { return new RepositoryStatementIteration( repoConnection.getStatements(subj, pred, obj, includeInferred && !inferenceDisabled, contexts)); } catch (RepositoryException e) { throw new SailException(e); } }
private static Repository createRepo(final String endpoint) throws SailException { Repository repo = new SPARQLRepository(endpoint); try { repo.initialize(); } catch (RepositoryException e) { throw new SailException(e); } return repo; } }
@Override public SailConnection getConnection() throws SailException { try { return new AuditingConnection(this, super.getConnection(), getPredecessors()); } catch (DatatypeConfigurationException e) { throw new SailException(e); } }