org.hibernate.search.analyzer.definition.impl

## Class SimpleLuceneAnalysisDefinitionRegistry

- java.lang.Object
- - org.hibernate.search.analyzer.definition.impl.SimpleLuceneAnalysisDefinitionRegistry

- All Implemented Interfaces:
    LuceneAnalysisDefinitionRegistry

      public class SimpleLuceneAnalysisDefinitionRegistry
      extends Object
      implements LuceneAnalysisDefinitionRegistry

  A simple implementation of `LuceneAnalysisDefinitionRegistry`.

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

  Author:
    Yoann Rodiere

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleLuceneAnalysisDefinitionRegistry()`
    `SimpleLuceneAnalysisDefinitionRegistry(Map<String,AnalyzerDef> analyzerDefinitions, Map<String,NormalizerDef> normalizerDefinitions)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AnalyzerDef` | `getAnalyzerDefinition(String name)`
    `Map<String,AnalyzerDef>` | `getAnalyzerDefinitions()`
    `NormalizerDef` | `getNormalizerDefinition(String name)`
    `Map<String,NormalizerDef>` | `getNormalizerDefinitions()`
    `void` | `register(String name, AnalyzerDef definition)` Register an analyzer definition.
    `void` | `register(String name, NormalizerDef definition)` Register a normalizer definition.

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

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

- - ### Constructor Detail

    - #### SimpleLuceneAnalysisDefinitionRegistry

          public SimpleLuceneAnalysisDefinitionRegistry()

    - #### SimpleLuceneAnalysisDefinitionRegistry

          public SimpleLuceneAnalysisDefinitionRegistry(Map<String,AnalyzerDef> analyzerDefinitions,
                                                        Map<String,NormalizerDef> normalizerDefinitions)

  - ### Method Detail

    - #### register

          public void register(String name,
                               AnalyzerDef definition)

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

    - #### register

          public void register(String name,
                               NormalizerDef definition)

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

    - #### getAnalyzerDefinition

          public AnalyzerDef getAnalyzerDefinition(String name)

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

    - #### getNormalizerDefinition

          public NormalizerDef getNormalizerDefinition(String name)

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

    - #### getAnalyzerDefinitions

          public Map<String,AnalyzerDef> getAnalyzerDefinitions()

    - #### getNormalizerDefinitions

          public Map<String,NormalizerDef> getNormalizerDefinitions()

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