public abstract class AbstractForwardChainingInferencerConnection extends InferencerConnectionWrapper implements SailConnectionListener
| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
logger |
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) |
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 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, prepare, removeInferredStatement, sizeaddConnectionListener, removeConnectionListeneraddStatement, addStatement, clear, clearNamespaces, close, endUpdate, getNamespace, getNamespaces, isActive, isOpen, removeNamespace, removeStatement, removeStatements, setFederatedServiceResolver, setNamespace, size, startUpdateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddConnectionListener, removeConnectionListeneraddStatement, addStatement, clear, clearNamespaces, close, endUpdate, getNamespace, getNamespaces, isActive, isOpen, removeNamespace, removeStatement, removeStatements, setNamespace, startUpdateprotected final org.slf4j.Logger logger
protected int totalInferred
public 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()
Copyright © 2001–2015 Aduna. All rights reserved.