Package org.openrdf.sail.federation

Source Code of org.openrdf.sail.federation.ReadOnlyConnection

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

import java.util.List;

import org.openrdf.model.Resource;
import org.openrdf.model.URI;
import org.openrdf.model.Value;
import org.openrdf.repository.RepositoryConnection;
import org.openrdf.sail.SailReadOnlyException;
import org.openrdf.store.StoreException;

/**
* Finishes the {@link FederationConnection} by throwing
* {@link SailReadOnlyException}s for all write operations.
*
* @author James Leigh
*/
class ReadOnlyConnection extends FederationConnection {

  public ReadOnlyConnection(Federation federation, List<RepositoryConnection> members) {
    super(federation, members);
  }

  public void setNamespace(String prefix, String name)
    throws StoreException
  {
    throw new SailReadOnlyException();
  }

  public void clearNamespaces()
    throws StoreException
  {
    throw new SailReadOnlyException();
  }

  public void removeNamespace(String prefix)
    throws StoreException
  {
    throw new SailReadOnlyException();
  }

  public void addStatement(Resource subj, URI pred, Value obj, Resource... contexts)
    throws StoreException
  {
    throw new SailReadOnlyException();
  }

  public void removeStatements(Resource subj, URI pred, Value obj, Resource... context)
    throws StoreException
  {
    throw new SailReadOnlyException();
  }
}
TOP

Related Classes of org.openrdf.sail.federation.ReadOnlyConnection

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.