Search in sources :

Example 6 with SailImplConfig

use of org.eclipse.rdf4j.sail.config.SailImplConfig in project jopa by kbss-cvut.

the class StorageConnectorTest method connectorIsAbleToConnectToAlreadyInitializedLocalNativeStorage.

@Test
void connectorIsAbleToConnectToAlreadyInitializedLocalNativeStorage() throws Exception {
    final String repoId = "repositoryTest";
    final URI repoUri = Paths.get(getProjectRootPath() + File.separator + "repositories" + File.separator + repoId).toUri();
    this.repositoryFolder = new File(getProjectRootPath() + File.separator + "repositories");
    SailImplConfig backend = new NativeStoreConfig();
    final SailRepositoryConfig repoType = new SailRepositoryConfig(backend);
    final RepositoryConfig config = new RepositoryConfig(repoId, repoType);
    final RepositoryManager repoManager = RepositoryProvider.getRepositoryManagerOfRepository(repoUri.toString());
    repoManager.addRepositoryConfig(config);
    repoManager.getRepository(repoId);
    final StorageConnector connector = new StorageConnector(TestUtils.createDriverConfig(repoUri.toString()));
    assertTrue(connector.isOpen());
    connector.close();
}
Also used : SailImplConfig(org.eclipse.rdf4j.sail.config.SailImplConfig) SailRepositoryConfig(org.eclipse.rdf4j.repository.sail.config.SailRepositoryConfig) RepositoryConfig(org.eclipse.rdf4j.repository.config.RepositoryConfig) NativeStoreConfig(org.eclipse.rdf4j.sail.nativerdf.config.NativeStoreConfig) RepositoryManager(org.eclipse.rdf4j.repository.manager.RepositoryManager) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) URI(java.net.URI) File(java.io.File) SailRepositoryConfig(org.eclipse.rdf4j.repository.sail.config.SailRepositoryConfig) Test(org.junit.jupiter.api.Test)

Example 7 with SailImplConfig

use of org.eclipse.rdf4j.sail.config.SailImplConfig in project jopa by kbss-cvut.

the class RepositoryConnectorInitializer method createLocalNativeRepositoryConfig.

private static RepositoryConfig createLocalNativeRepositoryConfig(String repoId, DriverConfiguration configuration) {
    SailImplConfig backend = new NativeStoreConfig();
    if (configuration.is(SesameConfigParam.USE_INFERENCE)) {
        backend = new SchemaCachingRDFSInferencerConfig(backend);
    }
    final SailRepositoryConfig repoType = new SailRepositoryConfig(backend);
    return new RepositoryConfig(repoId, repoType);
}
Also used : SailImplConfig(org.eclipse.rdf4j.sail.config.SailImplConfig) SchemaCachingRDFSInferencerConfig(org.eclipse.rdf4j.sail.inferencer.fc.config.SchemaCachingRDFSInferencerConfig) SailRepositoryConfig(org.eclipse.rdf4j.repository.sail.config.SailRepositoryConfig) RepositoryConfig(org.eclipse.rdf4j.repository.config.RepositoryConfig) NativeStoreConfig(org.eclipse.rdf4j.sail.nativerdf.config.NativeStoreConfig) SailRepositoryConfig(org.eclipse.rdf4j.repository.sail.config.SailRepositoryConfig)

Aggregations

SailImplConfig (org.eclipse.rdf4j.sail.config.SailImplConfig)7 SailRepositoryConfig (org.eclipse.rdf4j.repository.sail.config.SailRepositoryConfig)6 RepositoryImplConfig (org.eclipse.rdf4j.repository.config.RepositoryImplConfig)3 MemoryStoreConfig (org.eclipse.rdf4j.sail.memory.config.MemoryStoreConfig)3 NativeStoreConfig (org.eclipse.rdf4j.sail.nativerdf.config.NativeStoreConfig)3 RepositoryConfig (org.eclipse.rdf4j.repository.config.RepositoryConfig)2 Level (ch.qos.logback.classic.Level)1 LoggerContext (ch.qos.logback.classic.LoggerContext)1 TurboFilter (ch.qos.logback.classic.turbo.TurboFilter)1 FilterReply (ch.qos.logback.core.spi.FilterReply)1 File (java.io.File)1 URI (java.net.URI)1 IRI (org.eclipse.rdf4j.model.IRI)1 RepositoryManager (org.eclipse.rdf4j.repository.manager.RepositoryManager)1 ForwardChainingRDFSInferencerConfig (org.eclipse.rdf4j.sail.inferencer.fc.config.ForwardChainingRDFSInferencerConfig)1 SchemaCachingRDFSInferencerConfig (org.eclipse.rdf4j.sail.inferencer.fc.config.SchemaCachingRDFSInferencerConfig)1 SpinSailConfig (org.eclipse.rdf4j.sail.spin.config.SpinSailConfig)1 CoreMatchers.containsString (org.hamcrest.CoreMatchers.containsString)1 Test (org.junit.jupiter.api.Test)1 Logger (org.slf4j.Logger)1