use of org.eclipse.rdf4j.sail.config.SailImplConfig in project Commons by denkbares.
the class ConfigurableFreeSailRepositoryFactory method overridePlugins.
/**
* Here we override the parameter allowing us to deactivate plugins. Some of the plugins we just don't need, but in
* case of the mongodb plugin, it messes up dependencies of certain other tools that already use a mongodb.
* <p>
* Unfortunately, there doesn't seem to be any other way than doing the overriding in this factory. You would
* think, that you can set the plugin parameter using the grapdh configuration file des-defaults.ttl, but from that
* file, only certain parameters are used.
*
* @since graphb-free-runtime:8.11
*/
protected void overridePlugins(MonitorRepositoryConfig monitorConfig) {
SailImplConfig sailImplConfig = monitorConfig.getSailImplConfig();
IRI disablePluginsIri = SimpleValueFactory.getInstance().createIRI("http://www.ontotext.com/trree/owlim#disable-plugins");
((OWLIMSailConfig) sailImplConfig).getConfigParams().put(disablePluginsIri, "mongodb,notifications,notifications-logger,rdfrank,expose-entity,utils");
// The plugin "utils" uses the outdated javascript nashorn plugin, no longer present after Java 14.
// We can deactivate it, but there still are several ugly exceptions in the log... we add a logging filter to
// skip those messages, since they are irrelevant.
Logger logger = LoggerFactory.getLogger(this.getClass());
if (logger instanceof ch.qos.logback.classic.Logger) {
LoggerContext context = ((ch.qos.logback.classic.Logger) logger).getLoggerContext();
context.addTurboFilter(new TurboFilter() {
@Override
public FilterReply decide(Marker marker, ch.qos.logback.classic.Logger logger, Level level, String text, Object[] objects, Throwable throwable) {
if (level != Level.ERROR)
return FilterReply.NEUTRAL;
if ("Plugin 'utils' failed to initialize: jdk/nashorn/api/scripting/ClassFilter".equals(text)) {
return FilterReply.DENY;
}
return FilterReply.NEUTRAL;
}
});
}
}
use of org.eclipse.rdf4j.sail.config.SailImplConfig in project Commons by denkbares.
the class RdfConfig method createRepositoryConfig.
@Override
public org.eclipse.rdf4j.repository.config.RepositoryConfig createRepositoryConfig(String repositoryId, String repositoryLabel, Map<String, String> overrides) throws RepositoryConfigException {
// create a configuration for the SAIL stack
SailImplConfig backendConfig = new MemoryStoreConfig();
// create a configuration for the repository implementation
RepositoryImplConfig repositoryTypeSpec = new SailRepositoryConfig(backendConfig);
return new org.eclipse.rdf4j.repository.config.RepositoryConfig(repositoryId, repositoryTypeSpec);
}
use of org.eclipse.rdf4j.sail.config.SailImplConfig in project Commons by denkbares.
the class RdfFSConfig method createRepositoryConfig.
@Override
public org.eclipse.rdf4j.repository.config.RepositoryConfig createRepositoryConfig(String repositoryId, String repositoryLabel, Map<String, String> overrides) throws RepositoryConfigException {
// create a configuration for the SAIL stack
SailImplConfig backendConfig = new NativeStoreConfig();
// create a configuration for the repository implementation
RepositoryImplConfig repositoryTypeSpec = new SailRepositoryConfig(backendConfig);
return new org.eclipse.rdf4j.repository.config.RepositoryConfig(repositoryId, repositoryTypeSpec);
}
use of org.eclipse.rdf4j.sail.config.SailImplConfig in project Commons by denkbares.
the class RdfsConfig method createRepositoryConfig.
@Override
public org.eclipse.rdf4j.repository.config.RepositoryConfig createRepositoryConfig(String repositoryId, String repositoryLabel, Map<String, String> overrides) throws RepositoryConfigException {
// create a configuration for the SAIL stack
SailImplConfig backendConfig = new MemoryStoreConfig();
// create a configuration for the repository implementation
SailRepositoryConfig repositoryTypeSpec = new SailRepositoryConfig(new ForwardChainingRDFSInferencerConfig(backendConfig));
return new org.eclipse.rdf4j.repository.config.RepositoryConfig(repositoryId, repositoryTypeSpec);
}
use of org.eclipse.rdf4j.sail.config.SailImplConfig in project Commons by denkbares.
the class SpinRdfConfig method createRepositoryConfig.
@Override
public org.eclipse.rdf4j.repository.config.RepositoryConfig createRepositoryConfig(String repositoryId, String repositoryLabel, Map<String, String> overrides) throws RepositoryConfigException {
SailImplConfig spinSailConfig = new SpinSailConfig(new MemoryStoreConfig());
RepositoryImplConfig repositoryTypeSpec = new SailRepositoryConfig(spinSailConfig);
return new org.eclipse.rdf4j.repository.config.RepositoryConfig(repositoryId, repositoryTypeSpec);
}
Aggregations