|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.sail.helpers.SailConnectionBase
org.openrdf.sail.memory.MemoryStoreConnection
public class MemoryStoreConnection
Implementation of a Sail Connection for memory stores.
| Nested Class Summary | |
|---|---|
protected class |
MemoryStoreConnection.MemEvaluationStatistics
Uses the MemoryStore's statement sizes to give cost estimates based on the size of the expected results. |
protected class |
MemoryStoreConnection.MemTripleSource
Implementation of the TripleSource interface from the Sail Query Model |
| Field Summary | |
|---|---|
protected MemoryStore |
store
|
| Fields inherited from class org.openrdf.sail.helpers.SailConnectionBase |
|---|
logger |
| Constructor Summary | |
|---|---|
protected |
MemoryStoreConnection(MemoryStore store)
|
| Method Summary | |
|---|---|
boolean |
addInferredStatement(Resource subj,
URI pred,
Value obj,
Resource... contexts)
Adds an inferred statement to a specific context. |
protected boolean |
addStatementInternal(Resource subj,
URI pred,
Value obj,
boolean explicit,
Resource... contexts)
Adds the specified statement to this MemoryStore. |
protected void |
addStatementInternal(Resource subj,
URI pred,
Value obj,
Resource... contexts)
|
void |
clearInferred(Resource... contexts)
Removes all inferred statements from the specified/all contexts. |
protected void |
clearInternal(Resource... contexts)
|
protected void |
clearNamespacesInternal()
|
protected void |
closeInternal()
|
protected void |
commitInternal()
|
protected CloseableIteration<? extends BindingSet,QueryEvaluationException> |
evaluateInternal(TupleExpr tupleExpr,
Dataset dataset,
BindingSet bindings,
boolean includeInferred)
|
void |
flushUpdates()
Flushes any pending updates to be processed and the resulting changes to be reported to registered SailConnectionListeners. |
protected CloseableIteration<? extends Resource,SailException> |
getContextIDsInternal()
|
protected String |
getNamespaceInternal(String prefix)
|
protected CloseableIteration<? extends Namespace,SailException> |
getNamespacesInternal()
|
protected CloseableIteration<? extends Statement,SailException> |
getStatementsInternal(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
Resource... contexts)
|
boolean |
removeInferredStatement(Resource subj,
URI pred,
Value obj,
Resource... contexts)
Removes an inferred statement from a specific context. |
protected boolean |
removeIteratorStatements(CloseableIteration<MemStatement,SailException> stIter,
boolean explicit)
|
protected void |
removeNamespaceInternal(String prefix)
|
protected boolean |
removeStatementsInternal(Resource subj,
URI pred,
Value obj,
boolean explicit,
Resource... contexts)
Removes the statements that match the specified pattern of subject, predicate, object and context. |
protected void |
removeStatementsInternal(Resource subj,
URI pred,
Value obj,
Resource... contexts)
|
protected void |
rollbackInternal()
|
protected void |
setNamespaceInternal(String prefix,
String name)
|
protected long |
sizeInternal(Resource... contexts)
|
protected void |
startTransactionInternal()
|
| Methods inherited from class org.openrdf.sail.helpers.SailConnectionBase |
|---|
addConnectionListener, addStatement, autoStartTransaction, clear, clearNamespaces, close, commit, evaluate, getContextIDs, getExclusiveConnectionLock, getNamespace, getNamespaces, getSharedConnectionLock, getStatements, getTransactionLock, hasConnectionListeners, isOpen, iterationClosed, notifyStatementAdded, notifyStatementRemoved, registerIteration, removeConnectionListener, removeNamespace, removeStatements, rollback, setNamespace, size, transactionActive, verifyIsOpen |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.openrdf.sail.SailConnection |
|---|
addConnectionListener, addStatement, clear, clearNamespaces, close, commit, evaluate, getContextIDs, getNamespace, getNamespaces, getStatements, isOpen, removeConnectionListener, removeNamespace, removeStatements, rollback, setNamespace, size |
| Field Detail |
|---|
protected final MemoryStore store
| Constructor Detail |
|---|
protected MemoryStoreConnection(MemoryStore store)
| Method Detail |
|---|
protected CloseableIteration<? extends BindingSet,QueryEvaluationException> evaluateInternal(TupleExpr tupleExpr,
Dataset dataset,
BindingSet bindings,
boolean includeInferred)
throws SailException
evaluateInternal in class SailConnectionBaseSailException
protected void closeInternal()
throws SailException
closeInternal in class SailConnectionBaseSailException
protected CloseableIteration<? extends Resource,SailException> getContextIDsInternal()
throws SailException
getContextIDsInternal in class SailConnectionBaseSailException
protected CloseableIteration<? extends Statement,SailException> getStatementsInternal(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
Resource... contexts)
throws SailException
getStatementsInternal in class SailConnectionBaseSailException
protected long sizeInternal(Resource... contexts)
throws SailException
sizeInternal in class SailConnectionBaseSailException
protected CloseableIteration<? extends Namespace,SailException> getNamespacesInternal()
throws SailException
getNamespacesInternal in class SailConnectionBaseSailException
protected String getNamespaceInternal(String prefix)
throws SailException
getNamespaceInternal in class SailConnectionBaseSailException
protected void startTransactionInternal()
throws SailException
startTransactionInternal in class SailConnectionBaseSailException
protected void commitInternal()
throws SailException
commitInternal in class SailConnectionBaseSailException
protected void rollbackInternal()
throws SailException
rollbackInternal in class SailConnectionBaseSailException
protected void addStatementInternal(Resource subj,
URI pred,
Value obj,
Resource... contexts)
throws SailException
addStatementInternal in class SailConnectionBaseSailException
public boolean addInferredStatement(Resource subj,
URI pred,
Value obj,
Resource... contexts)
throws SailException
InferencerConnection
addInferredStatement 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.
SailException - If the statement could not be added.
protected boolean addStatementInternal(Resource subj,
URI pred,
Value obj,
boolean explicit,
Resource... contexts)
throws SailException
SailException
protected void removeStatementsInternal(Resource subj,
URI pred,
Value obj,
Resource... contexts)
throws SailException
removeStatementsInternal in class SailConnectionBaseSailException
public boolean removeInferredStatement(Resource subj,
URI pred,
Value obj,
Resource... contexts)
throws SailException
InferencerConnection
removeInferredStatement 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.
SailException - If the statement could not be removed.
protected void clearInternal(Resource... contexts)
throws SailException
clearInternal in class SailConnectionBaseSailException
public void clearInferred(Resource... contexts)
throws SailException
InferencerConnection
clearInferred 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()
InferencerConnectionSailConnectionListeners.
flushUpdates in interface InferencerConnection
protected boolean removeStatementsInternal(Resource subj,
URI pred,
Value obj,
boolean explicit,
Resource... contexts)
throws SailException
subj - The subject for the pattern, or null for a wildcard.pred - The predicate for the pattern, or null for a wildcard.obj - The object for the pattern, or null for a wildcard.explicit - Flag indicating whether explicit or inferred statements should be
removed; true removes explicit statements that match the
pattern, false removes inferred statements that match
the pattern.
SailException
protected boolean removeIteratorStatements(CloseableIteration<MemStatement,SailException> stIter,
boolean explicit)
throws SailException
SailException
protected void setNamespaceInternal(String prefix,
String name)
throws SailException
setNamespaceInternal in class SailConnectionBaseSailException
protected void removeNamespaceInternal(String prefix)
throws SailException
removeNamespaceInternal in class SailConnectionBaseSailException
protected void clearNamespacesInternal()
throws SailException
clearNamespacesInternal in class SailConnectionBaseSailException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||