public class KiWiSnapshotConnection extends Object implements org.openrdf.sail.SailConnection
| Constructor and Description | 
|---|
KiWiSnapshotConnection(KiWiVersioningSail sailBase,
                      Date snapshotDate)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addStatement(org.openrdf.model.Resource subj,
            org.openrdf.model.URI pred,
            org.openrdf.model.Value obj,
            org.openrdf.model.Resource... contexts)  | 
void | 
addStatement(org.openrdf.sail.UpdateContext op,
            org.openrdf.model.Resource subj,
            org.openrdf.model.URI pred,
            org.openrdf.model.Value obj,
            org.openrdf.model.Resource... contexts)
Adds a statement to the store. 
 | 
void | 
begin()  | 
void | 
clear(org.openrdf.model.Resource... contexts)  | 
void | 
clearNamespaces()  | 
void | 
close()  | 
void | 
commit()  | 
void | 
endUpdate(org.openrdf.sail.UpdateContext op)
Indicates that the given  
op will not be used in any call
 again. | 
info.aduna.iteration.CloseableIteration<? extends org.openrdf.query.BindingSet,org.openrdf.query.QueryEvaluationException> | 
evaluate(org.openrdf.query.algebra.TupleExpr tupleExpr,
        org.openrdf.query.Dataset dataset,
        org.openrdf.query.BindingSet bindings,
        boolean includeInferred)  | 
info.aduna.iteration.CloseableIteration<? extends org.openrdf.model.Resource,org.openrdf.sail.SailException> | 
getContextIDs()  | 
String | 
getNamespace(String prefix)  | 
info.aduna.iteration.CloseableIteration<? extends org.openrdf.model.Namespace,org.openrdf.sail.SailException> | 
getNamespaces()  | 
Date | 
getSnapshotDate()
Return the date for which this snapshot is valid. 
 | 
info.aduna.iteration.CloseableIteration<? extends org.openrdf.model.Statement,org.openrdf.sail.SailException> | 
getStatements(org.openrdf.model.Resource subj,
             org.openrdf.model.URI pred,
             org.openrdf.model.Value obj,
             boolean includeInferred,
             org.openrdf.model.Resource... contexts)  | 
boolean | 
isActive()  | 
boolean | 
isOpen()  | 
void | 
prepare()
Checks for an error state in the active transaction that would force the
 transaction to be rolled back. 
 | 
void | 
removeNamespace(String prefix)  | 
void | 
removeStatement(org.openrdf.sail.UpdateContext op,
               org.openrdf.model.Resource subj,
               org.openrdf.model.URI pred,
               org.openrdf.model.Value obj,
               org.openrdf.model.Resource... contexts)
Removes all statements matching the specified subject, predicate and
 object from the repository. 
 | 
void | 
removeStatements(org.openrdf.model.Resource subj,
                org.openrdf.model.URI pred,
                org.openrdf.model.Value obj,
                org.openrdf.model.Resource... contexts)  | 
void | 
rollback()  | 
void | 
setNamespace(String prefix,
            String name)  | 
long | 
size(org.openrdf.model.Resource... contexts)  | 
void | 
startUpdate(org.openrdf.sail.UpdateContext op)
Signals the start of an update operation. 
 | 
public KiWiSnapshotConnection(KiWiVersioningSail sailBase, Date snapshotDate) throws org.openrdf.sail.SailException
org.openrdf.sail.SailExceptionpublic Date getSnapshotDate()
public void addStatement(org.openrdf.model.Resource subj,
                org.openrdf.model.URI pred,
                org.openrdf.model.Value obj,
                org.openrdf.model.Resource... contexts)
                  throws org.openrdf.sail.SailException
addStatement in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic void close()
           throws org.openrdf.sail.SailException
close in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic info.aduna.iteration.CloseableIteration<? extends org.openrdf.query.BindingSet,org.openrdf.query.QueryEvaluationException> evaluate(org.openrdf.query.algebra.TupleExpr tupleExpr,
                                                                                                                                  org.openrdf.query.Dataset dataset,
                                                                                                                                  org.openrdf.query.BindingSet bindings,
                                                                                                                                  boolean includeInferred)
                                                                                                                                    throws org.openrdf.sail.SailException
evaluate in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic info.aduna.iteration.CloseableIteration<? extends org.openrdf.model.Resource,org.openrdf.sail.SailException> getContextIDs()
                                                                                                                           throws org.openrdf.sail.SailException
getContextIDs in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic info.aduna.iteration.CloseableIteration<? extends org.openrdf.model.Statement,org.openrdf.sail.SailException> getStatements(org.openrdf.model.Resource subj,
                                                                                                                          org.openrdf.model.URI pred,
                                                                                                                          org.openrdf.model.Value obj,
                                                                                                                          boolean includeInferred,
                                                                                                                          org.openrdf.model.Resource... contexts)
                                                                                                                            throws org.openrdf.sail.SailException
getStatements in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic long size(org.openrdf.model.Resource... contexts)
          throws org.openrdf.sail.SailException
size in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic void begin()
           throws org.openrdf.sail.SailException
begin in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic void commit()
            throws org.openrdf.sail.SailException
commit in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic void rollback()
              throws org.openrdf.sail.SailException
rollback in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic void removeStatements(org.openrdf.model.Resource subj,
                    org.openrdf.model.URI pred,
                    org.openrdf.model.Value obj,
                    org.openrdf.model.Resource... contexts)
                      throws org.openrdf.sail.SailException
removeStatements in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic void clear(org.openrdf.model.Resource... contexts)
           throws org.openrdf.sail.SailException
clear in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic info.aduna.iteration.CloseableIteration<? extends org.openrdf.model.Namespace,org.openrdf.sail.SailException> getNamespaces()
                                                                                                                            throws org.openrdf.sail.SailException
getNamespaces in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic String getNamespace(String prefix) throws org.openrdf.sail.SailException
getNamespace in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic void setNamespace(String prefix, String name) throws org.openrdf.sail.SailException
setNamespace in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic void removeNamespace(String prefix) throws org.openrdf.sail.SailException
removeNamespace in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic void clearNamespaces()
                     throws org.openrdf.sail.SailException
clearNamespaces in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic void addStatement(org.openrdf.sail.UpdateContext op,
                org.openrdf.model.Resource subj,
                org.openrdf.model.URI pred,
                org.openrdf.model.Value obj,
                org.openrdf.model.Resource... contexts)
                  throws org.openrdf.sail.SailException
UpdateExpr operation.addStatement in interface org.openrdf.sail.SailConnectionop - operation properties of the UpdateExpr operation producing
                 these statements.subj - The subject of the statement to add.pred - The predicate of the statement to add.obj - The object of the statement to add.contexts - The context(s) to add the statement to. Note that this parameter is
                 a vararg and as such is optional. If no contexts are specified, a
                 context-less statement will be added.org.openrdf.sail.SailException - If the statement could not be added, for example because no
                                        transaction is active.IllegalStateException - If the connection has been closed.public void prepare()
             throws org.openrdf.sail.SailException
commit() or rollback(). A call to this method must be
 followed by (in the same thread) with a call to prepare() ,
 commit(), rollback(), or close(). This method
 may be called multiple times within the same transaction by the same
 thread. If this method returns normally, the caller can reasonably expect
 that a subsequent call to commit() will also return normally. If
 this method returns with an exception the caller should treat the
 exception as if it came from a call to commit().prepare in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.UnknownSailTransactionStateException - If the transaction state can not be determined (this can happen
                                        for instance when communication between client and server fails or
                                        times-out). It does not indicate a problem with the integrity of
                                        the store.org.openrdf.sail.SailException - If there is an active transaction and it cannot be committed.IllegalStateException - If the connection has been closed or prepare was already called by
                                        another thread.public void startUpdate(org.openrdf.sail.UpdateContext op)
                 throws org.openrdf.sail.SailException
op maybe
 passed to subsequent
 addStatement(org.openrdf.sail.UpdateContext, org.openrdf.model.Resource, org.openrdf.model.URI, org.openrdf.model.Value, org.openrdf.model.Resource...) or
 removeStatement(org.openrdf.sail.UpdateContext, org.openrdf.model.Resource, org.openrdf.model.URI, org.openrdf.model.Value, org.openrdf.model.Resource...)
 calls before endUpdate(org.openrdf.sail.UpdateContext) is called.startUpdate in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic void removeStatement(org.openrdf.sail.UpdateContext op,
                   org.openrdf.model.Resource subj,
                   org.openrdf.model.URI pred,
                   org.openrdf.model.Value obj,
                   org.openrdf.model.Resource... contexts)
                     throws org.openrdf.sail.SailException
UpdateExpr
 operation.removeStatement in interface org.openrdf.sail.SailConnectionop - operation properties of the UpdateExpr operation removing these
                 statements.subj - The subject of the statement that should be removed.pred - The predicate of the statement that should be removed.obj - The object of the statement that should be removed.contexts - The context(s) from which to remove the statement. Note that this
                 parameter is a vararg and as such is optional. If no contexts are
                 specified the method operates on the entire repository. A
                 null value can be used to match context-less statements.org.openrdf.sail.SailException - If the statement could not be removed, for example because no
                                        transaction is active.IllegalStateException - If the connection has been closed.public void endUpdate(org.openrdf.sail.UpdateContext op)
               throws org.openrdf.sail.SailException
op will not be used in any call
 again. Implementations should use this to flush of any temporary operation
 states that may have occurred.endUpdate in interface org.openrdf.sail.SailConnectionop - org.openrdf.sail.SailExceptionpublic boolean isOpen()
               throws org.openrdf.sail.SailException
isOpen in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.SailExceptionpublic boolean isActive()
                 throws org.openrdf.sail.UnknownSailTransactionStateException
isActive in interface org.openrdf.sail.SailConnectionorg.openrdf.sail.UnknownSailTransactionStateExceptionCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.