Search in sources :

Example 1 with ContextAwareRepository

use of org.eclipse.rdf4j.repository.contextaware.ContextAwareRepository in project rdf4j by eclipse.

the class ContextAwareFactory method getRepository.

public Repository getRepository(RepositoryImplConfig configuration) throws RepositoryConfigException {
    if (configuration instanceof ContextAwareConfig) {
        ContextAwareConfig config = (ContextAwareConfig) configuration;
        ContextAwareRepository repo = new ContextAwareRepository();
        repo.setIncludeInferred(config.isIncludeInferred());
        repo.setMaxQueryTime(config.getMaxQueryTime());
        repo.setQueryLanguage(config.getQueryLanguage());
        repo.setBaseURI(config.getBaseURI());
        repo.setReadContexts(config.getReadContexts());
        repo.setAddContexts(config.getAddContexts());
        repo.setRemoveContexts(config.getRemoveContexts());
        repo.setArchiveContexts(config.getArchiveContexts());
        repo.setInsertContext(config.getInsertContext());
        return repo;
    }
    throw new RepositoryConfigException("Invalid configuration class: " + configuration.getClass());
}
Also used : ContextAwareRepository(org.eclipse.rdf4j.repository.contextaware.ContextAwareRepository) RepositoryConfigException(org.eclipse.rdf4j.repository.config.RepositoryConfigException)

Aggregations

RepositoryConfigException (org.eclipse.rdf4j.repository.config.RepositoryConfigException)1 ContextAwareRepository (org.eclipse.rdf4j.repository.contextaware.ContextAwareRepository)1