Package org.openrdf.store

Examples of org.openrdf.store.StoreException


  {
    try {
      return txnLockManager.getExclusiveLock();
    }
    catch (InterruptedException e) {
      throw new StoreException(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 StoreException(e);
        }
      }
    }
  }
View Full Code Here

      }
      else {
        try {
          int version = Integer.parseInt(versionStr);
          if (version < 10) {
            throw new StoreException("Directory contains incompatible triple data");
          }
          else if (version > SCHEME_VERSION) {
            throw new StoreException("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 StoreException("invalid value '" + index + "' in index specification: "
              + indexSpecStr);
        }

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

    }

    Set<String> currentIndexSpecs = parseIndexSpecList(currentIndexSpecStr);

    if (currentIndexSpecs.isEmpty()) {
      throw new StoreException("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

  {
    if (isEditable(subj)) {
      super.addStatement(subj, pred, obj, contexts);
    }
    else {
      throw new StoreException("insufficient access rights on subject " + subj.stringValue());
    }
  }
View Full Code Here

        // Remark Jeen: I would only do that in the case where the subject
        // was not explicitly specified in the method call. In the current
        // case, the user explicitly tried to perform a remove on a specific
        // subject to which he has no access rights. IMHO, that should
        // _always_ result in an error.
        throw new StoreException("insufficient access rights on subject " + subj.stringValue());
      }
    }
    else {
      Cursor<? extends Statement> toBeRemovedStatements = super.getStatements(null, pred, obj, false,
          contexts);
      try {
        Statement st;
        while ((st = toBeRemovedStatements.next()) != null) {
          Resource subject = st.getSubject();

          if (isEditable(subject)) {
            super.removeStatements(subject, pred, obj, contexts);
          }
          else if (isViewable(subject)) {
            // Since the user did not explicitly specify the subject being
            // removed, we silently ignore the statement if the subject is
            // not viewable by the user.
            throw new StoreException("insufficient access rights on subject " + subject.stringValue());
          }
        }
      }
      finally {
        toBeRemovedStatements.close();
View Full Code Here

  {
    try {
      return delegate.get();
    }
    catch (InterruptedException e) {
      throw new StoreException(e);
    }
    catch (ExecutionException e) {
      if (e.getCause() instanceof StoreException) {
        throw (StoreException)e.getCause();
      }
      throw new StoreException(e);
    }
  }
View Full Code Here

  {
    try {
      return delegate.get();
    }
    catch (InterruptedException e) {
      throw new StoreException(e);
    }
    catch (ExecutionException e) {
      if (e.getCause() instanceof StoreException) {
        throw (StoreException)e.getCause();
      }
      throw new StoreException(e);
    }
  }
View Full Code Here

        return null;
      }
      return request.getTupleQueryResult();
    }
    catch (IOException e) {
      throw new StoreException(e);
    }
    catch (NoCompatibleMediaType e) {
      throw new StoreException(e);
    }
    catch (QueryResultParseException e) {
      throw new StoreException(e);
    }
  }
View Full Code Here

TOP

Related Classes of org.openrdf.store.StoreException

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.