public class SailRepositoryConnection extends RepositoryConnectionBase
RepositoryConnection interface that wraps a
SailConnection.logger| Modifier | Constructor and Description |
|---|---|
protected |
SailRepositoryConnection(SailRepository repository,
SailConnection sailConnection)
Creates a new repository connection that will wrap the supplied
SailConnection.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addWithoutCommit(Resource subject,
URI predicate,
Value object,
Resource... contexts) |
void |
begin() |
void |
clear(Resource... contexts) |
void |
clearNamespaces() |
void |
close() |
void |
commit() |
protected <E> RepositoryResult<E> |
createRepositoryResult(CloseableIteration<? extends E,SailException> sailIter)
Wraps a CloseableIteration coming from a Sail in a RepositoryResult
object, applying the required conversions
|
void |
exportStatements(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
RDFHandler handler,
Resource... contexts) |
RepositoryResult<Resource> |
getContextIDs() |
String |
getNamespace(String prefix) |
RepositoryResult<Namespace> |
getNamespaces() |
SailConnection |
getSailConnection()
Returns the underlying SailConnection.
|
RepositoryResult<Statement> |
getStatements(Resource subj,
URI pred,
Value obj,
boolean includeInferred,
Resource... contexts) |
boolean |
isActive() |
boolean |
isEmpty() |
boolean |
isOpen() |
SailBooleanQuery |
prepareBooleanQuery(QueryLanguage ql,
String queryString,
String baseURI) |
SailGraphQuery |
prepareGraphQuery(QueryLanguage ql,
String queryString,
String baseURI) |
SailQuery |
prepareQuery(QueryLanguage ql,
String queryString,
String baseURI) |
SailTupleQuery |
prepareTupleQuery(QueryLanguage ql,
String queryString,
String baseURI) |
Update |
prepareUpdate(QueryLanguage ql,
String update,
String baseURI) |
void |
removeNamespace(String prefix) |
protected void |
removeWithoutCommit(Resource subject,
URI predicate,
Value object,
Resource... contexts) |
void |
rollback() |
void |
setNamespace(String prefix,
String name) |
long |
size(Resource... contexts) |
add, add, add, add, add, add, add, add, addWithoutCommit, conditionalCommit, conditionalRollback, export, getParserConfig, getRepository, getValueFactory, hasStatement, hasStatement, isAutoCommit, prepareBooleanQuery, prepareGraphQuery, prepareQuery, prepareTupleQuery, prepareUpdate, remove, remove, remove, remove, removeWithoutCommit, setAutoCommit, setParserConfig, startLocalTransactionprotected SailRepositoryConnection(SailRepository repository, SailConnection sailConnection)
SailRepository.getConnection().public SailConnection getSailConnection()
public void begin()
throws RepositoryException
RepositoryExceptionpublic void commit()
throws RepositoryException
RepositoryExceptionpublic void rollback()
throws RepositoryException
RepositoryExceptionpublic void close()
throws RepositoryException
close in interface RepositoryConnectionclose in class RepositoryConnectionBaseRepositoryExceptionpublic boolean isOpen()
throws RepositoryException
isOpen in interface RepositoryConnectionisOpen in class RepositoryConnectionBaseRepositoryExceptionpublic SailQuery prepareQuery(QueryLanguage ql, String queryString, String baseURI) throws MalformedQueryException
MalformedQueryExceptionpublic SailTupleQuery prepareTupleQuery(QueryLanguage ql, String queryString, String baseURI) throws MalformedQueryException
MalformedQueryExceptionpublic SailGraphQuery prepareGraphQuery(QueryLanguage ql, String queryString, String baseURI) throws MalformedQueryException
MalformedQueryExceptionpublic SailBooleanQuery prepareBooleanQuery(QueryLanguage ql, String queryString, String baseURI) throws MalformedQueryException
MalformedQueryExceptionpublic Update prepareUpdate(QueryLanguage ql, String update, String baseURI) throws RepositoryException, MalformedQueryException
public RepositoryResult<Resource> getContextIDs() throws RepositoryException
RepositoryExceptionpublic RepositoryResult<Statement> getStatements(Resource subj, URI pred, Value obj, boolean includeInferred, Resource... contexts) throws RepositoryException
RepositoryExceptionpublic boolean isEmpty()
throws RepositoryException
isEmpty in interface RepositoryConnectionisEmpty in class RepositoryConnectionBaseRepositoryExceptionpublic void exportStatements(Resource subj, URI pred, Value obj, boolean includeInferred, RDFHandler handler, Resource... contexts) throws RepositoryException, RDFHandlerException
public long size(Resource... contexts) throws RepositoryException
RepositoryExceptionprotected void addWithoutCommit(Resource subject, URI predicate, Value object, Resource... contexts) throws RepositoryException
addWithoutCommit in class RepositoryConnectionBaseRepositoryExceptionprotected void removeWithoutCommit(Resource subject, URI predicate, Value object, Resource... contexts) throws RepositoryException
removeWithoutCommit in class RepositoryConnectionBaseRepositoryExceptionpublic void clear(Resource... contexts) throws RepositoryException
clear in interface RepositoryConnectionclear in class RepositoryConnectionBaseRepositoryExceptionpublic void setNamespace(String prefix, String name) throws RepositoryException
RepositoryExceptionpublic void removeNamespace(String prefix) throws RepositoryException
RepositoryExceptionpublic void clearNamespaces()
throws RepositoryException
RepositoryExceptionpublic RepositoryResult<Namespace> getNamespaces() throws RepositoryException
RepositoryExceptionpublic String getNamespace(String prefix) throws RepositoryException
RepositoryExceptionprotected <E> RepositoryResult<E> createRepositoryResult(CloseableIteration<? extends E,SailException> sailIter)
public boolean isActive()
throws UnknownTransactionStateException
UnknownTransactionStateExceptionCopyright © 2001-2014 Aduna. All Rights Reserved.