public abstract class AbstractForwardChainingInferencerConnection extends InferencerConnectionWrapper implements SailConnectionListener
| Modifier and Type | Field and Description |
|---|---|
protected int |
totalInferred |
| Constructor and Description |
|---|
AbstractForwardChainingInferencerConnection(Sail sail,
InferencerConnection con) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addAxiomStatements()
Adds all basic set of axiom statements from which the complete set can be inferred to the underlying Sail.
|
protected abstract int |
applyRules(Model iteration)
Returns the number of newly inferred statements.
|
void |
begin()
Begins a transaction requiring
SailConnection.commit() or SailConnection.rollback() to be called to close the transaction. |
void |
begin(IsolationLevel level)
Begins a transaction with the specified
IsolationLevel level, requiring SailConnection.commit() or
SailConnection.rollback() to be called to close the transaction. |
protected abstract Model |
createModel() |
protected void |
doInferencing() |
void |
flushUpdates()
Flushes any pending updates to be processed and the resulting changes to be reported to registered
SailConnectionListeners. |
protected boolean |
hasNewStatements() |
protected boolean |
needsFullRecomputation()
Indicates if a full recomputation of the deductive closure is needed.
|
protected Model |
prepareIteration() |
void |
rollback()
Rolls back the transaction, discarding any uncommitted changes that have been made in this SailConnection.
|
void |
statementAdded(Statement st)
Notifies the listener that a statement has been added in a transaction that it has registered itself with.
|
void |
statementRemoved(Statement st)
Notifies the listener that a statement has been removed in a transaction that it has registered itself with.
|
addInferredStatement, clearInferred, commit, evaluate, flush, getContextIDs, getStatements, getWrappedConnection, hasStatement, prepare, removeInferredStatement, sizeaddConnectionListener, removeConnectionListeneraddStatement, addStatement, clear, clearNamespaces, close, endUpdate, explain, getNamespace, getNamespaces, isActive, isOpen, pendingRemovals, prepareQuery, removeNamespace, removeStatement, removeStatements, setFederatedServiceResolver, setNamespace, setTransactionSettings, size, startUpdateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddConnectionListener, removeConnectionListeneraddStatement, addStatement, addStatement, addStatement, clear, clearNamespaces, close, endUpdate, explain, getNamespace, getNamespaces, getStatements, isActive, isOpen, pendingRemovals, prepareQuery, removeNamespace, removeStatement, removeStatement, removeStatements, removeStatements, setNamespace, setTransactionSettings, startUpdatepublic AbstractForwardChainingInferencerConnection(Sail sail, InferencerConnection con)
public void statementAdded(Statement st)
SailConnectionListenerstatementAdded in interface SailConnectionListenerst - The statement that was added.protected abstract Model createModel()
public void statementRemoved(Statement st)
SailConnectionListenerstatementRemoved in interface SailConnectionListenerst - The statement that was removed.public void flushUpdates()
throws SailException
InferencerConnectionSailConnectionListeners.flushUpdates in interface InferencerConnectionflushUpdates in class InferencerConnectionWrapperSailException - If the updates could not be processed.public void begin()
throws SailException
SailConnectionSailConnection.commit() or SailConnection.rollback() to be called to close the transaction.
The transaction will use the default IsolationLevel level for the SAIL, as returned by
Sail.getDefaultIsolationLevel().begin in interface SailConnectionbegin in class SailConnectionWrapperSailException - If the connection could not start a transaction or if a transaction is already active on
this connection.public void begin(IsolationLevel level) throws SailException
SailConnectionIsolationLevel level, requiring SailConnection.commit() or
SailConnection.rollback() to be called to close the transaction.begin in interface SailConnectionbegin in class SailConnectionWrapperlevel - the transaction isolation level on which this transaction operates.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.public void rollback()
throws SailException
SailConnectionrollback in interface SailConnectionrollback in class SailConnectionWrapperUnknownSailTransactionStateException - 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.protected abstract void addAxiomStatements()
throws SailException
SailExceptionprotected void doInferencing()
throws SailException
SailExceptionprotected abstract int applyRules(Model iteration) throws SailException
SailExceptionprotected Model prepareIteration()
protected boolean hasNewStatements()
protected boolean needsFullRecomputation()
Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.