4647484950515253
this.wrapped = wrappedCon; try { this.persistence = new LDCachingKiWiPersistenceConnection(wrappedCon.getDatabaseConnection()); } catch (SQLException e) { throw new SailException(e); } }
6667686970717273
@Override public void addCacheEntry(URI resource, CacheEntry entry) throws SailException { try { persistence.storeCacheEntry(entry); } catch (SQLException e) { throw new SailException(e); } }
8283848586878889
@Override public CacheEntry getCacheEntry(URI resource) throws SailException { try { return persistence.getCacheEntry(resource.stringValue()); } catch (SQLException e) { throw new SailException(e); } }
96979899100101102103
@Override public void removeCacheEntry(URI resource) throws SailException { try { persistence.removeCacheEntry(resource.stringValue()); } catch (SQLException e) { throw new SailException(e); } }
110111112113114115116117
*/ public CloseableIteration<KiWiCacheEntry,SQLException> listExpired() throws SailException { try { return persistence.listExpired(); } catch (SQLException e) { throw new SailException(e); } }
125126127128129130131132
*/ public CloseableIteration<KiWiCacheEntry,SQLException> listAll() throws SailException { try { return persistence.listAll(); } catch (SQLException e) { throw new SailException(e); } }
4748495051525354
@Override public void initialize() throws SailException { // ignore, because we assume that the wrapped store is already initialized if(!store.isInitialized()) { throw new SailException("the LDCachingKiWiSail is a secondary sail and requires an already initialized store!"); } }
129130131132133134135136
*/ public void addProgram(String name, InputStream data) throws IOException, SailException, ParseException { if(isEnabled()) { sail.addProgram(name, data); } else { throw new SailException("reasoning is disabled"); } }
149150151152153154155156
*/ public void addProgram(Program program) throws SailException { if(isEnabled()) { sail.addProgram(program); } else { throw new SailException("reasoning is disabled"); } }
166167168169170171172173
*/ public void deleteProgram(String name) throws SailException { if(isEnabled()) { sail.deleteProgram(name); } else { throw new SailException("reasoning is disabled"); } }