Skip to content

Commit

Permalink
Cleanup commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanpadams committed Nov 17, 2024
1 parent 3427837 commit 56ab24a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
15 changes: 0 additions & 15 deletions src/main/java/gov/nasa/pds/dsview/registry/PDS3Search.java
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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<String, Object> entry : doc.entrySet()) {
log.fine("Key = " + entry.getKey()
Expand All @@ -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\"");
Expand Down Expand Up @@ -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\"");
Expand All @@ -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<String, Object> entry : doc.entrySet()) {
log.fine("Key = " + entry.getKey()
Expand All @@ -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\"");
Expand All @@ -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<String, Object> entry : doc.entrySet()) {
log.fine("Key = " + entry.getKey()
Expand All @@ -253,7 +242,6 @@ public List<SolrDocument> 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\"");
Expand Down Expand Up @@ -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<String, Object> entry : doc.entrySet()) {
log.fine("Key = " + entry.getKey()
Expand Down Expand Up @@ -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,
Expand All @@ -395,7 +381,6 @@ public SolrDocument getResource(String identifier) throws SolrServerException, I
Iterator<SolrDocument> itr = solrResults.iterator();
SolrDocument doc = null;
int idx = 0;
//List<SolrDocument> instDocs = new ArrayList<SolrDocument>();
while (itr.hasNext()) {
doc = itr.next();
log.fine("***************** idx = " + (idx++));
Expand Down
10 changes: 0 additions & 10 deletions src/main/java/gov/nasa/pds/dsview/registry/PDS4Search.java
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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<String, Object> entry : doc.entrySet()) {
log.fine("Key = " + entry.getKey()
Expand All @@ -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,
Expand All @@ -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<String, Object> entry : doc.entrySet()) {
log.fine("Key = " + entry.getKey()
Expand All @@ -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);

Expand Down Expand Up @@ -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 =
Expand Down Expand Up @@ -301,7 +293,6 @@ public Map<String, String> getResourceLinks(List<String> resourceRefList)

for (String resourceRef : resourceRefList) {
params.add("q", "identifier:" + cleanIdentifier(resourceRef));
params.set("indent", "on");
params.set("wt", "xml");

log.info("params = " + params.toString());
Expand All @@ -317,7 +308,6 @@ public Map<String, String> getResourceLinks(List<String> resourceRefList)
while (itr.hasNext()) {
doc = itr.next();
log.fine("***************** idx = " + (idx++));
// log.info(doc.toString());

String resourceName = "";
String resourceURL = "";
Expand Down

0 comments on commit 56ab24a

Please sign in to comment.