protected CloseableIteration<? extends Resource, SailException> getContextIDsInternal() throws SailException {
try {
return new FilterIteration<Resource, SailException>(new ExceptionConvertingIteration<Resource, SailException>(databaseConnection.listContexts()) {
@Override
protected SailException convert(Exception e) {
return new SailException("database error while iterating over result set",e);
}
}) {
@Override
protected boolean accept(Resource object) throws SailException {
return !object.stringValue().equals(defaultContext);
}
};
} catch (SQLException e) {
throw new SailException("database error while listing contexts",e);
}
}