Class SailRepository

java.lang.Object
org.eclipse.rdf4j.repository.base.AbstractRepository
org.eclipse.rdf4j.repository.sail.SailRepository
All Implemented Interfaces:
HttpClientDependent, SessionManagerDependent, FederatedServiceResolverClient, Repository, RepositoryResolverClient
Direct Known Subclasses:
FedXRepository

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 SailRepository(new ForwardChainingRDFSInferencer(new MemoryStore()));
repository.initialize();

Or, alternatively:

Sail sailStack = new MemoryStore();
sailStack = new ForwardChainingRDFSInferencer(sailStack);

Repository repository = new SailRepository(sailStack);
repository.initialize();
Author:
Arjohn Kampman