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,org.eclipse.rdf4j.sail.features.ThreadSafetyAware,InferencerConnection,NotifyingSailConnection,SailConnection,SailConnectionListener
public abstract class AbstractForwardChainingInferencerConnection extends InferencerConnectionWrapper implements SailConnectionListener
-
-
Field Summary
Fields Modifier and Type Field Description protected inttotalInferred
-
Constructor Summary
Constructors Constructor Description AbstractForwardChainingInferencerConnection(Sail sail, InferencerConnection con)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidaddAxiomStatements()Adds all basic set of axiom statements from which the complete set can be inferred to the underlying Sail.protected abstract intapplyRules(org.eclipse.rdf4j.model.Model iteration)Returns the number of newly inferred statements.voidbegin()voidbegin(org.eclipse.rdf4j.common.transaction.IsolationLevel level)protected abstract org.eclipse.rdf4j.model.ModelcreateModel()protected voiddoInferencing()voidflushUpdates()protected booleanhasNewStatements()protected booleanneedsFullRecomputation()Indicates if a full recomputation of the deductive closure is needed.protected org.eclipse.rdf4j.model.ModelprepareIteration()voidrollback()voidstatementAdded(org.eclipse.rdf4j.model.Statement st)voidstatementRemoved(org.eclipse.rdf4j.model.Statement st)-
Methods inherited from class org.eclipse.rdf4j.sail.inferencer.InferencerConnectionWrapper
addInferredStatement, clearInferred, commit, evaluate, flush, getContextIDs, getStatements, getWrappedConnection, hasStatement, prepare, removeInferredStatement, size
-
Methods inherited from class org.eclipse.rdf4j.sail.helpers.NotifyingSailConnectionWrapper
addConnectionListener, removeConnectionListener
-
Methods 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, 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.NotifyingSailConnection
addConnectionListener, removeConnectionListener
-
Methods 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
-
-
-
-
Constructor Detail
-
AbstractForwardChainingInferencerConnection
public AbstractForwardChainingInferencerConnection(Sail sail, InferencerConnection con)
-
-
Method Detail
-
statementAdded
public void statementAdded(org.eclipse.rdf4j.model.Statement st)
- Specified by:
statementAddedin interfaceSailConnectionListener
-
createModel
protected abstract org.eclipse.rdf4j.model.Model createModel()
-
statementRemoved
public void statementRemoved(org.eclipse.rdf4j.model.Statement st)
- Specified by:
statementRemovedin interfaceSailConnectionListener
-
flushUpdates
public void flushUpdates() throws SailException- Specified by:
flushUpdatesin interfaceInferencerConnection- Overrides:
flushUpdatesin classInferencerConnectionWrapper- Throws:
SailException
-
begin
public void begin() throws SailException- Specified by:
beginin interfaceSailConnection- Overrides:
beginin classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper- Throws:
SailException
-
begin
public void begin(org.eclipse.rdf4j.common.transaction.IsolationLevel level) throws SailException- Specified by:
beginin interfaceSailConnection- Overrides:
beginin classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper- Throws:
SailException
-
rollback
public void rollback() throws SailException- Specified by:
rollbackin interfaceSailConnection- Overrides:
rollbackin classorg.eclipse.rdf4j.sail.helpers.SailConnectionWrapper- Throws:
SailException
-
addAxiomStatements
protected abstract void addAxiomStatements() throws SailExceptionAdds all basic set of axiom statements from which the complete set can be inferred to the underlying Sail.- Throws:
SailException
-
doInferencing
protected void doInferencing() throws SailException- Throws:
SailException
-
applyRules
protected abstract int applyRules(org.eclipse.rdf4j.model.Model iteration) throws SailExceptionReturns the number of newly inferred statements.- Throws:
SailException
-
prepareIteration
protected org.eclipse.rdf4j.model.Model prepareIteration()
-
hasNewStatements
protected boolean hasNewStatements()
-
needsFullRecomputation
protected boolean needsFullRecomputation()
Indicates if a full recomputation of the deductive closure is needed.
-
-