Package org.openrdf.sail

Examples of org.openrdf.sail.SailException


        Throwable t = e.getCause();
        if (t instanceof SailException) {
          throw (SailException)t;
        }
        else {
          throw new SailException(t);
        }
      }
      catch (QueryEvaluationException e) {
        throw new SailException(e);
      }
    }
View Full Code Here


    try {
      InferencerConnection con = (InferencerConnection)super.getConnection();
      return new ForwardChainingRDFSInferencerConnection(con);
    }
    catch (ClassCastException e) {
      throw new SailException(e.getMessage(), e);
    }
  }
View Full Code Here

        logger.debug("Reading data from {}...", dataFile);

        // Initialize persistent store from file
        if (!dataFile.canRead()) {
          logger.error("Data file is not readable: {}", dataFile);
          throw new SailException("Can't read data file: " + dataFile);
        }
        // Don't try to read empty files: this will result in an
        // IOException, and the file doesn't contain any data anyway.
        if (dataFile.length() == 0L) {
          logger.warn("Ignoring empty data file: {}", dataFile);
        }
        else {
          try {
            FileIO.read(this, dataFile);
            logger.debug("Data file read successfully");
          }
          catch (IOException e) {
            logger.error("Failed to read data file", e);
            throw new SailException(e);
          }
        }
      }
      else {
        // file specified that does not exist yet, create it
        try {
          File dir = dataFile.getParentFile();
          if (dir != null && !dir.exists()) {
            logger.debug("Creating directory for data file...");
            if (!dir.mkdirs()) {
              logger.debug("Failed to create directory for data file: {}", dir);
              throw new SailException("Failed to create directory for data file: " + dir);
            }
          }

          logger.debug("Initializing data file...");
          FileIO.write(this, dataFile);
          logger.debug("Data file initialized");
        }
        catch (IOException e) {
          logger.debug("Failed to initialize data file", e);
          throw new SailException("Failed to initialize data file " + dataFile, e);
        }
        catch (SailException e) {
          logger.debug("Failed to initialize data file", e);
          throw new SailException("Failed to initialize data file " + dataFile, e);
        }
      }
    }

    contentsChanged = false;
View Full Code Here

  {
    try {
      return statementListLockManager.getReadLock();
    }
    catch (InterruptedException e) {
      throw new SailException(e);
    }
  }
View Full Code Here

  {
    try {
      return txnLockManager.getExclusiveLock();
    }
    catch (InterruptedException e) {
      throw new SailException(e);
    }
  }
View Full Code Here

          contentsChanged = false;
          logger.debug("Data synced to file");
        }
        catch (IOException e) {
          logger.error("Failed to sync to file", e);
          throw new SailException(e);
        }
      }
    }
  }
View Full Code Here

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

          assert activeIterations.isEmpty();
View Full Code Here

  {
    try {
      return connectionLockManager.getReadLock();
    }
    catch (InterruptedException e) {
      throw new SailException(e);
    }
  }
View Full Code Here

  {
    try {
      return connectionLockManager.getWriteLock();
    }
    catch (InterruptedException e) {
      throw new SailException(e);
    }
  }
View Full Code Here

  {
    try {
      return txnLockManager.getExclusiveLock();
    }
    catch (InterruptedException e) {
      throw new SailException(e);
    }
  }
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.