Package org.openrdf.store

Examples of org.openrdf.store.StoreConfigException


      finally {
        con.close();
      }
    }
    catch (StoreException e) {
      throw new StoreConfigException(e);
    }
  }
View Full Code Here


      finally {
        con.close();
      }
    }
    catch (StoreException e) {
      throw new StoreConfigException(e);
    }
  }
View Full Code Here

      finally {
        con.close();
      }
    }
    catch (StoreException e) {
      throw new StoreConfigException(e);
    }
  }
View Full Code Here

      return false;
    }

    boolean removed = file.delete();
    if (!removed) {
      throw new StoreConfigException("Unable to remove repository configuration file '" + file.getName()
          + "'");
    }

    return true;
  }
View Full Code Here

      }

      return model;
    }
    catch (UnsupportedRDFormatException e) {
      throw new StoreConfigException("Unable to parse configuration file " + file.getName()
          + ", no suitable parser found");
    }
    catch (RDFParseException e) {
      throw new StoreConfigException("Failed to parse configuration file " + file.getName() + ": "
          + e.getMessage());
    }
    catch (IOException e) {
      throw new StoreConfigException("Failed to read configuration file " + file.getName() + ": "
          + e.getMessage(), e);
    }

  }
View Full Code Here

          writer.handleStatement(st);
        }
        writer.endRDF();
      }
      catch (UnsupportedRDFormatException e) {
        throw new StoreConfigException(e);
      }
      catch (RDFHandlerException e) {
        throw new StoreConfigException(e);
      }
      finally {
        out.close();
      }
    }
    catch (IOException e) {
      throw new StoreConfigException(e);
    }
  }
View Full Code Here

   */
  public void validate()
    throws StoreConfigException
  {
    if (implConfig == null) {
      throw new StoreConfigException("Repository implementation for repository missing");
    }
    implConfig.validate();
  }
View Full Code Here

      if (implNode != null) {
        setRepositoryImplConfig(RepositoryImplConfigBase.create(model, implNode));
      }
    }
    catch (ModelException e) {
      throw new StoreConfigException(e.getMessage(), e);
    }
  }
View Full Code Here

    throws StoreConfigException
  {
    Set<Resource> repositoryNodes = model.filter(null, RDF.TYPE, REPOSITORY).subjects();

    if (repositoryNodes.isEmpty()) {
      throw new StoreConfigException("Found no resources of type " + REPOSITORY);
    }
    else if (repositoryNodes.size() > 1) {
      throw new StoreConfigException("Found multiple resources of type " + REPOSITORY);
    }
    else {
      Resource repositoryNode = repositoryNodes.iterator().next();
      return create(model, repositoryNode);
    }
View Full Code Here

      if (persistValue != null) {
        try {
          setPersist((persistValue).booleanValue());
        }
        catch (IllegalArgumentException e) {
          throw new StoreConfigException("Boolean value required for " + PERSIST + " property, found "
              + persistValue);
        }
      }

      Literal syncDelayValue = model.filter(implNode, SYNC_DELAY, null).objectLiteral();
      if (syncDelayValue != null) {
        try {
          setSyncDelay((syncDelayValue).longValue());
        }
        catch (NumberFormatException e) {
          throw new StoreConfigException("Long integer value required for " + SYNC_DELAY
              + " property, found " + syncDelayValue);
        }
      }
    }
    catch (ModelException e) {
      throw new StoreConfigException(e.getMessage(), e);
    }
  }
View Full Code Here

TOP

Related Classes of org.openrdf.store.StoreConfigException

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.