Package org.openrdf.sail

Examples of org.openrdf.sail.SailException


          }
        }
      }
    }
    catch (IOException e) {
      throw new SailException(e);
    }

    return result;
  }
View Full Code Here


      }

      return removeCount;
    }
    catch (IOException e) {
      throw new SailException(e);
    }
  }
View Full Code Here

      EvaluationStrategy strategy;
      strategy = factory.createRdbmsEvaluation(dataset);
      tupleExpr = optimizer.optimize(expr, dataset, bindings, strategy);
      return strategy.evaluate(tupleExpr, bindings);
    } catch (QueryEvaluationException e) {
      throw new SailException(e);
    }
  }
View Full Code Here

            this.defaultContext     = sailBase.getDefaultContext();
            this.inferredContext    = sailBase.getInferredContext();
            //this.valueFactory       = new KiWiValueFactory(sailBase,databaseConnection,defaultContext);
            this.valueFactory       = (KiWiValueFactory) sailBase.getValueFactory();
        } catch (SQLException e) {
            throw new SailException("error establishing database connection",e);
        }
    }
View Full Code Here

            }

            return added;
        } catch(SQLException ex) {
            log.error(String.format("Could not persist rdf-statement (%s %s %s)", subj, pred, obj ), ex);
            throw new SailException("database error while storing statement",ex);
        }
    }
View Full Code Here

    @Override
    protected void closeInternal() throws SailException {
        try {
            databaseConnection.close();
        } catch (SQLException e) {
            throw new SailException("database error while closing connection",e);
        }
    }
View Full Code Here

            new OrderLimitOptimizer().optimize(tupleExpr, dataset, bindings);

            return strategy.evaluate(tupleExpr, EmptyBindingSet.getInstance());

        } catch (QueryEvaluationException e) {
            throw new SailException(e);
        }
    }
View Full Code Here

    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);
        }
    }
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 result set",e.getCause());
                            }
                        };
                    }
                })
        );
View Full Code Here

                    sum += databaseConnection.getSize(valueFactory.convert(context));
                }
                return sum;
            }
        } catch(SQLException ex) {
            throw new SailException("database error while listing triples",ex);
        }
    }
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.