|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openrdf.repository.sail.SailRepository
public class SailRepository
An implementation of the Repository interface that operates on a
(stack of) Sail object(s). The behaviour of the repository is
determined by the Sail stack that it operates on; for example, the repository
will only support RDF Schema or OWL semantics if the Sail stack includes an
inferencer for this.
Creating a repository object of this type is very easy. For example, the following code creates and initializes a main-memory store with RDF Schema semantics:
Repository repository = new RepositoryImpl(new ForwardChainingRDFSInferencer(new MemoryStore())); repository.initialize();Or, alternatively:
Sail sailStack = new MemoryStore(); sailStack = new ForwardChainingRDFSInferencer(sailStack); Repository repository = new Repository(sailStack); repository.initialize();
| Constructor Summary | |
|---|---|
SailRepository(Sail sail)
Creates a new repository object that operates on the supplied Sail. |
|
| Method Summary | |
|---|---|
SailRepositoryConnection |
getConnection()
Opens a connection to this repository that can be used for querying and updating the contents of the repository. |
File |
getDataDir()
Get the directory where data and logging for this repository is stored. |
Sail |
getSail()
Gets the Sail object that is on top of the Sail stack that this repository operates on. |
ValueFactory |
getValueFactory()
Gets a ValueFactory for this Repository. |
void |
initialize()
Initializes this repository. |
boolean |
isWritable()
Checks whether this repository is writable, i.e. |
void |
setDataDir(File dataDir)
Set the directory where data and logging for this repository is stored. |
void |
shutDown()
Shuts the repository down, releasing any resources that it keeps hold of. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SailRepository(Sail sail)
sail - A Sail object.| Method Detail |
|---|
public File getDataDir()
Repository
getDataDir in interface Repositorypublic void setDataDir(File dataDir)
Repository
setDataDir in interface RepositorydataDir - the directory where data for this repository is stored
public void initialize()
throws RepositoryException
Repository
initialize in interface RepositoryRepositoryException - If the initialization failed.
public void shutDown()
throws RepositoryException
Repository
shutDown in interface RepositoryRepositoryExceptionpublic Sail getSail()
public boolean isWritable()
throws RepositoryException
Repository
isWritable in interface RepositoryRepositoryExceptionpublic ValueFactory getValueFactory()
Repository
getValueFactory in interface Repository
public SailRepositoryConnection getConnection()
throws RepositoryException
Repository
Connection con = repository.getConnection();
try {
// perform operations on the connection
}
finally {
con.close();
}
getConnection in interface RepositoryRepositoryException - If something went wrong during the creation of the Connection.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||