org.openrdf.repository.delegate
Class VersioningConnection

java.lang.Object
  extended by org.openrdf.repository.base.RepositoryConnectionBase
      extended by org.openrdf.repository.base.RepositoryConnectionWrapper
          extended by org.openrdf.repository.delegate.VersioningConnection
All Implemented Interfaces:
DelegatingRepositoryConnection, RepositoryConnection

public class VersioningConnection
extends RepositoryConnectionWrapper

Counts the number of times the repository is modified through this connection.

Author:
James Leigh

Field Summary
 
Fields inherited from class org.openrdf.repository.base.RepositoryConnectionBase
logger
 
Constructor Summary
VersioningConnection(Repository repository, RepositoryConnection delegate, int version)
           
 
Method Summary
 void add(File file, String baseURI, RDFFormat dataFormat, Resource... contexts)
           
 void add(InputStream in, String baseURI, RDFFormat dataFormat, Resource... contexts)
           
 void add(Iterable<? extends Statement> statements, Resource... contexts)
           
 void add(Reader reader, String baseURI, RDFFormat dataFormat, Resource... contexts)
           
 void add(Resource subject, URI predicate, Value object, Resource... contexts)
           
 void add(Statement st, Resource... contexts)
           
 void add(URL url, String baseURI, RDFFormat dataFormat, Resource... contexts)
           
 void clear(Resource... contexts)
           
 void commit()
           
 int getVersion()
           
 void remove(Iterable<? extends Statement> statements, Resource... contexts)
           
 void remove(Resource subject, URI predicate, Value object, Resource... contexts)
           
 void remove(Statement st, Resource... contexts)
           
 void rollback()
           
 void setAutoCommit(boolean autoCommit)
           
 
Methods inherited from class org.openrdf.repository.base.RepositoryConnectionWrapper
add, addWithoutCommit, clearNamespaces, close, exportStatements, exportStatements, getContextIDs, getDelegate, getNamespace, getNamespaces, getStatements, hasStatement, hasStatement, isAutoCommit, isDelegatingAdd, isDelegatingRead, isDelegatingRemove, isEmpty, isOpen, prepareBooleanQuery, prepareGraphQuery, prepareQuery, prepareTupleQuery, remove, removeNamespace, removeWithoutCommit, setDelegate, setNamespace, size
 
Methods inherited from class org.openrdf.repository.base.RepositoryConnectionBase
addInputStreamOrReader, addWithoutCommit, autoCommit, export, finalize, getRepository, prepareBooleanQuery, prepareGraphQuery, prepareQuery, prepareTupleQuery, removeWithoutCommit
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openrdf.repository.RepositoryConnection
export, getRepository, prepareBooleanQuery, prepareGraphQuery, prepareQuery, prepareTupleQuery
 

Constructor Detail

VersioningConnection

public VersioningConnection(Repository repository,
                            RepositoryConnection delegate,
                            int version)
Method Detail

getVersion

public int getVersion()

setAutoCommit

public void setAutoCommit(boolean autoCommit)
                   throws RepositoryException
Specified by:
setAutoCommit in interface RepositoryConnection
Overrides:
setAutoCommit in class RepositoryConnectionWrapper
Throws:
RepositoryException

commit

public void commit()
            throws RepositoryException
Specified by:
commit in interface RepositoryConnection
Overrides:
commit in class RepositoryConnectionWrapper
Throws:
RepositoryException

rollback

public void rollback()
              throws RepositoryException
Specified by:
rollback in interface RepositoryConnection
Overrides:
rollback in class RepositoryConnectionWrapper
Throws:
RepositoryException

add

public void add(InputStream in,
                String baseURI,
                RDFFormat dataFormat,
                Resource... contexts)
         throws IOException,
                RDFParseException,
                RepositoryException
Specified by:
add in interface RepositoryConnection
Overrides:
add in class RepositoryConnectionWrapper
Throws:
IOException
RDFParseException
RepositoryException

add

public void add(Reader reader,
                String baseURI,
                RDFFormat dataFormat,
                Resource... contexts)
         throws IOException,
                RDFParseException,
                RepositoryException
Specified by:
add in interface RepositoryConnection
Overrides:
add in class RepositoryConnectionWrapper
Throws:
IOException
RDFParseException
RepositoryException

add

public void add(URL url,
                String baseURI,
                RDFFormat dataFormat,
                Resource... contexts)
         throws IOException,
                RDFParseException,
                RepositoryException
Specified by:
add in interface RepositoryConnection
Overrides:
add in class RepositoryConnectionWrapper
Throws:
IOException
RDFParseException
RepositoryException

add

public void add(File file,
                String baseURI,
                RDFFormat dataFormat,
                Resource... contexts)
         throws IOException,
                RDFParseException,
                RepositoryException
Specified by:
add in interface RepositoryConnection
Overrides:
add in class RepositoryConnectionWrapper
Throws:
IOException
RDFParseException
RepositoryException

add

public void add(Resource subject,
                URI predicate,
                Value object,
                Resource... contexts)
         throws RepositoryException
Specified by:
add in interface RepositoryConnection
Overrides:
add in class RepositoryConnectionWrapper
Throws:
RepositoryException

add

public void add(Statement st,
                Resource... contexts)
         throws RepositoryException
Specified by:
add in interface RepositoryConnection
Overrides:
add in class RepositoryConnectionWrapper
Throws:
RepositoryException

add

public void add(Iterable<? extends Statement> statements,
                Resource... contexts)
         throws RepositoryException
Specified by:
add in interface RepositoryConnection
Overrides:
add in class RepositoryConnectionWrapper
Throws:
RepositoryException

clear

public void clear(Resource... contexts)
           throws RepositoryException
Specified by:
clear in interface RepositoryConnection
Overrides:
clear in class RepositoryConnectionWrapper
Throws:
RepositoryException

remove

public void remove(Resource subject,
                   URI predicate,
                   Value object,
                   Resource... contexts)
            throws RepositoryException
Specified by:
remove in interface RepositoryConnection
Overrides:
remove in class RepositoryConnectionWrapper
Throws:
RepositoryException

remove

public void remove(Statement st,
                   Resource... contexts)
            throws RepositoryException
Specified by:
remove in interface RepositoryConnection
Overrides:
remove in class RepositoryConnectionWrapper
Throws:
RepositoryException

remove

public void remove(Iterable<? extends Statement> statements,
                   Resource... contexts)
            throws RepositoryException
Specified by:
remove in interface RepositoryConnection
Overrides:
remove in class RepositoryConnectionWrapper
Throws:
RepositoryException


Copyright © 2004-2008 Aduna. All Rights Reserved.