Class CollectionInventoryWriter

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

public class CollectionInventoryWriter extends Object

Process inventory files of "Product_Collection" products (PDS4 label files)

Parse collection inventory file, e.g., "document_collection_inventory.csv", extract primary and secondary references (lidvids) and write extracted data into a JSON or XML file. JSON files can be imported into Elasticsearch by Registry Manager tool.

This class also uses "RefsCache" singleton to cache product ids (lidvids).

Author:
karpenko
  • Field Details

    • log

      protected org.apache.logging.log4j.Logger log
  • Constructor Details

  • Method Details

    • writeCollectionInventory

      public void writeCollectionInventory(String collectionLidVid, File inventoryFile, String jobId) throws Exception
      Parse collection inventory file, e.g., "document_collection_inventory.csv", extract primary and secondary references (lidvids) and write extracted data into a JSON or XML file. JSON files can be imported into Elasticsearch by Registry Manager tool.
      Parameters:
      collectionLidVid - Collection LIDVID
      inventoryFile - Collection inventory file, e.g., "document_collection_inventory.csv"
      jobId - Harvest job id
      Throws:
      Exception - Generic exception