Class AbstractForwardChainingInferencerConnection
java.lang.Object
org.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
org.eclipse.rdf4j.sail.helpers.NotifyingSailConnectionWrapper
org.eclipse.rdf4j.sail.inferencer.InferencerConnectionWrapper
org.eclipse.rdf4j.sail.inferencer.fc.AbstractForwardChainingInferencerConnection
- All Implemented Interfaces:
AutoCloseable,FederatedServiceResolverClient,ThreadSafetyAware,InferencerConnection,NotifyingSailConnection,SailConnection,SailConnectionListener
public abstract class AbstractForwardChainingInferencerConnection
extends InferencerConnectionWrapper
implements SailConnectionListener
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidAdds all basic set of axiom statements from which the complete set can be inferred to the underlying Sail.protected abstract intapplyRules(Model iteration) Returns the number of newly inferred statements.voidbegin()Begins a transaction requiringSailConnection.commit()orSailConnection.rollback()to be called to close the transaction.voidbegin(IsolationLevel level) Begins a transaction with the specifiedIsolationLevellevel, requiringSailConnection.commit()orSailConnection.rollback()to be called to close the transaction.protected abstract Modelprotected voidvoidFlushes any pending updates to be processed and the resulting changes to be reported to registeredSailConnectionListeners.protected booleanprotected booleanIndicates if a full recomputation of the deductive closure is needed.protected Modelvoidrollback()Rolls back the transaction, discarding any uncommitted changes that have been made in this SailConnection.voidNotifies the listener that a statement has been added in a transaction that it has registered itself with.voidNotifies the listener that a statement has been removed in a transaction that it has registered itself with.Methods inherited from class org.eclipse.rdf4j.sail.inferencer.InferencerConnectionWrapper
addInferredStatement, clearInferred, commit, evaluate, flush, getContextIDs, getStatements, getWrappedConnection, hasStatement, prepare, removeInferredStatement, sizeMethods inherited from class org.eclipse.rdf4j.sail.helpers.NotifyingSailConnectionWrapper
addConnectionListener, removeConnectionListenerMethods inherited from class org.eclipse.rdf4j.sail.helpers.SailConnectionWrapper
addStatement, addStatement, clear, clearNamespaces, close, endUpdate, explain, getComparator, getFederatedServiceResolver, getNamespace, getNamespaces, getStatements, getSupportedOrders, isActive, isOpen, prepareQuery, removeNamespace, removeStatement, removeStatements, setFederatedServiceResolver, setNamespace, setTransactionSettings, size, startUpdate, supportsConcurrentReadsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.rdf4j.sail.NotifyingSailConnection
addConnectionListener, removeConnectionListenerMethods inherited from interface org.eclipse.rdf4j.sail.SailConnection
addStatement, addStatement, clear, clearNamespaces, close, endUpdate, explain, getComparator, getNamespace, getNamespaces, getStatements, getSupportedOrders, isActive, isOpen, prepareQuery, removeNamespace, removeStatement, removeStatements, setNamespace, setTransactionSettings, startUpdate
-
Field Details
-
totalInferred
protected int totalInferred
-
-
Constructor Details
-
AbstractForwardChainingInferencerConnection
-
-
Method Details
-
statementAdded
Description copied from interface:SailConnectionListenerNotifies the listener that a statement has been added in a transaction that it has registered itself with.- Specified by:
statementAddedin interfaceSailConnectionListener- Parameters:
st- The statement that was added.
-
createModel
-
statementRemoved
Description copied from interface:SailConnectionListenerNotifies the listener that a statement has been removed in a transaction that it has registered itself with.- Specified by:
statementRemovedin interfaceSailConnectionListener- Parameters:
st- The statement that was removed.
-
flushUpdates
Description copied from interface:InferencerConnectionFlushes any pending updates to be processed and the resulting changes to be reported to registeredSailConnectionListeners.- Specified by:
flushUpdatesin interfaceInferencerConnection- Overrides:
flushUpdatesin classInferencerConnectionWrapper- Throws:
SailException- If the updates could not be processed.
-
begin
Description copied from interface:SailConnectionBegins a transaction requiringSailConnection.commit()orSailConnection.rollback()to be called to close the transaction. The transaction will use the defaultIsolationLevellevel for the SAIL, as returned bySail.getDefaultIsolationLevel().- Specified by:
beginin interfaceSailConnection- Overrides:
beginin classSailConnectionWrapper- Throws:
SailException- If the connection could not start a transaction or if a transaction is already active on this connection.
-
begin
Description copied from interface:SailConnectionBegins a transaction with the specifiedIsolationLevellevel, requiringSailConnection.commit()orSailConnection.rollback()to be called to close the transaction.- Specified by:
beginin interfaceSailConnection- Overrides:
beginin classSailConnectionWrapper- Parameters:
level- the transaction isolation level on which this transaction operates.- Throws:
UnknownSailTransactionStateException- If the IsolationLevel is not supported by this implementationSailException- If the connection could not start a transaction, if the supplied transaction isolation level is not supported, or if a transaction is already active on this connection.
-
rollback
Description copied from interface:SailConnectionRolls back the transaction, discarding any uncommitted changes that have been made in this SailConnection.- Specified by:
rollbackin interfaceSailConnection- Overrides:
rollbackin classSailConnectionWrapper- Throws:
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.SailException- If the SailConnection could not be rolled back.
-
addAxiomStatements
Adds all basic set of axiom statements from which the complete set can be inferred to the underlying Sail.- Throws:
SailException
-
doInferencing
- Throws:
SailException
-
applyRules
Returns the number of newly inferred statements.- Throws:
SailException
-
prepareIteration
-
hasNewStatements
protected boolean hasNewStatements() -
needsFullRecomputation
protected boolean needsFullRecomputation()Indicates if a full recomputation of the deductive closure is needed.
-