public class DatasetRepository extends RepositoryWrapper
| Constructor and Description |
|---|
DatasetRepository() |
DatasetRepository(SailRepository delegate) |
| Modifier and Type | Method and Description |
|---|---|
RepositoryConnection |
getConnection()
Opens a connection to this repository that can be used for querying and updating the contents of the repository.
|
SailRepository |
getDelegate() |
void |
loadDataset(URL url,
IRI context,
ParserConfig config)
Inspects if the dataset at the supplied URL location has been modified since the last load into this repository
and if so loads it into the supplied context.
|
void |
setDelegate(Repository delegate) |
getDataDir, getValueFactory, initialize, isInitialized, isWritable, setDataDir, shutDown, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitinitpublic DatasetRepository()
public DatasetRepository(SailRepository delegate)
public void setDelegate(Repository delegate)
setDelegate in interface DelegatingRepositorysetDelegate in class RepositoryWrapperpublic SailRepository getDelegate()
getDelegate in interface DelegatingRepositorygetDelegate in class RepositoryWrapperpublic RepositoryConnection 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 RepositoryConnections.getConnection in interface RepositorygetConnection in class RepositoryWrapperRepositoryException - If something went wrong during the creation of the Connection.public void loadDataset(URL url, IRI context, ParserConfig config) throws RepositoryException
url - the location of the datasetcontext - the context in which to load the datasetconfig - parser configuration to use for processing the datasetRepositoryException - if an error occurred while loading the dataset.Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.