Package org.openrdf.repository

Examples of org.openrdf.repository.RepositoryException


    public RepositoryResult<Resource> getResources() throws RepositoryException {
        try {
            return new RepositoryResult<Resource>(new ExceptionConvertingIteration<Resource,RepositoryException>(databaseConnection.listResources()) {
                @Override
                protected RepositoryException convert(Exception e) {
                    return new RepositoryException(e);
                }
            });
        } catch (SQLException e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here


    public RepositoryResult<URI> getResources(String prefix) throws RepositoryException {
        try {
            return new RepositoryResult<URI>(new ExceptionConvertingIteration<URI,RepositoryException>(databaseConnection.listResources(prefix)) {
                @Override
                protected RepositoryException convert(Exception e) {
                    return new RepositoryException(e);
                }
            });
        } catch (SQLException e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here

     */
    public SnapshotRepositoryConnection getSnapshot(Date snapshotDate) throws RepositoryException {
        try {
            return new SnapshotRepositoryConnection(sesameService.getRepository(),sail.getSnapshot(snapshotDate));
        } catch (SailException e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here

                return collection;
            } finally {
                result.close();
            }
        } catch(Throwable ex) {
            throw new RepositoryException(ex);
        }
    }
View Full Code Here

                return collection;
            } finally {
                result.close();
            }
        } catch(Throwable ex) {
            throw new RepositoryException(ex);
        }
    }
View Full Code Here

                    throws RepositoryException {
                try {
                    return FileBackendUtils.readCacheEntry(sourceObject, cacheRepository.getValueFactory());
                } catch (IOException e) {
                    log.warn("Could not read caching properties from '{}'", sourceObject.getPath());
                    throw new RepositoryException(e);
                }
            }

        };
    }
View Full Code Here

            if (!(dataFile.exists())) return false;
            final CacheEntry ce = FileBackendUtils.readCacheEntry(dataFile, new ValueFactoryImpl());
            //return ce != null && !FileBackendUtils.isExpired(ce) && ce.getTripleCount() > 0;
            return ce != null && ce.getTripleCount() > 0;
        } catch (IOException e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here

                return collection;
            } finally {
                result.close();
            }
        } catch(Throwable ex) {
            throw new RepositoryException(ex);
        }
    }
View Full Code Here

        try {
            LDCachingKiWiSailConnection sailConnection = sail.getConnection();

            return new LDCachingSailRepositoryConnection(repository,sailConnection,cacheContext);
        } catch (SailException e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here

            sailConnection.begin();

            return new ExceptionConvertingIteration<CacheEntry, RepositoryException>(sailConnection.listExpired()) {
                @Override
                protected RepositoryException convert(Exception e) {
                    return new RepositoryException(e);
                }

                /**
                 * Closes this Iteration as well as the wrapped Iteration if it happens to be
                 * a {@link info.aduna.iteration.CloseableIteration}.
                 */
                @Override
                protected void handleClose() throws RepositoryException {
                    super.handleClose();
                    try {
                        sailConnection.commit();
                        sailConnection.close();
                    } catch (SailException ex) {
                        throw new RepositoryException(ex);
                    }
                }
            };
        } catch (SailException e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here

TOP

Related Classes of org.openrdf.repository.RepositoryException

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.