Package org.openrdf.http.client

Source Code of org.openrdf.http.client.TemplateClient

/*
* Copyright Aduna (http://www.aduna-software.com/) (c) 2008-2010.
*
* Licensed under the Aduna BSD-style license.
*/
package org.openrdf.http.client;

import java.util.List;

import org.openrdf.http.client.connections.HTTPConnectionPool;
import org.openrdf.http.client.helpers.StoreConfigClient;
import org.openrdf.model.Model;
import org.openrdf.store.StoreConfigException;

/**
* @author James Leigh
*/
public class TemplateClient {

  private final StoreConfigClient client;

  public TemplateClient(HTTPConnectionPool pool) {
    this.client = new StoreConfigClient(pool);
  }

  public String getURL() {
    return client.getURL();
  }

  public void setUsernameAndPassword(String username, String password) {
    client.setUsernameAndPassword(username, password);
  }

  public List<String> list()
    throws StoreConfigException
  {
    return client.list();
  }

  public Model get(String id)
    throws StoreConfigException
  {
    return client.get(id, Model.class);
  }

  public void put(String id, Model instance)
    throws StoreConfigException
  {
    client.put(id, instance);
  }

  public boolean delete(String id)
    throws StoreConfigException
  {
    return client.delete(id);
  }
}
TOP

Related Classes of org.openrdf.http.client.TemplateClient

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.