From d55a7499cd78a89aec302440e62d7b75f61a38d4 Mon Sep 17 00:00:00 2001 From: al-niessner <1130658+al-niessner@users.noreply.github.com> Date: Tue, 8 Oct 2024 08:09:29 -0700 Subject: [PATCH] node name issues (#188) * correct typo in name * update table for node names * Update ConfigManager.java cut and pasted the string in there for ya --------- Co-authored-by: Al Niessner --- .../nasa/pds/harvest/cfg/ConfigManager.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/gov/nasa/pds/harvest/cfg/ConfigManager.java b/src/main/java/gov/nasa/pds/harvest/cfg/ConfigManager.java index 59a5b2b2..9591bbba 100644 --- a/src/main/java/gov/nasa/pds/harvest/cfg/ConfigManager.java +++ b/src/main/java/gov/nasa/pds/harvest/cfg/ConfigManager.java @@ -20,17 +20,18 @@ public class ConfigManager { private static HashMap indexNodeMap = new HashMap(); static { - indexNodeMap.put("pds-atm-registry", "PDS_ATM"); - indexNodeMap.put("pds-eng-registry", "PDS_ENG"); - indexNodeMap.put("pds-geo-registry", "PDS_GEO"); - indexNodeMap.put("pds-img-registry", "PDS_IMG"); - indexNodeMap.put("pds-naif-registry", "PDS_NAIF"); - indexNodeMap.put("pds-ppi-registry", "PDS_PPI"); - indexNodeMap.put("pds-rms-registry", "PDS_RMS"); - indexNodeMap.put("pds-sbn-registry", "pds_SBN"); + indexNodeMap.put("atm-registry", "PDS_ATM"); + indexNodeMap.put("en-registry", "PDS_ENG"); + indexNodeMap.put("geo-registry", "PDS_GEO"); + indexNodeMap.put("img-registry", "PDS_IMG"); + indexNodeMap.put("naif-registry", "PDS_NAIF"); + indexNodeMap.put("ppi-registry", "PDS_PPI"); + indexNodeMap.put("rms-registry", "PDS_RMS"); + indexNodeMap.put("sbnpsi-registry", "PDS_SBN"); + indexNodeMap.put("sbnumd-registry", "PDS_SBN"); indexNodeMap.put("psa-registry", "PSA"); indexNodeMap.put("jaxa-registry", "JAXA"); - indexNodeMap.put("roscosmos", "ROSCOSMOS"); + indexNodeMap.put("dev-registry", "PDS_ENG_DEV"); } static public List exchangeFileRef (List xml2beans) { ArrayList beans = new ArrayList(); @@ -59,8 +60,7 @@ static public List exchangeLidvids (List ids) { } static public String exchangeIndexForNode (String indexName) { if (indexNodeMap.containsKey (indexName)) return indexNodeMap.get(indexName); - if (0 < indexName.indexOf("-registry")) return indexName.substring(0, indexName.indexOf("-registry")); - return "development"; + throw new IllegalArgumentException("Index (" + indexName + ") + not supported: either fix it in your configuration by using one of the supported or request an upgrade of harvest to support your new index by submitting a ticket on https://github.com/NASA-PDS/harvest/issues"); } static public ConnectionFactory exchangeRegistry (RegistryType xml) throws Exception { return EstablishConnectionFactory.from (xml.getValue(), xml.getAuth());