Examples of StoreConfigException


Examples of org.openrdf.store.StoreConfigException

  private Repository createRepositoryStack(RepositoryImplConfig config)
    throws StoreConfigException
  {
    RepositoryFactory factory = RepositoryRegistry.getInstance().get(config.getType());
    if (factory == null) {
      throw new StoreConfigException("Unsupported repository type: " + config.getType());
    }

    Repository repository = factory.getRepository(config);

    if (config instanceof DelegatingRepositoryImplConfig) {
      RepositoryImplConfig delegateConfig = ((DelegatingRepositoryImplConfig)config).getDelegate();

      Repository delegate = createRepositoryStack(delegateConfig);

      try {
        ((DelegatingRepository)repository).setDelegate(delegate);
      }
      catch (ClassCastException e) {
        throw new StoreConfigException(
            "Delegate specified for repository that is not a DelegatingRepository: "
                + delegate.getClass());
      }
    }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

  {
    try {
      return loadResources(new LinkedHashModel(), cl, STORE_SCHEMAS);
    }
    catch (IOException e) {
      throw new StoreConfigException(e);
    }
  }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

      if (templateDir != null && templateDir.isDirectory()) {
        map = getTemplateURLs(templateDir, map);
      }
    }
    catch (IOException e) {
      throw new StoreConfigException(e);
    }
    return map;
  }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

    if (repInfo != null) {
      try {
        repInfo.setLocation(getRepositoryDir(id).toURI().toURL());
      }
      catch (MalformedURLException e) {
        throw new StoreConfigException("Location of repository does not resolve to a valid URL", e);
      }
    }

    return repInfo;
  }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

    private String getConfigId(Model config)
      throws StoreConfigException
    {
      Set<Value> ids = config.filter(null, REPOSITORYID, null).objects();
      if (ids.size() != 1) {
        throw new StoreConfigException("Repository ID not found");
      }
      return ids.iterator().next().stringValue();
    }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

        result.add(repInfo);
      }
    }
    catch (UnauthorizedException ue) {
      logger.warn("Not authorized to retrieve list of repositories", ue);
      throw new StoreConfigException(ue);
    }
    catch (StoreException re) {
      logger.warn("Unable to retrieve list of repositories", re);
      throw new StoreConfigException(re);
    }

    return result;
  }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

    }
    else if (idStatementList.isEmpty()) {
      return null;
    }
    else {
      throw new StoreConfigException("Multiple ID-statements for repository ID " + repositoryID);
    }
  }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

      objects = model.filter(implNode, ARCHIVE_CONTEXT, null).objects();
      setArchiveContexts(objects.toArray(new URI[objects.size()]));
    }
    catch (ModelException e) {
      throw new StoreConfigException(e);
    }
    catch (ArrayStoreException e) {
      throw new StoreConfigException(e);
    }
  }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

      repo.setQueryResultLimit(config.getQueryResultLimit());

      return repo;
    }

    throw new StoreConfigException("Invalid configuration class: " + configuration.getClass());
  }
View Full Code Here

Examples of org.openrdf.store.StoreConfigException

    Literal id = vf.createLiteral(repositoryID);
    for (Statement idStatement : model.filter(null, REPOSITORYID, id)) {
      Resource context = idStatement.getContext();

      if (context == null) {
        throw new StoreConfigException("No configuration context for repository " + repositoryID);
      }

      return model.filter(null, null, null, context);
    }
    return null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.