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

    Constructors
    Constructor
    Description
    ChangeTrackerConnection(org.eclipse.rdf4j.sail.NotifyingSailConnection wrappedCon, ChangeTracker sail)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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)
     
    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
     
    void
    begin(org.eclipse.rdf4j.common.transaction.IsolationLevel level)
     
    void
    clear(org.eclipse.rdf4j.model.Resource... contexts)
     
    void
     
    void
     
    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
     
    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
     
    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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      begin in class org.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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      begin in class org.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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      rollback in class org.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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      commit in class org.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,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) throws org.eclipse.rdf4j.repository.RepositoryException
      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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      getStatements in class org.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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      hasStatement in class org.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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      evaluate in class org.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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      addStatement in class org.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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      addStatement in class org.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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      removeStatements in class org.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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      removeStatement in class org.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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      clear in class org.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
      Throws:
      org.eclipse.rdf4j.sail.SailException
    • setNamespace

      public void setNamespace(String prefix, String name) throws org.eclipse.rdf4j.sail.SailException
      Specified by:
      setNamespace in interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      setNamespace in class org.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 interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      clearNamespaces in class org.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
      Throws:
      org.eclipse.rdf4j.sail.SailException
    • removeNamespace

      public void removeNamespace(String prefix) throws org.eclipse.rdf4j.sail.SailException
      Specified by:
      removeNamespace in interface org.eclipse.rdf4j.sail.SailConnection
      Overrides:
      removeNamespace in class org.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
      Throws:
      org.eclipse.rdf4j.sail.SailException
    • shouldTrackStatement

      protected boolean shouldTrackStatement(org.eclipse.rdf4j.model.Statement st)