org.hibernate.search.elasticsearch.analyzer.definition.impl

## Class SimpleElasticsearchAnalysisDefinitionRegistry

- java.lang.Object
- - org.hibernate.search.elasticsearch.analyzer.definition.impl.SimpleElasticsearchAnalysisDefinitionRegistry

- All Implemented Interfaces:
    ElasticsearchAnalysisDefinitionRegistry

      public class SimpleElasticsearchAnalysisDefinitionRegistry
      extends Object
      implements ElasticsearchAnalysisDefinitionRegistry

  A simple implementation of `ElasticsearchAnalysisDefinitionRegistry`.

  This class also provides access to the full mapping from names to definitions (see `getAnalyzerDefinitions()` for instance)

  Author:
    Yoann Rodiere

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected Map<String,AnalyzerDefinition>` | `analyzerDefinitions`
    `protected Map<String,NormalizerDefinition>` | `normalizerDefinitions`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleElasticsearchAnalysisDefinitionRegistry()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AnalyzerDefinition` | `getAnalyzerDefinition(String name)`
    `Map<String,AnalyzerDefinition>` | `getAnalyzerDefinitions()`
    `CharFilterDefinition` | `getCharFilterDefinition(String name)`
    `Map<String,CharFilterDefinition>` | `getCharFilterDefinitions()`
    `NormalizerDefinition` | `getNormalizerDefinition(String name)`
    `Map<String,NormalizerDefinition>` | `getNormalizerDefinitions()`
    `TokenFilterDefinition` | `getTokenFilterDefinition(String name)`
    `Map<String,TokenFilterDefinition>` | `getTokenFilterDefinitions()`
    `TokenizerDefinition` | `getTokenizerDefinition(String name)`
    `Map<String,TokenizerDefinition>` | `getTokenizerDefinitions()`
    `void` | `register(String name, AnalyzerDefinition definition)` Register an analyzer definition.
    `void` | `register(String name, CharFilterDefinition definition)` Register a char filter definition.
    `void` | `register(String name, NormalizerDefinition definition)` Register a normalizer definition.
    `void` | `register(String name, TokenFilterDefinition definition)` Register a token filter definition.
    `void` | `register(String name, TokenizerDefinition definition)` Register a tokenizer definition.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### analyzerDefinitions

          protected final Map<String,AnalyzerDefinition> analyzerDefinitions

    - #### normalizerDefinitions

          protected final Map<String,NormalizerDefinition> normalizerDefinitions

  - ### Constructor Detail

    - #### SimpleElasticsearchAnalysisDefinitionRegistry

          public SimpleElasticsearchAnalysisDefinitionRegistry()

  - ### Method Detail

    - #### register

          public void register(String name,
                               AnalyzerDefinition definition)

      Description copied from interface: `ElasticsearchAnalysisDefinitionRegistry`
      Register an analyzer definition.
      Specified by:
        `register` in interface `ElasticsearchAnalysisDefinitionRegistry`
      Parameters:
        `name` - The name of the definition to be registered.
        `definition` - The definition to be registered.

    - #### register

          public void register(String name,
                               NormalizerDefinition definition)

      Description copied from interface: `ElasticsearchAnalysisDefinitionRegistry`
      Register a normalizer definition.
      Specified by:
        `register` in interface `ElasticsearchAnalysisDefinitionRegistry`
      Parameters:
        `name` - The name of the definition to be registered.
        `definition` - The definition to be registered.

    - #### register

          public void register(String name,
                               TokenizerDefinition definition)

      Description copied from interface: `ElasticsearchAnalysisDefinitionRegistry`
      Register a tokenizer definition.
      Specified by:
        `register` in interface `ElasticsearchAnalysisDefinitionRegistry`
      Parameters:
        `name` - The name of the definition to be registered.
        `definition` - The definition to be registered.

    - #### register

          public void register(String name,
                               TokenFilterDefinition definition)

      Description copied from interface: `ElasticsearchAnalysisDefinitionRegistry`
      Register a token filter definition.
      Specified by:
        `register` in interface `ElasticsearchAnalysisDefinitionRegistry`
      Parameters:
        `name` - The name of the definition to be registered.
        `definition` - The definition to be registered.

    - #### register

          public void register(String name,
                               CharFilterDefinition definition)

      Description copied from interface: `ElasticsearchAnalysisDefinitionRegistry`
      Register a char filter definition.
      Specified by:
        `register` in interface `ElasticsearchAnalysisDefinitionRegistry`
      Parameters:
        `name` - The name of the definition to be registered.
        `definition` - The definition to be registered.

    - #### getAnalyzerDefinition

          public AnalyzerDefinition getAnalyzerDefinition(String name)

      Specified by:
        `getAnalyzerDefinition` in interface `ElasticsearchAnalysisDefinitionRegistry`
      Parameters:
        `name` - An analyzer name
      Returns:
        The analyzer definition associated with the given name, or `null` if there isn't any.

    - #### getNormalizerDefinition

          public NormalizerDefinition getNormalizerDefinition(String name)

      Specified by:
        `getNormalizerDefinition` in interface `ElasticsearchAnalysisDefinitionRegistry`
      Parameters:
        `name` - A normalizer name
      Returns:
        The normalizer definition associated with the given name, or `null` if there isn't any.

    - #### getTokenizerDefinition

          public TokenizerDefinition getTokenizerDefinition(String name)

      Specified by:
        `getTokenizerDefinition` in interface `ElasticsearchAnalysisDefinitionRegistry`
      Parameters:
        `name` - A tokenizer name
      Returns:
        The tokenizer definition associated with the given name, or `null` if there isn't any.

    - #### getTokenFilterDefinition

          public TokenFilterDefinition getTokenFilterDefinition(String name)

      Specified by:
        `getTokenFilterDefinition` in interface `ElasticsearchAnalysisDefinitionRegistry`
      Parameters:
        `name` - A token filter name
      Returns:
        The token filter definition associated with the given name, or `null` if there isn't any.

    - #### getCharFilterDefinition

          public CharFilterDefinition getCharFilterDefinition(String name)

      Specified by:
        `getCharFilterDefinition` in interface `ElasticsearchAnalysisDefinitionRegistry`
      Parameters:
        `name` - A char filter name
      Returns:
        The char filter definition associated with the given name, or `null` if there isn't any.

    - #### getAnalyzerDefinitions

          public Map<String,AnalyzerDefinition> getAnalyzerDefinitions()

    - #### getNormalizerDefinitions

          public Map<String,NormalizerDefinition> getNormalizerDefinitions()

    - #### getTokenizerDefinitions

          public Map<String,TokenizerDefinition> getTokenizerDefinitions()

    - #### getTokenFilterDefinitions

          public Map<String,TokenFilterDefinition> getTokenFilterDefinitions()

    - #### getCharFilterDefinitions

          public Map<String,CharFilterDefinition> getCharFilterDefinitions()

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved