public class KiWiSailConnection
extends org.openrdf.sail.helpers.NotifyingSailConnectionBase
implements org.openrdf.sail.inferencer.InferencerConnection, org.apache.marmotta.commons.sesame.repository.ResourceConnection
| Modifier and Type | Class and Description |
|---|---|
protected static class |
KiWiSailConnection.KiWiEvaluationStatistics |
| Modifier and Type | Field and Description |
|---|---|
protected KiWiConnection |
databaseConnection
Internal JDBC connection to the database.
|
| Constructor and Description |
|---|
KiWiSailConnection(KiWiStore sailBase) |
| Modifier and Type | Method and Description |
|---|---|
KiWiTriple |
addInferredStatement(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj)
Used by the KiWi reasoner, returns the created inferred statement directly.
|
boolean |
addInferredStatement(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... contexts)
Adds an inferred statement to a specific context.
|
Set<KiWiTriple> |
addStatementInternal(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
boolean inferred,
org.openrdf.model.Resource... contexts) |
protected void |
addStatementInternal(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... contexts) |
void |
clearInferred(org.openrdf.model.Resource... contexts)
Removes all inferred statements from the specified/all contexts.
|
protected void |
clearInternal(org.openrdf.model.Resource... contexts) |
protected void |
clearNamespacesInternal() |
protected void |
closeInternal() |
protected void |
commitInternal() |
protected info.aduna.iteration.CloseableIteration<? extends org.openrdf.query.BindingSet,org.openrdf.query.QueryEvaluationException> |
evaluateInternal(org.openrdf.query.algebra.TupleExpr tupleExpr,
org.openrdf.query.Dataset dataset,
org.openrdf.query.BindingSet bindings,
boolean includeInferred)
Implementation of SPARQL/SeRQL querying using an abstract query expression.
|
void |
flushUpdates() |
org.openrdf.model.BNode |
getBNode(String id)
Return the Sesame BNode with the given anonymous ID if it exists, or null if it does not exist.
|
protected info.aduna.iteration.CloseableIteration<? extends org.openrdf.model.Resource,org.openrdf.sail.SailException> |
getContextIDsInternal() |
KiWiConnection |
getDatabaseConnection() |
protected String |
getNamespaceInternal(String prefix) |
protected info.aduna.iteration.CloseableIteration<? extends org.openrdf.model.Namespace,org.openrdf.sail.SailException> |
getNamespacesInternal() |
org.openrdf.repository.RepositoryResult<org.openrdf.model.Resource> |
getResources()
Return an iterator over the resources contained in this repository.
|
org.openrdf.repository.RepositoryResult<org.openrdf.model.URI> |
getResources(String prefix)
Return an iterator over the resources contained in this repository matching the given prefix.
|
protected info.aduna.iteration.CloseableIteration<? extends org.openrdf.model.Statement,org.openrdf.sail.SailException> |
getStatementsInternal(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
boolean includeInferred,
org.openrdf.model.Resource... contexts) |
org.openrdf.model.URI |
getURI(String uri)
Return the Sesame URI with the given uri identifier if it exists, or null if it does not exist.
|
KiWiValueFactory |
getValueFactory() |
boolean |
removeInferredStatement(KiWiTriple triple)
Removes an inferred statement from a specific context.
|
boolean |
removeInferredStatement(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... contexts)
Removes an inferred statement from a specific context.
|
protected void |
removeNamespaceInternal(String prefix) |
void |
removeResource(org.openrdf.model.Resource resource)
Remove the resource given as argument from the triple store and the resource repository.
|
protected void |
removeStatementsInternal(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... contexts) |
protected KiWiResource |
resolveContextInternal(org.openrdf.model.Resource input) |
protected void |
rollbackInternal() |
protected void |
setNamespaceInternal(String prefix,
String name) |
protected long |
sizeInternal(org.openrdf.model.Resource... contexts) |
protected void |
startTransactionInternal() |
addConnectionListener, hasConnectionListeners, notifyStatementAdded, notifyStatementRemoved, removeConnectionListeneraddStatement, addStatement, autoStartTransaction, begin, clear, clearNamespaces, close, commit, endUpdate, evaluate, finalize, getContextIDs, getExclusiveConnectionLock, getNamespace, getNamespaces, getSharedConnectionLock, getStatements, getTransactionLock, isActive, isOpen, iterationClosed, prepare, registerIteration, removeNamespace, removeStatement, removeStatements, rollback, setNamespace, size, startUpdate, transactionActive, verifyIsActive, verifyIsOpenclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddConnectionListener, removeConnectionListeneraddStatement, addStatement, begin, clear, clearNamespaces, close, commit, endUpdate, evaluate, getContextIDs, getNamespace, getNamespaces, getStatements, isActive, isOpen, prepare, removeNamespace, removeStatement, removeStatements, rollback, setNamespace, size, startUpdateprotected KiWiConnection databaseConnection
public KiWiSailConnection(KiWiStore sailBase) throws org.openrdf.sail.SailException
org.openrdf.sail.SailExceptionpublic KiWiConnection getDatabaseConnection()
protected void addStatementInternal(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... contexts)
throws org.openrdf.sail.SailException
addStatementInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionpublic boolean addInferredStatement(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... contexts)
throws org.openrdf.sail.SailException
addInferredStatement in interface org.openrdf.sail.inferencer.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.org.openrdf.sail.SailException - If the statement could not be added.IllegalStateException - If the connection has been closed.public KiWiTriple addInferredStatement(org.openrdf.model.Resource subj, org.openrdf.model.URI pred, org.openrdf.model.Value obj) throws org.openrdf.sail.SailException
org.openrdf.sail.SailExceptionpublic Set<KiWiTriple> addStatementInternal(org.openrdf.model.Resource subj, org.openrdf.model.URI pred, org.openrdf.model.Value obj, boolean inferred, org.openrdf.model.Resource... contexts) throws org.openrdf.sail.SailException
org.openrdf.sail.SailExceptionprotected void closeInternal()
throws org.openrdf.sail.SailException
closeInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionprotected info.aduna.iteration.CloseableIteration<? extends org.openrdf.query.BindingSet,org.openrdf.query.QueryEvaluationException> evaluateInternal(org.openrdf.query.algebra.TupleExpr tupleExpr,
org.openrdf.query.Dataset dataset,
org.openrdf.query.BindingSet bindings,
boolean includeInferred)
throws org.openrdf.sail.SailException
evaluateInternal in class org.openrdf.sail.helpers.SailConnectionBasetupleExpr - dataset - bindings - includeInferred - org.openrdf.sail.SailExceptionprotected info.aduna.iteration.CloseableIteration<? extends org.openrdf.model.Resource,org.openrdf.sail.SailException> getContextIDsInternal()
throws org.openrdf.sail.SailException
getContextIDsInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionprotected info.aduna.iteration.CloseableIteration<? extends org.openrdf.model.Statement,org.openrdf.sail.SailException> getStatementsInternal(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
boolean includeInferred,
org.openrdf.model.Resource... contexts)
throws org.openrdf.sail.SailException
getStatementsInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionprotected long sizeInternal(org.openrdf.model.Resource... contexts)
throws org.openrdf.sail.SailException
sizeInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionprotected void startTransactionInternal()
throws org.openrdf.sail.SailException
startTransactionInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionprotected void commitInternal()
throws org.openrdf.sail.SailException
commitInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionprotected void rollbackInternal()
throws org.openrdf.sail.SailException
rollbackInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionprotected void removeStatementsInternal(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... contexts)
throws org.openrdf.sail.SailException
removeStatementsInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionpublic boolean removeInferredStatement(org.openrdf.model.Resource subj,
org.openrdf.model.URI pred,
org.openrdf.model.Value obj,
org.openrdf.model.Resource... contexts)
throws org.openrdf.sail.SailException
removeInferredStatement in interface org.openrdf.sail.inferencer.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.org.openrdf.sail.SailException - If the statement could not be removed.IllegalStateException - If the connection has been closed.public boolean removeInferredStatement(KiWiTriple triple) throws org.openrdf.sail.SailException
org.openrdf.sail.SailException - If the statement could not be removed.IllegalStateException - If the connection has been closed.protected void clearInternal(org.openrdf.model.Resource... contexts)
throws org.openrdf.sail.SailException
clearInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionpublic void clearInferred(org.openrdf.model.Resource... contexts)
throws org.openrdf.sail.SailException
clearInferred in interface org.openrdf.sail.inferencer.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.org.openrdf.sail.SailException - If the statements could not be removed.IllegalStateException - If the connection has been closed.public void flushUpdates()
flushUpdates in interface org.openrdf.sail.inferencer.InferencerConnectionprotected info.aduna.iteration.CloseableIteration<? extends org.openrdf.model.Namespace,org.openrdf.sail.SailException> getNamespacesInternal()
throws org.openrdf.sail.SailException
getNamespacesInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionprotected String getNamespaceInternal(String prefix) throws org.openrdf.sail.SailException
getNamespaceInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionprotected void setNamespaceInternal(String prefix, String name) throws org.openrdf.sail.SailException
setNamespaceInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionprotected void removeNamespaceInternal(String prefix) throws org.openrdf.sail.SailException
removeNamespaceInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionprotected void clearNamespacesInternal()
throws org.openrdf.sail.SailException
clearNamespacesInternal in class org.openrdf.sail.helpers.SailConnectionBaseorg.openrdf.sail.SailExceptionprotected KiWiResource resolveContextInternal(org.openrdf.model.Resource input)
public KiWiValueFactory getValueFactory()
public org.openrdf.repository.RepositoryResult<org.openrdf.model.Resource> getResources()
throws org.openrdf.repository.RepositoryException
getResources in interface org.apache.marmotta.commons.sesame.repository.ResourceConnectionorg.openrdf.repository.RepositoryExceptionpublic org.openrdf.repository.RepositoryResult<org.openrdf.model.URI> getResources(String prefix) throws org.openrdf.repository.RepositoryException
getResources in interface org.apache.marmotta.commons.sesame.repository.ResourceConnectionorg.openrdf.repository.RepositoryExceptionpublic org.openrdf.model.URI getURI(String uri)
getURI in interface org.apache.marmotta.commons.sesame.repository.ResourceConnectionuri - public org.openrdf.model.BNode getBNode(String id)
getBNode in interface org.apache.marmotta.commons.sesame.repository.ResourceConnectionid - public void removeResource(org.openrdf.model.Resource resource)
removeResource in interface org.apache.marmotta.commons.sesame.repository.ResourceConnectionresource - Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.