Package de.pangaea.metadataportal.config

## Class Config

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

-     public final class Config
      extends Object

  Main panFMP configuration class. It loads the configuration from a XML file.
  Author:
    Uwe Schindler

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `String` | `esMapping` |
    `Path` | `esMappingFile` |
    `org.elasticsearch.common.settings.Settings` | `esSettings` |
    `List<org.elasticsearch.common.transport.InetSocketTransportAddress>` | `esTransports` |
    `String` | `fieldnameDatestamp` |
    `String` | `fieldnameSource` |
    `String` | `fieldnameXML` |
    `Map<String,​FieldConfig>` | `fields` |
    `Path` | `file` |
    `FilterConfig.FilterType` | `filterDefault` |
    `List<FilterConfig>` | `filters` |
    `boolean` | `haltOnSchemaError` |
    `Set<String>` | `harvestersAndIndexes` |
    `Schema` | `schema` |
    `Map<String,​TargetIndexConfig>` | `targetIndexes` |
    `String` | `typeName` |
    `boolean` | `validateWithAugmentation` |
    `List<VariableConfig>` | `xPathVariables` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Config​(String file)` |
    `Config​(Path file)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addEsAddress​(String v)` | Deprecated.
    `void` | `addField​(FieldConfig f)` |
    `void` | `addFilter​(FilterConfig f)` |
    `void` | `addTargetIndex​(TargetIndexConfig tic)` |
    `void` | `addVariable​(VariableConfig f)` |
    `Path` | `makePathAbsolute​(String file)` | makes the given local filesystem path absolute and resolve it relative to config directory
    `String` | `makePathAbsolute​(String href, boolean allowURL)` | makes the given local filesystem path or URL absolute and resolve it relative to config directory (if local)
    `void` | `setAugmentation​(String v)` | Deprecated.
    `void` | `setDatestampField​(String name)` | Deprecated.
    `void` | `setEsMappingFile​(String v)` | Deprecated.
    `void` | `setEsSettings​(org.elasticsearch.common.settings.Settings.Builder bld)` | Deprecated.
    `void` | `setFilterDefault​(String v)` | Deprecated.
    `void` | `setHaltOnSchemaError​(String v)` | Deprecated.
    `void` | `setSchema​(String namespace, String url)` |
    `void` | `setSourceField​(String name)` | Deprecated.
    `void` | `setTypeName​(String v)` | Deprecated.
    `void` | `setXMLField​(String name)` | Deprecated.

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

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

- - ### Field Detail

    - #### harvestersAndIndexes

          public final Set<String> harvestersAndIndexes

    - #### targetIndexes

          public final Map<String,​TargetIndexConfig> targetIndexes

    - #### typeName

          public String typeName

    - #### esMappingFile

          public Path esMappingFile

    - #### esMapping

          public String esMapping

    - #### fieldnameXML

          public String fieldnameXML

    - #### fieldnameSource

          public String fieldnameSource

    - #### fieldnameDatestamp

          public String fieldnameDatestamp

    - #### fields

          public final Map<String,​FieldConfig> fields

    - #### filterDefault

          public FilterConfig.FilterType filterDefault

    - #### filters

          public final List<FilterConfig> filters

    - #### xPathVariables

          public final List<VariableConfig> xPathVariables

    - #### schema

          public Schema schema

    - #### haltOnSchemaError

          public boolean haltOnSchemaError

    - #### validateWithAugmentation

          public boolean validateWithAugmentation

    - #### esTransports

          public final List<org.elasticsearch.common.transport.InetSocketTransportAddress> esTransports

    - #### esSettings

          public org.elasticsearch.common.settings.Settings esSettings

    - #### file

          public final Path file

  - ### Constructor Detail

    - #### Config

          public Config​(String file)
                 throws Exception

      Throws:
        `Exception`

    - #### Config

          public Config​(Path file)
                 throws Exception

      Throws:
        `Exception`

  - ### Method Detail

    - #### makePathAbsolute

          public final Path makePathAbsolute​(String file)
                                      throws IOException

      makes the given local filesystem path absolute and resolve it relative to config directory
      Throws:
        `IOException`

    - #### makePathAbsolute

          public String makePathAbsolute​(String href,
                                         boolean allowURL)
                                  throws IOException

      makes the given local filesystem path or URL absolute and resolve it relative to config directory (if local)
      Throws:
        `IOException`

    - #### addField

          public void addField​(FieldConfig f)

    - #### addVariable

          public void addVariable​(VariableConfig f)

    - #### addFilter

          public void addFilter​(FilterConfig f)

    - #### addTargetIndex

          public void addTargetIndex​(TargetIndexConfig tic)

    - #### setXMLField

          @PublicForDigesterUse
          @Deprecated
          public void setXMLField​(String name)

      Deprecated.

    - #### setDatestampField

          @PublicForDigesterUse
          @Deprecated
          public void setDatestampField​(String name)

      Deprecated.

    - #### setSourceField

          @PublicForDigesterUse
          @Deprecated
          public void setSourceField​(String name)

      Deprecated.

    - #### setFilterDefault

          @PublicForDigesterUse
          @Deprecated
          public void setFilterDefault​(String v)

      Deprecated.

    - #### setSchema

          public void setSchema​(String namespace,
                                String url)
                         throws Exception

      Throws:
        `Exception`

    - #### setTypeName

          @PublicForDigesterUse
          @Deprecated
          public void setTypeName​(String v)

      Deprecated.

    - #### setEsMappingFile

          @PublicForDigesterUse
          @Deprecated
          public void setEsMappingFile​(String v)
                                throws IOException

      Deprecated.
      Throws:
        `IOException`

    - #### setHaltOnSchemaError

          @PublicForDigesterUse
          @Deprecated
          public void setHaltOnSchemaError​(String v)

      Deprecated.

    - #### setAugmentation

          @PublicForDigesterUse
          @Deprecated
          public void setAugmentation​(String v)

      Deprecated.

    - #### addEsAddress

          @PublicForDigesterUse
          @Deprecated
          public void addEsAddress​(String v)

      Deprecated.

    - #### setEsSettings

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

      Deprecated.