Package org.openrdf.sail

Examples of org.openrdf.sail.SailException


    protected void commitInternal() throws SailException {
        try {
            valueFactory.releaseRegistry(databaseConnection);
            databaseConnection.commit();
        } catch (SQLException e) {
            throw new SailException("database error while committing transaction",e);
        }
        if(triplesAdded || triplesRemoved) {

            store.notifySailChanged(new SailChangedEvent() {
                @Override
View Full Code Here


    protected void rollbackInternal() throws SailException {
        try {
            valueFactory.releaseRegistry(databaseConnection);
            databaseConnection.rollback();
        } catch (SQLException e) {
            throw new SailException("database error while rolling back transaction",e);
        }
    }
View Full Code Here

                }
                valueFactory.removeStatement(triple);
            }
            triples.close();
        } catch(SQLException ex) {
            throw new SailException("database error while deleting statement",ex);
        }
    }
View Full Code Here

                }
                valueFactory.removeStatement(triple);
            }
            triples.close();
        } catch(SQLException ex) {
            throw new SailException("database error while deleting statement",ex);
        }
        return true;
    }
View Full Code Here

                databaseConnection.deleteTriple(triple);
                triplesRemoved = true;
                notifyStatementRemoved(triple);
            }
        } catch(SQLException ex) {
            throw new SailException("database error while deleting statement",ex);
        }
        return true;
    }
View Full Code Here

                 * Converts an exception from the underlying iteration to an exception of
                 * type <tt>X</tt>.
                 */
                @Override
                protected SailException convert(Exception e) {
                    return new SailException("database error while iterating over namespaces",e);
                }
            };
        } catch (SQLException e) {
            throw new SailException("database error while querying namespaces",e);
        }
    }
View Full Code Here

                return result.getUri();
            } else {
                return null;
            }
        } catch (SQLException e) {
            throw new SailException("database error while querying namespaces",e);
        }
    }
View Full Code Here

                }
            } else {
                databaseConnection.storeNamespace(new KiWiNamespace(prefix,name));
            }
        } catch (SQLException e) {
            throw new SailException("database error while updating namespace",e);
        }
    }
View Full Code Here

            KiWiNamespace result = databaseConnection.loadNamespaceByPrefix(prefix);
            if(result != null) {
                databaseConnection.deleteNamespace(result);
            }
        } catch (SQLException e) {
            throw new SailException("database error while deleting namespace",e);
        }
    }
View Full Code Here

                // join the results of the cache connection and the wrapped connection in a single result
                return new UnionIteration<Statement, SailException>(
                        new ExceptionConvertingIteration<Statement, SailException>(cachingConnection.getStatements(subj,pred,obj,includeInferred, contexts)) {
                            @Override
                            protected SailException convert(Exception e) {
                                return new SailException("error while accessing cache connection",e);
                            }

                            @Override
                            protected void handleClose() throws SailException {
                                super.handleClose();

                                try {
                                    cachingConnection.close();
                                } catch (RepositoryException e) {
                                    throw new SailException("error while closing cache connection",e);
                                }
                            }
                        },
                        super.getStatements(subj, pred, obj, includeInferred, contexts)
                );
            } catch (RepositoryException e) {
                throw new SailException("error while accessing cache connection",e);
            }
        } else {
            return super.getStatements(subj, pred, obj, includeInferred, contexts);
        }
    }
View Full Code Here

TOP

Related Classes of org.openrdf.sail.SailException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.