public class InferencerConnectionWrapper extends NotifyingSailConnectionWrapper implements InferencerConnection
InferencerConnection interface.| Constructor and Description |
|---|
InferencerConnectionWrapper(InferencerConnection con)
Creates a new InferencerConnectionWrapper object that wraps the supplied
transaction.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addInferredStatement(Resource subj,
URI 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()
Calls
flushUpdates() before forwarding the call to the wrapped
connection. |
CloseableIteration<? extends BindingSet,QueryEvaluationException> |
evaluate(TupleExpr tupleExpr,
Dataset dataset,
BindingSet bindings,
boolean includeInferred)
Calls
flushUpdates() before forwarding the call to the wrapped
connection. |
void |
flushUpdates()
Flushes any pending updates to be processed and the resulting changes to
be reported to registered
SailConnectionListeners. |
CloseableIteration<? extends Resource,SailException> |
getContextIDs()
Calls
flushUpdates() before forwarding the call to the wrapped
connection. |
CloseableIteration<? extends Statement,SailException> |
getStatements(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
Resource... contexts)
Calls
flushUpdates() before forwarding the call to the wrapped
connection. |
InferencerConnection |
getWrappedConnection()
Gets the connection that is wrapped by this object.
|
void |
prepare()
Calls
flushUpdates() before forwarding the call to the wrapped
connection. |
boolean |
removeInferredStatement(Resource subj,
URI pred,
Value obj,
Resource... contexts)
Removes an inferred statement from a specific context.
|
long |
size(Resource... contexts)
Calls
flushUpdates() before forwarding the call to the wrapped
connection. |
addConnectionListener, removeConnectionListeneraddStatement, addStatement, begin, clear, clearNamespaces, close, endUpdate, getNamespace, getNamespaces, isActive, isOpen, removeNamespace, removeStatement, removeStatements, rollback, setNamespace, size, startUpdateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddConnectionListener, removeConnectionListeneraddStatement, addStatement, begin, clear, clearNamespaces, close, endUpdate, getNamespace, getNamespaces, isActive, isOpen, removeNamespace, removeStatement, removeStatements, rollback, setNamespace, startUpdatepublic InferencerConnectionWrapper(InferencerConnection con)
public InferencerConnection getWrappedConnection()
getWrappedConnection in class NotifyingSailConnectionWrapperpublic boolean addInferredStatement(Resource subj, URI pred, Value obj, Resource... contexts) throws SailException
InferencerConnectionaddInferredStatement in interface InferencerConnectionsubj - 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.SailException - If the statement could not be added.public boolean removeInferredStatement(Resource subj, URI pred, Value obj, Resource... contexts) throws SailException
InferencerConnectionremoveInferredStatement in interface InferencerConnectionsubj - 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.SailException - If the statement could not be removed.public void clearInferred(Resource... contexts) throws SailException
InferencerConnectionclearInferred in interface InferencerConnectioncontexts - 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.SailException - If the statements could not be removed.public void flushUpdates()
throws SailException
InferencerConnectionSailConnectionListeners.flushUpdates in interface InferencerConnectionSailException - If the updates could not be processed.public void prepare()
throws SailException
flushUpdates() before forwarding the call to the wrapped
connection.prepare in interface SailConnectionprepare in class SailConnectionWrapperSailExceptionpublic void commit()
throws SailException
flushUpdates() before forwarding the call to the wrapped
connection.commit in interface SailConnectioncommit in class SailConnectionWrapperSailExceptionpublic CloseableIteration<? extends BindingSet,QueryEvaluationException> evaluate(TupleExpr tupleExpr, Dataset dataset, BindingSet bindings, boolean includeInferred) throws SailException
flushUpdates() before forwarding the call to the wrapped
connection.evaluate in interface SailConnectionevaluate in class SailConnectionWrapperSailExceptionpublic CloseableIteration<? extends Resource,SailException> getContextIDs() throws SailException
flushUpdates() before forwarding the call to the wrapped
connection.getContextIDs in interface SailConnectiongetContextIDs in class SailConnectionWrapperSailExceptionpublic CloseableIteration<? extends Statement,SailException> getStatements(Resource subj, URI pred, Value obj, boolean includeInferred, Resource... contexts) throws SailException
flushUpdates() before forwarding the call to the wrapped
connection.getStatements in interface SailConnectiongetStatements in class SailConnectionWrapperSailExceptionpublic long size(Resource... contexts) throws SailException
flushUpdates() before forwarding the call to the wrapped
connection.size in interface SailConnectionsize in class SailConnectionWrapperSailExceptionCopyright © 2001-2014 Aduna. All Rights Reserved.