Class Pds2EsDataTypeMap

java.lang.Object
gov.nasa.pds.registry.common.dd.Pds2EsDataTypeMap

public class Pds2EsDataTypeMap extends Object
Mappings between PDS LDD data types such as 'ASCII_LID' and Elasticsearch data types such as 'keyword'.

Mappings are loaded from a configuration file similar to Java properties file. There is one mapping per line:

<PDS LDD data type>=<Elasticsearch data type>

Default configuration file is in <PROJECT_ROOT>/src/main/resources/elastic/data-dic-types.cfg

Author:
karpenko
  • Constructor Details

    • Pds2EsDataTypeMap

      public Pds2EsDataTypeMap()
      Constructor
  • Method Details

    • getEsDataType

      public String getEsDataType(String pdsType) throws DataTypeNotFoundException
      Get Elasticsearch data type for a PDS LDD data type
      Parameters:
      pdsType - PDS LDD data type
      Returns:
      Elasticsearch data type
      Throws:
      DataTypeNotFoundException
    • load

      public void load(File file) throws Exception
      Load data type mappings from a configuration file
      Parameters:
      file - Configuration file with PDS LDD to Elasticsearch data type mappings.

      Mappings are loaded from a configuration file similar to Java properties file. There is one mapping per line:

      <PDS LDD data type>=<Elasticsearch data type>

      Throws:
      Exception - an exception
    • debug

      public void debug()
      Print all mappings