Package org.openrdf.sail

Examples of org.openrdf.sail.SailException


      }
      else {
        try {
          int version = Integer.parseInt(versionStr);
          if (version < 10) {
            throw new SailException("Directory contains incompatible triple data");
          }
          else if (version > SCHEME_VERSION) {
            throw new SailException("Directory contains data that uses a newer data format");
          }
        }
        catch (NumberFormatException e) {
          logger.warn("Malformed version number in TripleStore's properties file");
        }
View Full Code Here


        // sanity checks
        if (index.length() != 4 || index.indexOf('s') == -1 || index.indexOf('p') == -1
            || index.indexOf('o') == -1 || index.indexOf('c') == -1)
        {
          throw new SailException("invalid value '" + index + "' in index specification: "
              + indexSpecStr);
        }

        indexes.add(index);
      }
View Full Code Here

    }

    Set<String> currentIndexSpecs = parseIndexSpecList(currentIndexSpecStr);

    if (currentIndexSpecs.isEmpty()) {
      throw new SailException("Invalid index specification found in index properties");
    }

    // Determine the set of newly added indexes
    Set<String> addedIndexSpecs = new HashSet<String>(newIndexSpecs);
    addedIndexSpecs.removeAll(currentIndexSpecs);
View Full Code Here

      iter = strategy.evaluate(tupleExpr, bindings);
      return new LockingIteration<BindingSet, QueryEvaluationException>(readLock, iter);
    }
    catch (QueryEvaluationException e) {
      readLock.release();
      throw new SailException(e);
    }
    catch (RuntimeException e) {
      readLock.release();
      throw e;
    }
View Full Code Here

      return new ExceptionConvertingIteration<Resource, SailException>(contextIter) {

        @Override
        protected SailException convert(Exception e) {
          if (e instanceof IOException) {
            return new SailException(e);
          }
          else if (e instanceof RuntimeException) {
            throw (RuntimeException)e;
          }
          else if (e == null) {
            throw new IllegalArgumentException("e must not be null");
          }
          else {
            throw new IllegalArgumentException("Unexpected exception type: " + e.getClass());
          }
        }
      };
    }
    catch (IOException e) {
      readLock.release();
      throw new SailException(e);
    }
    catch (RuntimeException e) {
      readLock.release();
      throw e;
    }
View Full Code Here

      return new ExceptionConvertingIteration<Statement, SailException>(iter) {

        @Override
        protected SailException convert(Exception e) {
          if (e instanceof IOException) {
            return new SailException(e);
          }
          else if (e instanceof RuntimeException) {
            throw (RuntimeException)e;
          }
          else if (e == null) {
            throw new IllegalArgumentException("e must not be null");
          }
          else {
            throw new IllegalArgumentException("Unexpected exception type: " + e.getClass());
          }
        }
      };
    }
    catch (IOException e) {
      readLock.release();
      throw new SailException("Unable to get statements", e);
    }
    catch (RuntimeException e) {
      readLock.release();
      throw e;
    }
View Full Code Here

      }

      return size;
    }
    catch (IOException e) {
      throw new SailException(e);
    }
    finally {
      readLock.release();
    }
  }
View Full Code Here

    try {
      nativeStore.getTripleStore().startTransaction();
    }
    catch (IOException e) {
      throw new SailException(e);
    }
  }
View Full Code Here

      nativeStore.getNamespaceStore().sync();

      txnLock.release();
    }
    catch (IOException e) {
      throw new SailException(e);
    }
    finally {
      storeReadLock.release();
    }
View Full Code Here

    try {
      nativeStore.getValueStore().sync();
      nativeStore.getTripleStore().rollback();
    }
    catch (IOException e) {
      throw new SailException(e);
    }
    finally {
      txnLock.release();
      storeReadLock.release();
    }
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.