From 56ab24a25571d4f4e538648ec8b4bb0495180142 Mon Sep 17 00:00:00 2001 From: Jordan Padams Date: Sun, 17 Nov 2024 10:24:22 -0800 Subject: [PATCH] Cleanup commented out code --- .../gov/nasa/pds/dsview/registry/PDS3Search.java | 15 --------------- .../gov/nasa/pds/dsview/registry/PDS4Search.java | 10 ---------- 2 files changed, 25 deletions(-) diff --git a/src/main/java/gov/nasa/pds/dsview/registry/PDS3Search.java b/src/main/java/gov/nasa/pds/dsview/registry/PDS3Search.java index 2f08a828d..a3e905b33 100644 --- a/src/main/java/gov/nasa/pds/dsview/registry/PDS3Search.java +++ b/src/main/java/gov/nasa/pds/dsview/registry/PDS3Search.java @@ -68,10 +68,7 @@ public SolrDocumentList getDataSetList() throws SolrServerException, IOException params.add("q", "pds_model_version:pds3"); params.set("indent", "on"); params.set("wt", "xml"); - //facet_object_type:"1,product_data_set_pds3" params.set("fq", "facet_type:\"1,data_set\""); - - //params.set("start", start); log.info("params = " + params.toString()); QueryResponse response = solr.query(params, @@ -88,7 +85,6 @@ public SolrDocumentList getDataSetList() throws SolrServerException, IOException while (itr.hasNext()) { SolrDocument doc = itr.next(); log.fine("***************** idx = " + (idx++)); - // log.info(doc.toString()); for (Map.Entry entry : doc.entrySet()) { log.fine("Key = " + entry.getKey() @@ -110,8 +106,6 @@ public SolrDocument getDataSet(String identifier) throws SolrServerException, IO ModifiableSolrParams params = new ModifiableSolrParams(); params.add("q", "pds_model_version:pds3 AND data_set_id:\""+identifier+"\""); - // use this with lid construction from *.jsp page - //params.add("q", "identifier:"+identifier); params.set("indent", "on"); params.set("wt", "xml"); params.set("fq", "facet_type:\"1,data_set\""); @@ -166,7 +160,6 @@ public SolrDocument getMission(String identifier) throws SolrServerException, IO ModifiableSolrParams params = new ModifiableSolrParams(); params.add("q", "pds_model_version:pds3 AND investigation_name:\""+identifier+"\""); - //params.add("q", "pds_model_version:pds3 AND identifier:"+identifier); params.set("indent", "on"); params.set("wt", "xml"); params.set("fq", "facet_type:\"1,investigation\""); @@ -185,7 +178,6 @@ public SolrDocument getMission(String identifier) throws SolrServerException, IO while (itr.hasNext()) { doc = itr.next(); log.fine("***************** idx = " + (idx++)); - // log.info(doc.toString()); for (Map.Entry entry : doc.entrySet()) { log.fine("Key = " + entry.getKey() @@ -209,8 +201,6 @@ public SolrDocument getInstHost(String identifier) throws SolrServerException, I ModifiableSolrParams params = new ModifiableSolrParams(); params.add("q", "pds_model_version:pds3 AND instrument_host_id:\""+identifier+"\""); - //params.add("q", "data_product_type:instrument_host AND pds_model_version:pds3 AND instrument_host_id:\""+identifier+"\""); - //params.add("q", "identifier:"+identifier); params.set("indent", "on"); params.set("wt", "xml"); params.set("fq", "facet_type:\"1,instrument_host\""); @@ -229,7 +219,6 @@ public SolrDocument getInstHost(String identifier) throws SolrServerException, I while (itr.hasNext()) { doc = itr.next(); log.fine("***************** idx = " + (idx++)); - // log.info(doc.toString()); for (Map.Entry entry : doc.entrySet()) { log.fine("Key = " + entry.getKey() @@ -253,7 +242,6 @@ public List getInst(String identifier) throws SolrServerException, ModifiableSolrParams params = new ModifiableSolrParams(); params.add("q", "pds_model_version:pds3 AND instrument_id:\""+identifier+"\""); - //params.add("q", "identifier:"+identifier); params.set("indent", "on"); params.set("wt", "xml"); params.set("fq", "facet_type:\"1,instrument\""); @@ -355,7 +343,6 @@ public SolrDocument getTarget(String identifier) throws SolrServerException, IOE while (itr.hasNext()) { doc = itr.next(); log.fine("***************** idx = " + (idx++)); - // log.info(doc.toString()); for (Map.Entry entry : doc.entrySet()) { log.fine("Key = " + entry.getKey() @@ -383,7 +370,6 @@ public SolrDocument getResource(String identifier) throws SolrServerException, I params.add("q", "identifier:\""+identifier+"\""); params.set("indent", "on"); params.set("wt", "xml"); - //params.set("fq", "facet_type:\"1,resource\""); log.info("params = " + params.toString()); QueryResponse response = solr.query(params, @@ -395,7 +381,6 @@ public SolrDocument getResource(String identifier) throws SolrServerException, I Iterator itr = solrResults.iterator(); SolrDocument doc = null; int idx = 0; - //List instDocs = new ArrayList(); while (itr.hasNext()) { doc = itr.next(); log.fine("***************** idx = " + (idx++)); diff --git a/src/main/java/gov/nasa/pds/dsview/registry/PDS4Search.java b/src/main/java/gov/nasa/pds/dsview/registry/PDS4Search.java index 9894fa12a..d02b6dded 100644 --- a/src/main/java/gov/nasa/pds/dsview/registry/PDS4Search.java +++ b/src/main/java/gov/nasa/pds/dsview/registry/PDS4Search.java @@ -69,7 +69,6 @@ public SolrDocumentList getCollections() throws SolrServerException, IOException params.add("q", "*"); params.set("wt", "xml"); - //params.set("fq", "facet_object_type:\"1,product_collection\""); params.set("fq", "facet_type:\"1,collection\""); log.fine("params = " + params.toString()); @@ -87,7 +86,6 @@ public SolrDocumentList getCollections() throws SolrServerException, IOException while (itr.hasNext()) { SolrDocument doc = itr.next(); log.fine("***************** idx = " + (idx++)); - // log.info(doc.toString()); for (Map.Entry entry : doc.entrySet()) { log.fine("Key = " + entry.getKey() @@ -110,9 +108,7 @@ public SolrDocumentList getBundles() throws SolrServerException, IOException { params.add("q", "*"); params.set("wt", "xml"); - //params.set("fq", "facet_object_type:\"1,product_bundle\""); params.set("fq", "facet_type:\"1,bundle\""); - //params.set("start", start); log.fine("params = " + params.toString()); QueryResponse response = solr.query(params, @@ -126,7 +122,6 @@ public SolrDocumentList getBundles() throws SolrServerException, IOException { while (itr.hasNext()) { SolrDocument doc = itr.next(); log.fine("***************** idx = " + (idx++)); - // log.info(doc.toString()); for (Map.Entry entry : doc.entrySet()) { log.fine("Key = " + entry.getKey() @@ -148,7 +143,6 @@ public SolrDocumentList getObservationals(int start) throws SolrServerException, params.add("q", "*"); params.set("wt", "xml"); - //params.set("fq", "facet_object_type:\"1,product_observational\""); params.set("fq", "facet_type:\"1,observational\""); params.set("start", start); @@ -227,9 +221,7 @@ public SolrDocument getContext(String identifier) throws SolrServerException, IO ModifiableSolrParams params = new ModifiableSolrParams(); params.add("q", "identifier:" + cleanIdentifier(identifier)); - params.set("indent", "on"); params.set("wt", "xml"); - params.set("qt", "archive-filter"); log.fine("params = " + params.toString()); QueryResponse response = @@ -301,7 +293,6 @@ public Map getResourceLinks(List resourceRefList) for (String resourceRef : resourceRefList) { params.add("q", "identifier:" + cleanIdentifier(resourceRef)); - params.set("indent", "on"); params.set("wt", "xml"); log.info("params = " + params.toString()); @@ -317,7 +308,6 @@ public Map getResourceLinks(List resourceRefList) while (itr.hasNext()) { doc = itr.next(); log.fine("***************** idx = " + (idx++)); - // log.info(doc.toString()); String resourceName = ""; String resourceURL = "";