Class DedupingInferencerConnection
- 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.DedupingInferencerConnection
-
- All Implemented Interfaces:
AutoCloseable
,FederatedServiceResolverClient
,InferencerConnection
,NotifyingSailConnection
,SailConnection
public class DedupingInferencerConnection extends InferencerConnectionWrapper
-
-
Constructor Summary
Constructors Constructor Description DedupingInferencerConnection(InferencerConnection con, ValueFactory vf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addInferredStatement(Resource subj, IRI pred, Value obj, Resource... contexts)
Adds an inferred statement to a specific context.void
clearInferred(Resource... contexts)
Removes all inferred statements from the specified/all contexts.void
commit()
CallsInferencerConnectionWrapper.flushUpdates()
before forwarding the call to the wrapped connection.boolean
removeInferredStatement(Resource subj, IRI pred, Value obj, Resource... contexts)
Removes an inferred statement from a specific context.void
rollback()
Rolls back the transaction, discarding any uncommitted changes that have been made in this SailConnection.-
Methods inherited from class org.eclipse.rdf4j.sail.inferencer.InferencerConnectionWrapper
evaluate, flush, flushUpdates, getContextIDs, getStatements, getWrappedConnection, hasStatement, prepare, 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, begin, begin, clear, clearNamespaces, close, endUpdate, explain, getNamespace, getNamespaces, isActive, isOpen, pendingRemovals, prepareQuery, removeNamespace, removeStatement, removeStatements, setFederatedServiceResolver, setNamespace, setTransactionSettings, size, startUpdate
-
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, addStatement, addStatement, begin, begin, clear, clearNamespaces, close, endUpdate, explain, getNamespace, getNamespaces, getStatements, isActive, isOpen, pendingRemovals, prepareQuery, removeNamespace, removeStatement, removeStatement, removeStatements, removeStatements, setNamespace, setTransactionSettings, startUpdate
-
-
-
-
Constructor Detail
-
DedupingInferencerConnection
public DedupingInferencerConnection(InferencerConnection con, ValueFactory vf)
-
-
Method Detail
-
addInferredStatement
public boolean addInferredStatement(Resource subj, IRI pred, Value obj, Resource... contexts) throws SailException
Description copied from interface:InferencerConnection
Adds an inferred statement to a specific context.- Specified by:
addInferredStatement
in interfaceInferencerConnection
- Overrides:
addInferredStatement
in classInferencerConnectionWrapper
- Parameters:
subj
- The subject of the statement to add.pred
- The predicate of the statement to add.obj
- The object of the statement to add.contexts
- The context(s) to add the statement to. Note that this parameter is a vararg and as such is optional. If no contexts are supplied the method operates on the entire repository.- Throws:
SailException
- If the statement could not be added.
-
removeInferredStatement
public boolean removeInferredStatement(Resource subj, IRI pred, Value obj, Resource... contexts) throws SailException
Description copied from interface:InferencerConnection
Removes an inferred statement from a specific context.- Specified by:
removeInferredStatement
in interfaceInferencerConnection
- Overrides:
removeInferredStatement
in classInferencerConnectionWrapper
- Parameters:
subj
- The subject of the statement that should be removed.pred
- The predicate of the statement that should be removed.obj
- The object of the statement that should be removed.contexts
- The context(s) from which to remove the statements. Note that this parameter is a vararg and as such is optional. If no contexts are supplied the method operates on the entire repository.- Throws:
SailException
- If the statement could not be removed.
-
clearInferred
public void clearInferred(Resource... contexts) throws SailException
Description copied from interface:InferencerConnection
Removes all inferred statements from the specified/all contexts. If no contexts are specified the method operates on the entire repository.- Specified by:
clearInferred
in interfaceInferencerConnection
- Overrides:
clearInferred
in classInferencerConnectionWrapper
- Parameters:
contexts
- The context(s) from which to remove the statements. Note that this parameter is a vararg and as such is optional. If no contexts are supplied the method operates on the entire repository.- Throws:
SailException
- If the statements could not be removed.
-
commit
public void commit() throws SailException
Description copied from class:InferencerConnectionWrapper
CallsInferencerConnectionWrapper.flushUpdates()
before forwarding the call to the wrapped connection.- Specified by:
commit
in interfaceSailConnection
- Overrides:
commit
in classInferencerConnectionWrapper
- 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 committed.
-
rollback
public void rollback() throws SailException
Description copied from interface:SailConnection
Rolls back the transaction, discarding any uncommitted changes that have been made in this SailConnection.- Specified by:
rollback
in interfaceSailConnection
- Overrides:
rollback
in 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.
-
-