Search in sources :

Example 1 with NativeStore

use of org.openrdf.sail.nativerdf.NativeStore in project backstage by zepheira.

the class DataLoadingUtilities method createNativeRepository.

public static RepoSailTuple createNativeRepository(File dir) {
    try {
        Sail sail = new NativeStore();
        sail.setDataDir(dir);
        ((NativeStore) sail).setTripleIndexes("spoc,posc,opsc");
        Repository r = new SailRepository(sail);
        r.initialize();
        return new RepoSailTuple(r, sail);
    } catch (Exception e) {
        _logger.error("Exception caught while creating Sesame native repository", e);
        return null;
    }
}
Also used : SailRepository(org.openrdf.repository.sail.SailRepository) Repository(org.openrdf.repository.Repository) SailRepository(org.openrdf.repository.sail.SailRepository) Sail(org.openrdf.sail.Sail) NativeStore(org.openrdf.sail.nativerdf.NativeStore) SailException(org.openrdf.sail.SailException) RepositoryException(org.openrdf.repository.RepositoryException) RDFHandlerException(org.openrdf.rio.RDFHandlerException) IOException(java.io.IOException) FileNotFoundException(java.io.FileNotFoundException)

Aggregations

FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 Repository (org.openrdf.repository.Repository)1 RepositoryException (org.openrdf.repository.RepositoryException)1 SailRepository (org.openrdf.repository.sail.SailRepository)1 RDFHandlerException (org.openrdf.rio.RDFHandlerException)1 Sail (org.openrdf.sail.Sail)1 SailException (org.openrdf.sail.SailException)1 NativeStore (org.openrdf.sail.nativerdf.NativeStore)1