public class SailRepository extends RepositoryBase
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 SailRepository(new ForwardChainingRDFSInferencer(new MemoryStore())); repository.initialize();Or, alternatively:
Sail sailStack = new MemoryStore(); sailStack = new ForwardChainingRDFSInferencer(sailStack); Repository repository = new SailRepository(sailStack); repository.initialize();
| Constructor and Description |
|---|
SailRepository(Sail sail)
Creates a new repository object that operates on the supplied Sail.
|
| Modifier and Type | Method and Description |
|---|---|
SailRepositoryConnection |
getConnection() |
File |
getDataDir() |
Sail |
getSail()
Gets the Sail object that is on top of the Sail stack that this repository
operates on.
|
ValueFactory |
getValueFactory() |
protected void |
initializeInternal() |
boolean |
isWritable() |
void |
setDataDir(File dataDir) |
protected void |
shutDownInternal() |
String |
toString() |
initialize, isInitialized, shutDownpublic SailRepository(Sail sail)
sail - A Sail object.public File getDataDir()
public void setDataDir(File dataDir)
protected void initializeInternal()
throws RepositoryException
initializeInternal in class RepositoryBaseRepositoryExceptionprotected void shutDownInternal()
throws RepositoryException
shutDownInternal in class RepositoryBaseRepositoryExceptionpublic Sail getSail()
public boolean isWritable()
throws RepositoryException
RepositoryExceptionpublic ValueFactory getValueFactory()
public SailRepositoryConnection getConnection() throws RepositoryException
RepositoryExceptionCopyright © 2001-2014 Aduna. All Rights Reserved.