public class ContextAwareRepository extends RepositoryWrapper
Constructor and Description |
---|
ContextAwareRepository() |
ContextAwareRepository(Repository delegate) |
Modifier and Type | Method and Description |
---|---|
IRI[] |
getAddContexts()
Deprecated.
|
IRI[] |
getArchiveContexts()
Deprecated.
|
String |
getBaseURI() |
ContextAwareConnection |
getConnection()
Opens a connection to this repository that can be used for querying and updating the contents of the repository.
|
IRI |
getInsertContext() |
int |
getMaxQueryTime() |
QueryLanguage |
getQueryLanguage() |
IRI[] |
getReadContexts() |
IRI[] |
getRemoveContexts() |
boolean |
isIncludeInferred() |
void |
setAddContexts(IRI... addContexts)
Deprecated.
|
void |
setArchiveContexts(IRI... archiveContexts)
Deprecated.
|
void |
setBaseURI(String baseURI) |
void |
setIncludeInferred(boolean includeInferred) |
void |
setInsertContext(IRI insertContext) |
void |
setMaxQueryTime(int maxQueryTime) |
void |
setQueryLanguage(QueryLanguage ql) |
void |
setReadContexts(IRI... readContexts) |
void |
setRemoveContexts(IRI... removeContexts) |
getDataDir, getDelegate, getValueFactory, initialize, isInitialized, isWritable, setDataDir, setDelegate, shutDown, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
init
public ContextAwareRepository()
public ContextAwareRepository(Repository delegate)
public int getMaxQueryTime()
public void setMaxQueryTime(int maxQueryTime)
@Deprecated public IRI[] getAddContexts()
ContextAwareConnection.getAddContexts()
@Deprecated public IRI[] getArchiveContexts()
public IRI getInsertContext()
public QueryLanguage getQueryLanguage()
public String getBaseURI()
public IRI[] getReadContexts()
ContextAwareConnection.getReadContexts()
public IRI[] getRemoveContexts()
public boolean isIncludeInferred()
@Deprecated public void setAddContexts(IRI... addContexts)
@Deprecated public void setArchiveContexts(IRI... archiveContexts)
public void setInsertContext(IRI insertContext)
public void setIncludeInferred(boolean includeInferred)
public void setQueryLanguage(QueryLanguage ql)
public void setBaseURI(String baseURI)
baseURI
- The default baseURI to set.public void setReadContexts(IRI... readContexts)
public void setRemoveContexts(IRI... removeContexts)
public ContextAwareConnection getConnection() throws RepositoryException
Repository
try (RepositoryConnection conn = repository.getConnection()) { // perform operations on the connection }Note that
RepositoryConnection
is not guaranteed to be thread-safe! The recommended pattern for
repository access in a multi-threaded application is to share the Repository object between threads, but have
each thread create and use its own RepositoryConnection
s.getConnection
in interface Repository
getConnection
in class RepositoryWrapper
RepositoryException
- If something went wrong during the creation of the Connection.Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.