Class ChangeTrackerConnection
java.lang.Object
org.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
org.eclipse.rdf4j.sail.helpers.NotifyingSailConnectionWrapper
it.uniroma2.art.semanticturkey.changetracking.sail.ChangeTrackerConnection
- All Implemented Interfaces:
AutoCloseable
,org.eclipse.rdf4j.query.algebra.evaluation.federation.FederatedServiceResolverClient
,org.eclipse.rdf4j.sail.features.ThreadSafetyAware
,org.eclipse.rdf4j.sail.NotifyingSailConnection
,org.eclipse.rdf4j.sail.SailConnection
public class ChangeTrackerConnection
extends org.eclipse.rdf4j.sail.helpers.NotifyingSailConnectionWrapper
A
NotifyingSailConnection
which is returned by a ChangeTracker
.- Author:
- Manuel Fiorelli
-
Constructor Summary
ConstructorDescriptionChangeTrackerConnection
(org.eclipse.rdf4j.sail.NotifyingSailConnection wrappedCon, ChangeTracker sail) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStatement
(org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, org.eclipse.rdf4j.model.Resource... contexts) void
addStatement
(org.eclipse.rdf4j.sail.UpdateContext modify, org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, org.eclipse.rdf4j.model.Resource... contexts) void
begin()
void
begin
(org.eclipse.rdf4j.common.transaction.IsolationLevel level) void
clear
(org.eclipse.rdf4j.model.Resource... contexts) void
void
commit()
protected org.eclipse.rdf4j.model.Literal
org.eclipse.rdf4j.common.iteration.CloseableIteration<? extends org.eclipse.rdf4j.query.BindingSet,
org.eclipse.rdf4j.query.QueryEvaluationException> evaluate
(org.eclipse.rdf4j.query.algebra.TupleExpr tupleExpr, org.eclipse.rdf4j.query.Dataset dataset, org.eclipse.rdf4j.query.BindingSet bindings, boolean includeInferred) protected void
generateCommitMetadataModel
(org.eclipse.rdf4j.model.IRI commitIRI, Collection<? super org.eclipse.rdf4j.model.Statement> model) protected org.eclipse.rdf4j.model.Model
generateSysInfoModel
(org.eclipse.rdf4j.model.IRI subj) protected org.eclipse.rdf4j.model.Model
generateUndoModel
(org.eclipse.rdf4j.model.IRI subj) org.eclipse.rdf4j.common.iteration.CloseableIteration<? extends org.eclipse.rdf4j.model.Statement,
org.eclipse.rdf4j.sail.SailException> getStatements
(org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, boolean includeInferred, org.eclipse.rdf4j.model.Resource... contexts) boolean
hasStatement
(org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, boolean includeInferred, org.eclipse.rdf4j.model.Resource... contexts) void
protected void
recordModifiedTriples
(Function<org.eclipse.rdf4j.model.IRI, Function<org.eclipse.rdf4j.repository.RepositoryConnection, Function<org.eclipse.rdf4j.model.IRI, Consumer<? super org.eclipse.rdf4j.model.Statement>>>> consumer, org.eclipse.rdf4j.model.IRI commitIRI, org.eclipse.rdf4j.repository.RepositoryConnection supportRepoConn, org.eclipse.rdf4j.model.ValueFactory vf, org.eclipse.rdf4j.model.Literal generationTime) void
removeNamespace
(String prefix) void
removeStatement
(org.eclipse.rdf4j.sail.UpdateContext modify, org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, org.eclipse.rdf4j.model.Resource... contexts) void
removeStatements
(org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, org.eclipse.rdf4j.model.Resource... contexts) void
rollback()
void
setNamespace
(String prefix, String name) protected boolean
shouldTrackStatement
(org.eclipse.rdf4j.model.Statement st) Methods inherited from class org.eclipse.rdf4j.sail.helpers.NotifyingSailConnectionWrapper
addConnectionListener, getWrappedConnection, removeConnectionListener
Methods inherited from class org.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
close, endUpdate, explain, flush, getContextIDs, getFederatedServiceResolver, getNamespace, getNamespaces, isActive, isOpen, pendingRemovals, prepare, prepareQuery, setFederatedServiceResolver, setTransactionSettings, size, size, startUpdate, supportsConcurrentReads
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.rdf4j.sail.SailConnection
close, endUpdate, explain, flush, getContextIDs, getNamespace, getNamespaces, isActive, isOpen, pendingRemovals, prepare, prepareQuery, setTransactionSettings, size, startUpdate
-
Constructor Details
-
ChangeTrackerConnection
public ChangeTrackerConnection(org.eclipse.rdf4j.sail.NotifyingSailConnection wrappedCon, ChangeTracker sail)
-
-
Method Details
-
initializeListener
public void initializeListener() -
begin
public void begin() throws org.eclipse.rdf4j.sail.SailException- Specified by:
begin
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
begin
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
begin
public void begin(org.eclipse.rdf4j.common.transaction.IsolationLevel level) throws org.eclipse.rdf4j.sail.SailException - Specified by:
begin
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
begin
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
rollback
public void rollback() throws org.eclipse.rdf4j.sail.SailException- Specified by:
rollback
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
rollback
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
commit
public void commit() throws org.eclipse.rdf4j.sail.SailException- Specified by:
commit
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
commit
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
generateCommitMetadataModel
protected void generateCommitMetadataModel(org.eclipse.rdf4j.model.IRI commitIRI, Collection<? super org.eclipse.rdf4j.model.Statement> model) -
recordModifiedTriples
protected void recordModifiedTriples(Function<org.eclipse.rdf4j.model.IRI, Function<org.eclipse.rdf4j.repository.RepositoryConnection, throws org.eclipse.rdf4j.repository.RepositoryExceptionFunction<org.eclipse.rdf4j.model.IRI, Consumer<? super org.eclipse.rdf4j.model.Statement>>>> consumer, org.eclipse.rdf4j.model.IRI commitIRI, org.eclipse.rdf4j.repository.RepositoryConnection supportRepoConn, org.eclipse.rdf4j.model.ValueFactory vf, org.eclipse.rdf4j.model.Literal generationTime) - Throws:
org.eclipse.rdf4j.repository.RepositoryException
-
currentTimeAsLiteral
protected org.eclipse.rdf4j.model.Literal currentTimeAsLiteral() throws org.eclipse.rdf4j.sail.SailException- Throws:
org.eclipse.rdf4j.sail.SailException
-
getStatements
public org.eclipse.rdf4j.common.iteration.CloseableIteration<? extends org.eclipse.rdf4j.model.Statement,org.eclipse.rdf4j.sail.SailException> getStatements(org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, boolean includeInferred, org.eclipse.rdf4j.model.Resource... contexts) throws org.eclipse.rdf4j.sail.SailException - Specified by:
getStatements
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
getStatements
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
hasStatement
public boolean hasStatement(org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, boolean includeInferred, org.eclipse.rdf4j.model.Resource... contexts) throws org.eclipse.rdf4j.sail.SailException - Specified by:
hasStatement
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
hasStatement
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
evaluate
public org.eclipse.rdf4j.common.iteration.CloseableIteration<? extends org.eclipse.rdf4j.query.BindingSet,org.eclipse.rdf4j.query.QueryEvaluationException> evaluate(org.eclipse.rdf4j.query.algebra.TupleExpr tupleExpr, org.eclipse.rdf4j.query.Dataset dataset, org.eclipse.rdf4j.query.BindingSet bindings, boolean includeInferred) throws org.eclipse.rdf4j.sail.SailException - Specified by:
evaluate
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
evaluate
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
generateSysInfoModel
protected org.eclipse.rdf4j.model.Model generateSysInfoModel(org.eclipse.rdf4j.model.IRI subj) -
generateUndoModel
protected org.eclipse.rdf4j.model.Model generateUndoModel(org.eclipse.rdf4j.model.IRI subj) throws org.eclipse.rdf4j.sail.SailException - Throws:
org.eclipse.rdf4j.sail.SailException
-
addStatement
public void addStatement(org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, org.eclipse.rdf4j.model.Resource... contexts) throws org.eclipse.rdf4j.sail.SailException - Specified by:
addStatement
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
addStatement
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
addStatement
public void addStatement(org.eclipse.rdf4j.sail.UpdateContext modify, org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, org.eclipse.rdf4j.model.Resource... contexts) throws org.eclipse.rdf4j.sail.SailException - Specified by:
addStatement
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
addStatement
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
removeStatements
public void removeStatements(org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, org.eclipse.rdf4j.model.Resource... contexts) throws org.eclipse.rdf4j.sail.SailException - Specified by:
removeStatements
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
removeStatements
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
removeStatement
public void removeStatement(org.eclipse.rdf4j.sail.UpdateContext modify, org.eclipse.rdf4j.model.Resource subj, org.eclipse.rdf4j.model.IRI pred, org.eclipse.rdf4j.model.Value obj, org.eclipse.rdf4j.model.Resource... contexts) throws org.eclipse.rdf4j.sail.SailException - Specified by:
removeStatement
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
removeStatement
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
clear
public void clear(org.eclipse.rdf4j.model.Resource... contexts) throws org.eclipse.rdf4j.sail.SailException - Specified by:
clear
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
clear
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
setNamespace
- Specified by:
setNamespace
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
setNamespace
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
clearNamespaces
public void clearNamespaces() throws org.eclipse.rdf4j.sail.SailException- Specified by:
clearNamespaces
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
clearNamespaces
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
removeNamespace
- Specified by:
removeNamespace
in interfaceorg.eclipse.rdf4j.sail.SailConnection
- Overrides:
removeNamespace
in classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
- Throws:
org.eclipse.rdf4j.sail.SailException
-
shouldTrackStatement
protected boolean shouldTrackStatement(org.eclipse.rdf4j.model.Statement st)
-