Examples of HTTPRepository


Examples of de.idos.updates.repository.HttpRepository

    fileServer.start();
  }

  @Given("^a repository for that server$")
  public void an_HTTP_Repository_for_that_server() throws Throwable {
    Repository repository = new HttpRepository("http://localhost:8080/updates/");
    updateSystemBuilder.useRepository(repository);
  }
View Full Code Here

Examples of de.idos.updates.repository.HttpRepository

  private Repository createRepository() {
    if (configuration.repositoryTypeForLatestVersion() == RepositoryType.File) {
      return new FilesystemRepository(new File(configuration.repositoryLocationForLatestVersion()));
    } else {
      return new HttpRepository(configuration.repositoryLocationForLatestVersion());
    }
  }
View Full Code Here

Examples of org.openrdf.repository.http.HTTPRepository

  }

  public Repository getRepository(RepositoryImplConfig config)
    throws StoreConfigException
  {
    HTTPRepository result = null;

    if (config instanceof HTTPRepositoryConfig) {
      HTTPRepositoryConfig httpConfig = (HTTPRepositoryConfig)config;
      result = new HTTPRepository(httpConfig.getURL());
      result.setSubjectSpace(httpConfig.getSubjectSpace());
      result.setReadOnly(httpConfig.isReadOnly());
      // result.setUsernameAndPassword(httpConfig.getUsername(),
      // httpConfig.getPassword());
    }
    else {
      throw new StoreConfigException("Invalid configuration class: " + config.getClass());
View Full Code Here

Examples of org.openrdf.repository.http.HTTPRepository

   */
  @Override
  protected Repository createRepository(String id)
    throws StoreConfigException, StoreException
  {
    HTTPRepository result = null;

    if (hasRepositoryConfig(id)) {
      result = new HTTPRepository(serverURL, id);
      result.setUsernameAndPassword(username, password);
      result.initialize();
    }

    return result;
  }
View Full Code Here

Examples of org.openrdf.repository.http.HTTPRepository

   
    return repository;
  }
 
  public QueryResultTable sparqlSelect(String endpointURL, String sparqlQuery) {
    HTTPRepository endpoint = new HTTPRepository(endpointURL, "");
    try {
      endpoint.initialize();
      RepositoryConnection connection = endpoint.getConnection();
     
      return new RepositoryQueryResultTable(sparqlQuery, connection);
    } catch(RepositoryException e) {
      throw new ModelRuntimeException(e);
    }
View Full Code Here

Examples of org.openrdf.repository.http.HTTPRepository

        System.out.println("HTTP Connection");
        String dataServer = (String) props.get("server.url");
        String dataRepositoryID = (String) props.get("data.repository.id");
        System.out.println("Server: "+dataServer);
        System.out.println("Repository: "+dataRepositoryID);
        localRepository = new HTTPRepository(dataServer, dataRepositoryID);
        localRepository.shutDown();
        localRepository.initialize();
      } else {
        System.out.println("Memory Connection");
        if (!dataDir.exists()) {
View Full Code Here

Examples of org.openrdf.repository.http.HTTPRepository

  @Override
  protected Repository createSystemRepository()
    throws RepositoryException
  {
    HTTPRepository systemRepository = new HTTPRepository(serverURL, SystemRepository.ID);
    systemRepository.initialize();
    return systemRepository;
  }
View Full Code Here

Examples of org.openrdf.repository.http.HTTPRepository

    return serverURL;
  }

  @Override
  public HTTPRepository getSystemRepository() {
    HTTPRepository result = (HTTPRepository)super.getSystemRepository();
    result.setUsernameAndPassword(username, password);
    return result;
  }
View Full Code Here

Examples of org.openrdf.repository.http.HTTPRepository

    throws RepositoryConfigException, RepositoryException
  {
    Repository result = null;

    if (RepositoryConfigUtil.hasRepositoryConfig(getSystemRepository(), id)) {
      result = new HTTPRepository(serverURL, id);
      result.initialize();
    }

    return result;
  }
View Full Code Here

Examples of org.openrdf.repository.http.HTTPRepository

  {
    boolean result = true;

    HttpSession session = request.getSession(true);
    RepositoryInfo repoInfo = (RepositoryInfo)session.getAttribute(SessionKeys.REPOSITORY_INFO_KEY);
    HTTPRepository repo = (HTTPRepository)session.getAttribute(SessionKeys.REPOSITORY_KEY);

    if (request.getRequestURI().endsWith("/repository/overview.view")) {
      String id = request.getParameter("id");
      if (id != null) {
        Server server = (Server)session.getAttribute(SessionKeys.SERVER_KEY);
        repo = (HTTPRepository)server.getRepositoryManager().getRepository(id);
        try {
          repo.initialize();
          repoInfo = server.getRepositoryManager().getRepositoryInfo(id);
        }
        catch (RepositoryException e) {
          session.setAttribute(SessionKeys.REPOSITORY_EXCEPTION_KEY, e);
        }
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.