Class JsonLddLoader

java.lang.Object
gov.nasa.pds.registry.common.es.service.JsonLddLoader

public class JsonLddLoader extends Object
Loads PDS LDD JSON file into Elasticsearch data dictionary index
Author:
karpenko
  • Constructor Details

    • JsonLddLoader

      public JsonLddLoader(DataDictionaryDao dao, ConnectionFactory conFact) throws Exception
      Constructor
      Parameters:
      dao - Data dictionary data access object
      conFact - instance of class gov.nasa.pds.registry.common.ConnectionFactory
      Throws:
      Exception - an exception
  • Method Details

    • loadPds2EsDataTypeMap

      public void loadPds2EsDataTypeMap(File file) throws Exception
      Load PDS to Elasticsearch data type map
      Parameters:
      file - configuration file
      Throws:
      Exception - an exception
    • load

      public void load(File lddFile, String namespace) throws Exception
      Load PDS LDD JSON file into Elasticsearch data dictionary index
      Parameters:
      lddFile - PDS LDD JSON file
      namespace - Namespace filter. Only load classes having this namespace.
      Throws:
      Exception - an exception
    • load

      public void load(File lddFile, String lddFileName, String namespace) throws Exception
      Load PDS LDD JSON file into Elasticsearch data dictionary index
      Parameters:
      lddFile - PDS LDD JSON file
      lddFileName - file name to store in Elasticsearch (could be different from lddFile). lddFile could point to a temporary file loaded from the Internet.
      namespace - Namespace filter. Only load classes having this namespace.
      Throws:
      Exception - an exception
    • loadOnly

      public void loadOnly(File lddFile, String lddFileName, String namespace, Instant lastDate) throws Exception
      Load PDS LDD JSON file into Elasticsearch data dictionary index. Do not validate parameters. This is a low level method called by other classes / methods.
      Parameters:
      lddFile - PDS LDD JSON file
      lddFileName - file name to store in Elasticsearch (could be different from lddFile). lddFile could point to a temporary file loaded from the Internet.
      namespace - Namespace filter. Only load classes having this namespace.
      lastDate - last date of an LDD for given namespace already loaded into registry
      Throws:
      Exception - an exception