| org.openrdf.repository.Repository
All known Subclasses: org.openrdf.repository.http.HTTPRepository, org.openrdf.repository.sail.SailRepository,
Repository | public interface Repository (Code) | | A Sesame repository that contains RDF data that can be queried and updated.
Access to the repository can be acquired by openening a connection to it.
This connection can then be used to query and/or update the contents of the
repository. Depending on the implementation of the repository, it may or may
not support multiple concurrent connections.
Please note that a repository needs to be initialized before it can be used
and that it should be shut down before it is discarded/garbage collected.
Forgetting the latter can result in loss of data (depending on the Repository
implementation)!
author: Arjohn Kampman |
Method Summary | |
public RepositoryConnection | getConnection() Opens a connection to this repository that can be used for querying and
updating the contents of the repository. | public File | getDataDir() Get the directory where data and logging for this repository is stored. | public ValueFactory | getValueFactory() Gets a ValueFactory for this Repository. | public void | initialize() Initializes this repository. | public boolean | isWritable() Checks whether this repository is writable, i.e. | public void | setDataDir(File dataDir) Set the directory where data and logging for this repository is stored. | public void | shutDown() Shuts the repository down, releasing any resources that it keeps hold of. |
getConnection | public RepositoryConnection getConnection() throws RepositoryException(Code) | | Opens a connection to this repository that can be used for querying and
updating the contents of the repository. Created connections need to be
closed to make sure that any resources they keep hold of are released. The
best way to do this is to use a try-finally-block as follows:
Connection con = repository.getConnection();
try {
// perform operations on the connection
}
finally {
con.close();
}
A connection that allows operations on this repository. throws: RepositoryException - If something went wrong during the creation of the Connection. |
getDataDir | public File getDataDir()(Code) | | Get the directory where data and logging for this repository is stored.
the directory where data for this repository is stored. |
getValueFactory | public ValueFactory getValueFactory()(Code) | | Gets a ValueFactory for this Repository.
A repository-specific ValueFactory. |
isWritable | public boolean isWritable() throws RepositoryException(Code) | | Checks whether this repository is writable, i.e. if the data contained in
this repository can be changed. The writability of the repository is
determined by the writability of the Sail that this repository operates
on.
|
setDataDir | public void setDataDir(File dataDir)(Code) | | Set the directory where data and logging for this repository is stored.
Parameters: dataDir - the directory where data for this repository is stored |
shutDown | public void shutDown() throws RepositoryException(Code) | | Shuts the repository down, releasing any resources that it keeps hold of.
Once shut down, the repository can no longer be used until it is
re-initialized.
|
|
|