Class CollectionInventoryWriter
java.lang.Object
gov.nasa.pds.registry.common.es.service.CollectionInventoryWriter
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwriteCollectionInventory(String collectionLidVid, File inventoryFile, String jobId) 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.
-
Field Details
-
log
protected org.apache.logging.log4j.Logger log
-
-
Constructor Details
-
CollectionInventoryWriter
Constructor- Throws:
Exception
-
-
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 LIDVIDinventoryFile- Collection inventory file, e.g., "document_collection_inventory.csv"jobId- Harvest job id- Throws:
Exception- Generic exception
-