org.modeshape.jcr.RepositoryConfiguration.getIndexProviders()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(101)

本文整理了Java中org.modeshape.jcr.RepositoryConfiguration.getIndexProviders方法的一些代码示例,展示了RepositoryConfiguration.getIndexProviders的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RepositoryConfiguration.getIndexProviders方法的具体详情如下:
包路径:org.modeshape.jcr.RepositoryConfiguration
类名称:RepositoryConfiguration
方法名:getIndexProviders

RepositoryConfiguration.getIndexProviders介绍

[英]Get the ordered list of index providers defined in the configuration.
[中]获取配置中定义的索引提供程序的有序列表。

代码示例

代码示例来源:origin: org.fcrepo/modeshape-jcr

protected boolean hasIndexProvider( String name ) {
  for (Component component : getIndexProviders()) {
    if (component.getName().equals(name)) return true;
  }
  return false;
}

代码示例来源:origin: ModeShape/modeshape

protected boolean hasIndexProvider( String name ) {
  for (Component component : getIndexProviders()) {
    if (component.getName().equals(name)) return true;
  }
  return false;
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

RepositoryIndexManager( JcrRepository.RunningState repository,
            RepositoryConfiguration config ) {
  this.repository = repository;
  this.config = config;
  this.context = repository.context();
  this.systemWorkspaceName = this.repository.repositoryCache().getSystemWorkspaceName();
  PathFactory pathFactory = this.context.getValueFactories().getPathFactory();
  this.indexesPath = pathFactory.createAbsolutePath(JcrLexicon.SYSTEM, ModeShapeLexicon.INDEXES);
  // Set up the index providers ...
  this.components = config.getIndexProviders();
  for (Component component : components) {
    try {
      IndexProvider provider = component.createInstance();
      register(provider);
    } catch (Throwable t) {
      if (t.getCause() != null) {
        t = t.getCause();
      }
      this.repository.error(t, JcrI18n.unableToInitializeIndexProvider, component, repository.name(), t.getMessage());
    }
  }
}

代码示例来源:origin: ModeShape/modeshape

RepositoryIndexManager( JcrRepository.RunningState repository,
            RepositoryConfiguration config ) {
  this.repository = repository;
  this.config = config;
  this.context = repository.context();
  this.systemWorkspaceName = this.repository.repositoryCache().getSystemWorkspaceName();
  PathFactory pathFactory = this.context.getValueFactories().getPathFactory();
  this.indexesPath = pathFactory.createAbsolutePath(JcrLexicon.SYSTEM, ModeShapeLexicon.INDEXES);
  // Set up the index providers ...
  this.components = config.getIndexProviders();
  for (Component component : components) {
    try {
      IndexProvider provider = component.createInstance();
      register(provider);
    } catch (Throwable t) {
      if (t.getCause() != null) {
        t = t.getCause();
      }
      this.repository.error(t, JcrI18n.unableToInitializeIndexProvider, component, repository.name(), t.getMessage());
    }
  }
}

代码示例来源:origin: org.fcrepo/modeshape-jcr

if (queryEngine == null) {
  QueryEngineBuilder builder = null;
  if (!repoConfig.getIndexProviders().isEmpty()) {

代码示例来源:origin: ModeShape/modeshape

if (queryEngine == null) {
  QueryEngineBuilder builder = null;
  if (!repoConfig.getIndexProviders().isEmpty()) {

代码示例来源:origin: ModeShape/modeshape

@FixFor( "MODE-2160" )
@Test
public void shouldAlwaysReturnNonNullIndexProvidersList() {
  RepositoryConfiguration config = new RepositoryConfiguration("repoName");
  assertThat(config.getIndexProviders(), is(notNullValue()));
}

相关文章

微信公众号

最新文章

更多