Package de.pangaea.metadataportal.config

## Class TargetIndexConfig

- java.lang.Object
- - de.pangaea.metadataportal.config.TargetIndexConfig

-     public final class TargetIndexConfig
      extends Object

  Configuration of an index in Elasticsearch.
  Author:
    Uwe Schindler

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `Map<String,​String>` | `aliases` |
    `Properties` | `globalHarvesterProperties` |
    `Map<String,​HarvesterConfig>` | `harvesters` |
    `String` | `indexName` |
    `org.elasticsearch.common.settings.Settings` | `indexSettings` |
    `Config` | `root` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TargetIndexConfig​(Config root, String name)` | Default constructor

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addAlias​(String name, String filter)` | Adds alias to index.
    `void` | `addGlobalHarvesterProperty​(String value)` | Deprecated.
    `void` | `addHarvester​(HarvesterConfig i)` | Adds harvester.
    `void` | `check()` | Checks, if configuration is ok.
    `String` | `getRawIndexName​(boolean alternate)` |
    `void` | `setIndexSettings​(org.elasticsearch.common.settings.Settings.Builder bld)` | Deprecated.
    `void` | `setNameSuffix1​(String nameSuffix1)` |
    `void` | `setNameSuffix2​(String nameSuffix2)` |

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

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

- - ### Field Detail

    - #### indexName

          public final String indexName

    - #### root

          public final Config root

    - #### globalHarvesterProperties

          public final Properties globalHarvesterProperties

    - #### harvesters

          public final Map<String,​HarvesterConfig> harvesters

    - #### aliases

          public final Map<String,​String> aliases

    - #### indexSettings

          public org.elasticsearch.common.settings.Settings indexSettings

  - ### Constructor Detail

    - #### TargetIndexConfig

          public TargetIndexConfig​(Config root,
                                   String name)

      Default constructor

  - ### Method Detail

    - #### addGlobalHarvesterProperty

          @PublicForDigesterUse
          @Deprecated
          public void addGlobalHarvesterProperty​(String value)

      Deprecated.
      Adds property for harvester (called from Digester on config load).

    - #### addHarvester

          public void addHarvester​(HarvesterConfig i)

      Adds harvester.

    - #### addAlias

          public void addAlias​(String name,
                               String filter)
                        throws IOException

      Adds alias to index.
      Throws:
        `IOException`

    - #### setIndexSettings

          @PublicForDigesterUse
          @Deprecated
          public void setIndexSettings​(org.elasticsearch.common.settings.Settings.Builder bld)

      Deprecated.

    - #### setNameSuffix1

          public void setNameSuffix1​(String nameSuffix1)

    - #### setNameSuffix2

          public void setNameSuffix2​(String nameSuffix2)

    - #### check

          public void check()
                     throws Exception

      Checks, if configuration is ok. After calling this, you are not able to change anything in this instance.
      Throws:
        `Exception`

    - #### getRawIndexName

          public String getRawIndexName​(boolean alternate)