Package org.openrdf.repository.http

Examples of org.openrdf.repository.http.HTTPRepository.initialize()


    HTTPRepository result = null;

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

    return result;
  }
View Full Code Here


  }
 
  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

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

  /**
   * Gets the URL of the remote server, e.g.
View Full Code Here

      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

  public RepositoryConnection initWithHttp(String url, String user, String password) throws RepositoryException {
    HTTPRepository httpRepository = new HTTPRepository(url);
    if(user != null) {
      httpRepository.setUsernameAndPassword(user, password);
    }
    httpRepository.initialize();
    sesameRepository = httpRepository;
    sesameConnection = sesameRepository.getConnection();
    return sesameConnection;
  }
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.