org.openrdf.sail.nativerdf
Class NativeStoreConnection

java.lang.Object
  extended by org.openrdf.sail.helpers.SailConnectionBase
      extended by org.openrdf.sail.helpers.NotifyingSailConnectionBase
          extended by org.openrdf.sail.nativerdf.NativeStoreConnection
All Implemented Interfaces:
InferencerConnection, NotifyingSailConnection, SailConnection

public class NativeStoreConnection
extends NotifyingSailConnectionBase
implements InferencerConnection

Author:
Arjohn Kampman

Field Summary
protected  NativeStore nativeStore
           
 
Fields inherited from class org.openrdf.sail.helpers.SailConnectionBase
logger
 
Constructor Summary
protected NativeStoreConnection(NativeStore nativeStore)
           
 
Method Summary
 boolean addInferredStatement(Resource subj, URI pred, Value obj, Resource... contexts)
          Adds an inferred statement to a specific context.
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  void removeNamespaceInternal(String prefix)
           
protected  void removeStatementsInternal(Resource subj, URI pred, Value obj, Resource... contexts)
           
protected  void replaceValues(TupleExpr tupleExpr)
           
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.NotifyingSailConnectionBase
addConnectionListener, hasConnectionListeners, notifyStatementAdded, notifyStatementRemoved, removeConnectionListener
 
Methods inherited from class org.openrdf.sail.helpers.SailConnectionBase
addStatement, autoStartTransaction, clear, clearNamespaces, close, commit, evaluate, finalize, getContextIDs, getExclusiveConnectionLock, getNamespace, getNamespaces, getSharedConnectionLock, getStatements, getTransactionLock, isOpen, iterationClosed, registerIteration, removeNamespace, removeStatements, rollback, setNamespace, size, transactionActive, verifyIsOpen
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openrdf.sail.NotifyingSailConnection
addConnectionListener, removeConnectionListener
 
Methods inherited from interface org.openrdf.sail.SailConnection
addStatement, clear, clearNamespaces, close, commit, evaluate, getContextIDs, getNamespace, getNamespaces, getStatements, isOpen, removeNamespace, removeStatements, rollback, setNamespace, size
 

Field Detail

nativeStore

protected final NativeStore nativeStore
Constructor Detail

NativeStoreConnection

protected NativeStoreConnection(NativeStore nativeStore)
                         throws IOException
Throws:
IOException
Method Detail

closeInternal

protected void closeInternal()
Specified by:
closeInternal in class SailConnectionBase

evaluateInternal

protected CloseableIteration<? extends BindingSet,QueryEvaluationException> evaluateInternal(TupleExpr tupleExpr,
                                                                                             Dataset dataset,
                                                                                             BindingSet bindings,
                                                                                             boolean includeInferred)
                                                                                      throws SailException
Specified by:
evaluateInternal in class SailConnectionBase
Throws:
SailException

replaceValues

protected void replaceValues(TupleExpr tupleExpr)
                      throws SailException
Throws:
SailException

getContextIDsInternal

protected CloseableIteration<? extends Resource,SailException> getContextIDsInternal()
                                                                              throws SailException
Specified by:
getContextIDsInternal in class SailConnectionBase
Throws:
SailException

getStatementsInternal

protected CloseableIteration<? extends Statement,SailException> getStatementsInternal(Resource subj,
                                                                                      URI pred,
                                                                                      Value obj,
                                                                                      boolean includeInferred,
                                                                                      Resource... contexts)
                                                                               throws SailException
Specified by:
getStatementsInternal in class SailConnectionBase
Throws:
SailException

sizeInternal

protected long sizeInternal(Resource... contexts)
                     throws SailException
Specified by:
sizeInternal in class SailConnectionBase
Throws:
SailException

getNamespacesInternal

protected CloseableIteration<? extends Namespace,SailException> getNamespacesInternal()
                                                                               throws SailException
Specified by:
getNamespacesInternal in class SailConnectionBase
Throws:
SailException

getNamespaceInternal

protected String getNamespaceInternal(String prefix)
                               throws SailException
Specified by:
getNamespaceInternal in class SailConnectionBase
Throws:
SailException

startTransactionInternal

protected void startTransactionInternal()
                                 throws SailException
Specified by:
startTransactionInternal in class SailConnectionBase
Throws:
SailException

commitInternal

protected void commitInternal()
                       throws SailException
Specified by:
commitInternal in class SailConnectionBase
Throws:
SailException

rollbackInternal

protected void rollbackInternal()
                         throws SailException
Specified by:
rollbackInternal in class SailConnectionBase
Throws:
SailException

addStatementInternal

protected void addStatementInternal(Resource subj,
                                    URI pred,
                                    Value obj,
                                    Resource... contexts)
                             throws SailException
Specified by:
addStatementInternal in class SailConnectionBase
Throws:
SailException

addInferredStatement

public boolean addInferredStatement(Resource subj,
                                    URI pred,
                                    Value obj,
                                    Resource... contexts)
                             throws SailException
Description copied from interface: InferencerConnection
Adds an inferred statement to a specific context.

Specified by:
addInferredStatement in interface InferencerConnection
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.
Throws:
SailException - If the statement could not be added.

removeStatementsInternal

protected void removeStatementsInternal(Resource subj,
                                        URI pred,
                                        Value obj,
                                        Resource... contexts)
                                 throws SailException
Specified by:
removeStatementsInternal in class SailConnectionBase
Throws:
SailException

removeInferredStatement

public boolean removeInferredStatement(Resource subj,
                                       URI pred,
                                       Value obj,
                                       Resource... contexts)
                                throws SailException
Description copied from interface: InferencerConnection
Removes an inferred statement from a specific context.

Specified by:
removeInferredStatement in interface InferencerConnection
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.
Throws:
SailException - If the statement could not be removed.

clearInternal

protected void clearInternal(Resource... contexts)
                      throws SailException
Specified by:
clearInternal in class SailConnectionBase
Throws:
SailException

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 interface InferencerConnection
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.

flushUpdates

public void flushUpdates()
Description copied from interface: InferencerConnection
Flushes any pending updates to be processed and the resulting changes to be reported to registered SailConnectionListeners.

Specified by:
flushUpdates in interface InferencerConnection

setNamespaceInternal

protected void setNamespaceInternal(String prefix,
                                    String name)
                             throws SailException
Specified by:
setNamespaceInternal in class SailConnectionBase
Throws:
SailException

removeNamespaceInternal

protected void removeNamespaceInternal(String prefix)
                                throws SailException
Specified by:
removeNamespaceInternal in class SailConnectionBase
Throws:
SailException

clearNamespacesInternal

protected void clearNamespacesInternal()
                                throws SailException
Specified by:
clearNamespacesInternal in class SailConnectionBase
Throws:
SailException


Copyright © 2001-2008 Aduna. All Rights Reserved.