From edc962966d23a2fbc35ff0c781c18acf7545a1a6 Mon Sep 17 00:00:00 2001 From: Jordan Padams Date: Fri, 18 Oct 2024 19:37:38 -0700 Subject: [PATCH] Updates to support Airborne, Facility, Telescope Resolves #35 --- pom.xml | 2 +- .../nasa/pds/dsview/registry/Constants.java | 40 +- .../nasa/pds/dsview/registry/PDS3Search.java | 66 +- .../nasa/pds/dsview/registry/PDS4Search.java | 7 +- .../dsview/servlets/RegistryQueryServlet.java | 25 +- src/main/webapp/pds/viewContext.jsp | 709 ++++++++++-------- 6 files changed, 509 insertions(+), 340 deletions(-) diff --git a/pom.xml b/pom.xml index 0f605b212..09a9427cc 100644 --- a/pom.xml +++ b/pom.xml @@ -171,7 +171,7 @@ org.apache.solr solr-solrj - 9.6.1 + 9.7.0 javax.servlet diff --git a/src/main/java/gov/nasa/pds/dsview/registry/Constants.java b/src/main/java/gov/nasa/pds/dsview/registry/Constants.java index b530e3317..c14a01b6c 100644 --- a/src/main/java/gov/nasa/pds/dsview/registry/Constants.java +++ b/src/main/java/gov/nasa/pds/dsview/registry/Constants.java @@ -14,8 +14,8 @@ package gov.nasa.pds.dsview.registry; -import java.util.Map; import java.util.LinkedHashMap; +import java.util.Map; /** * Class that holds constants used in ds-view. * @@ -328,4 +328,42 @@ public class Constants { observationalPds4ToSearch.put("TYPE", "data_class"); observationalPds4ToSearch.put("FILE(S)", "file_name"); } + + public static final Map telescopePds4ToRegistry = + new LinkedHashMap(); + static { + telescopePds4ToRegistry.put("IDENTIFIER", "identifier"); + telescopePds4ToRegistry.put("NAME", "title"); + telescopePds4ToRegistry.put("DESCRIPTION", "description"); + telescopePds4ToRegistry.put("FACILITY", "facility_ref"); + telescopePds4ToRegistry.put("APERTURE", "telescope_aperture"); + telescopePds4ToRegistry.put("LONGITUDE", "telescope_longitude"); + telescopePds4ToRegistry.put("LATITUDE", "telescope_latitude"); + telescopePds4ToRegistry.put("ALTITUDE", "telescope_altitude"); + telescopePds4ToRegistry.put("COORIDINATE SOURCE", "telescope_coordinate_source"); + telescopePds4ToRegistry.put("INVESTIGATION(S)", "investigation_ref"); + telescopePds4ToRegistry.put("INSTRUMENT(S)", "instrument_ref"); + } + + public static final Map facilityPds4ToRegistry = + new LinkedHashMap(); + static { + facilityPds4ToRegistry.put("IDENTIFIER", "identifier"); + facilityPds4ToRegistry.put("NAME", "title"); + facilityPds4ToRegistry.put("TYPE", "facility_type"); + facilityPds4ToRegistry.put("DESCRIPTION", "description"); + facilityPds4ToRegistry.put("ADDRESS", "facility_address"); + facilityPds4ToRegistry.put("COUNTRY", "facility_country"); + facilityPds4ToRegistry.put("INVESTIGATION(S)", "investigation_ref"); + facilityPds4ToRegistry.put("TELESCOPE(S)", "telescope_ref"); + } + + public static final Map airbornePds4ToRegistry = + new LinkedHashMap(); + static { + airbornePds4ToRegistry.put("IDENTIFIER", "identifier"); + airbornePds4ToRegistry.put("NAME", "title"); + airbornePds4ToRegistry.put("TYPE", "airborne_type"); + airbornePds4ToRegistry.put("DESCRIPTION", "description"); + } } 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 17b892ff9..b2986605b 100644 --- a/src/main/java/gov/nasa/pds/dsview/registry/PDS3Search.java +++ b/src/main/java/gov/nasa/pds/dsview/registry/PDS3Search.java @@ -306,7 +306,7 @@ public SolrDocument getInst(String instId, String instHostId) throws SolrServerE org.apache.solr.client.solrj.SolrRequest.METHOD.GET); SolrDocumentList solrResults = response.getResults(); - log.info("numFound = " + solrResults.getNumFound()); + log.fine("numFound = " + solrResults.getNumFound()); Iterator itr = solrResults.iterator(); SolrDocument doc = null; @@ -341,7 +341,7 @@ public SolrDocument getTarget(String identifier) throws SolrServerException, IOE params.set("wt", "xml"); params.set("fq", "facet_type:\"1,target\""); - log.info("params = " + params.toString()); + log.info("params = " + params.toString()); QueryResponse response = solr.query(params, org.apache.solr.client.solrj.SolrRequest.METHOD.GET); @@ -446,34 +446,40 @@ public String getDoi(String identifier) throws IOException, JSONException { log.info("getDOI(" + identifier + ")"); URL url = new URL(DOI_SERVER_URL + "?ids=" + URLEncoder.encode(identifier, "UTF-8")); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); - conn.setRequestMethod("GET"); - conn.setConnectTimeout(5000); - conn.setReadTimeout(5000); - - int responseCode = conn.getResponseCode(); - if (responseCode == 200) { - BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); - String line; - StringBuffer response = new StringBuffer(); - while ((line = br.readLine()) != null) { - response.append(line); - } - br.close(); - - JSONArray jsonArray = new JSONArray(response.toString()); - log.info("DOI Service response = " + jsonArray.toString(2)); - if (jsonArray.length() == 0) { - return null; - } else if (jsonArray.length() == 1) { - JSONObject jsonResponse = jsonArray.getJSONObject(0); - String doi = jsonResponse.getString("doi"); - return "" + doi + ""; - } else { - return "Multiple DOIs found. Use DOI Search to select the most appropriate."; - } - } else { - return null; + HttpURLConnection conn = null; + try { + conn = (HttpURLConnection) url.openConnection(); + conn.setRequestMethod("GET"); + conn.setConnectTimeout(5000); + conn.setReadTimeout(5000); + + int responseCode = conn.getResponseCode(); + if (responseCode == 200) { + BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())); + String line; + StringBuffer response = new StringBuffer(); + while ((line = br.readLine()) != null) { + response.append(line); + } + br.close(); + + JSONArray jsonArray = new JSONArray(response.toString()); + log.info("DOI Service response = " + jsonArray.toString(2)); + if (jsonArray.length() == 0) { + return null; + } else if (jsonArray.length() == 1) { + JSONObject jsonResponse = jsonArray.getJSONObject(0); + String doi = jsonResponse.getString("doi"); + return "" + doi + ""; + } else { + return "Multiple DOIs found. Use DOI Search to select the most appropriate."; + } + } else { + return null; + } + } finally { + conn.disconnect(); } } 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 9ea4d8c99..9894fa12a 100644 --- a/src/main/java/gov/nasa/pds/dsview/registry/PDS4Search.java +++ b/src/main/java/gov/nasa/pds/dsview/registry/PDS4Search.java @@ -348,7 +348,9 @@ private String getValue(Map.Entry entry) { public JSONArray getDoiResponse(URL url) throws IOException, JSONException { log.fine("getDoiResponse(" + url + ")"); - HttpURLConnection conn = (HttpURLConnection) url.openConnection(); + HttpURLConnection conn = null; + try { + conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); conn.setConnectTimeout(5000); conn.setReadTimeout(5000); @@ -371,6 +373,9 @@ public JSONArray getDoiResponse(URL url) throws IOException, JSONException { log.warning("getDoiResponse's responseCode != 200"); return null; } + } finally { + conn.disconnect(); + } } diff --git a/src/main/java/gov/nasa/pds/dsview/servlets/RegistryQueryServlet.java b/src/main/java/gov/nasa/pds/dsview/servlets/RegistryQueryServlet.java index 20776f95c..787410a93 100644 --- a/src/main/java/gov/nasa/pds/dsview/servlets/RegistryQueryServlet.java +++ b/src/main/java/gov/nasa/pds/dsview/servlets/RegistryQueryServlet.java @@ -57,21 +57,16 @@ public void doIt(HttpServletRequest req, HttpServletResponse res) String queryString = constructKeywordQuery(req); System.out.println("queryString = " + queryString); - /* - res.setContentType("text/html"); - PrintWriter out = res.getWriter(); - out.println(""); - out.println(""); - out.println("Testing RegistryQueryServlet!"); - out.println(""); - out.println(""); - out.println("

Testing RegistryQueyrServlet!

"); - out.println("parameter names = " + req.getParameterMap().toString() + "
"); - //out.println("parameter values = " + req.getParameterValues().toString() + "
"); - //out.println("registryUrl = " + req.getParameterValues("registryUrl")[0]); - out.println(""); - out.println(""); - */ + /* + * res.setContentType("text/html"); PrintWriter out = res.getWriter(); + * out.println(""); out.println(""); + * out.println("Testing RegistryQueryServlet!"); out.println(""); + * out.println(""); out.println("

Testing RegistryQueyrServlet!

"); + * out.println("parameter names = " + req.getParameterMap().toString() + "
"); + * //out.println("parameter values = " + req.getParameterValues().toString() + "
"); + * //out.println("registryUrl = " + req.getParameterValues("registryUrl")[0]); + * out.println(""); out.println(""); + */ req.getSession().setAttribute("queryString", queryString); getServletConfig().getServletContext().getRequestDispatcher ("/pds/results.jsp").forward(req,res); diff --git a/src/main/webapp/pds/viewContext.jsp b/src/main/webapp/pds/viewContext.jsp index 65e41beb5..0ebcfb0c4 100644 --- a/src/main/webapp/pds/viewContext.jsp +++ b/src/main/webapp/pds/viewContext.jsp @@ -13,6 +13,7 @@ isErrorPage="false" contentType="text/html; charset=ISO-8859-1" import="gov.nasa.pds.dsview.registry.PDS4Search, gov.nasa.pds.dsview.registry.Constants, org.apache.solr.common.SolrDocument, org.apache.solr.common.SolrDocumentList, + org.apache.solr.client.solrj.SolrServerException, java.util.*, java.net.*, java.io.*, java.lang.*" %> @@ -31,11 +32,58 @@
- + +<%! + public String insertContextInformation(PDS4Search pds4Search, SolrDocument doc, String tmpValue) throws IOException, SolrServerException { + StringWriter writer = new StringWriter(); + List values = pds4Search.getValues(doc, tmpValue); + String val=""; + if (values != null) { + if (tmpValue.equals("description")){ + val = values.get(0); + //out.println(val); + } + else if (tmpValue.equals("identifier")) { + val = values.get(0); + String version = pds4Search.getValues(doc, "version_id").get(0); + if (version!=null) + val += "::" + version; + // out.println(val); + } // end if (values!=null) + else if (tmpValue.endsWith("_ref")) { + List refLids = pds4Search.getValues(doc, tmpValue); + if (refLids != null) { + for (String refLid : refLids) { + SolrDocument refObj = pds4Search.getContext(refLid); + if (refObj != null) { + List titleList = pds4Search.getValues(refObj, "title"); + if (titleList != null) { + String title = titleList.get(0); + val = "" + title + "
"; + //out.println(val); + } + } // end if refObj != null + } // end for refLids + } + } // end if contains _ref + else { + for (int j=0; j"; + if (values.size()>1) + // out.println("
"); + val += "
"; + } // end for + } // end else + } // end else + return val; + } +%> + + <% String lid = request.getParameter("identifier"); if ((lid == null) || (lid == "")) { @@ -56,299 +104,376 @@ else { PDS4Search pds4Search = new PDS4Search(searchUrl); try { - SolrDocument doc = pds4Search.getContext(lid); - - if (doc==null) { - %> -
- - - <% - } - else { - if ((lid.contains("investigation") || lid.contains("mission")) && !lid.contains("resource:resource")) { - %> - - - - <% - for (java.util.Map.Entry entry: Constants.msnPds4ToRegistry.entrySet()) { - String key = entry.getKey(); - String tmpValue = entry.getValue(); - %> - - - - - <% - } // for loop - } // end if (investigation) - else if (lid.contains("target")) { - %> - - - - <% - - for (java.util.Map.Entry entry: Constants.targetPds4ToRegistry.entrySet()) { - String key = entry.getKey(); - String tmpValue = entry.getValue(); - %> - - - - - <% - } // for loop - } // end if target - else if (lid.contains("instrument_host")) { - %> - - - - <% - for (java.util.Map.Entry entry: Constants.instHostCtxPds4ToSearch.entrySet()) { - String key = entry.getKey(); - String tmpValue = entry.getValue(); - %> - - - - - <% - } // for loop - }// end if (instrument_host) - else if (lid.contains("instrument:")) { - %> - - - - <% - for (java.util.Map.Entry entry: Constants.instCtxPds4ToSearch.entrySet()) { - String key = entry.getKey(); - String tmpValue = entry.getValue(); - %> - - - - - <% - } // for loop - }// end if (instrument) - else if (lid.contains("resource:resource")) { - %> - - - - <% - - for (java.util.Map.Entry entry: Constants.resrcCtxPds4ToSearch.entrySet()) { - String key = entry.getKey(); - String tmpValue = entry.getValue(); - %> - - - - - <% - } // end else - } // for loop - } // end if target - } // if extObj !=null + SolrDocument doc = pds4Search.getContext(lid); + + if (doc==null) { + %> + + + + <% + } + else { + if ((lid.contains("investigation") || lid.contains("mission")) && !lid.contains("resource:resource")) { + %> + + + + <% + for (java.util.Map.Entry entry: Constants.msnPds4ToRegistry.entrySet()) { + String key = entry.getKey(); + String tmpValue = entry.getValue(); + %> + + + + + <% + } // for loop + } // end if (investigation) + else if (lid.contains("target")) { + %> + + + + <% + + for (java.util.Map.Entry entry: Constants.targetPds4ToRegistry.entrySet()) { + String key = entry.getKey(); + String tmpValue = entry.getValue(); + %> + + + + + <% + } // for loop + } // end if target + else if (lid.contains("instrument_host")) { + %> + + + + <% + for (java.util.Map.Entry entry: Constants.instHostCtxPds4ToSearch.entrySet()) { + String key = entry.getKey(); + String tmpValue = entry.getValue(); + %> + + + + + <% + } // for loop + }// end if (instrument_host) + else if (lid.contains("instrument:")) { + %> + + + + <% + for (java.util.Map.Entry entry: Constants.instCtxPds4ToSearch.entrySet()) { + String key = entry.getKey(); + String tmpValue = entry.getValue(); + %> + + + + + <% + } // for loop + }// end if (instrument) + else if (lid.contains("resource:resource")) { + %> + + + + <% + + for (java.util.Map.Entry entry: Constants.resrcCtxPds4ToSearch.entrySet()) { + String key = entry.getKey(); + String tmpValue = entry.getValue(); + %> + + + + + <% + } // end else + } // for loop + } // end if resource:resource + else if (lid.contains("telescope")) { + %> + + + + <% + for (java.util.Map.Entry entry: Constants.telescopePds4ToRegistry.entrySet()) { + String key = entry.getKey(); + String tmpValue = entry.getValue(); + %> + + + + + <% + } // for loop + }// end if (telescope) + else if (lid.contains("facility")) { + %> + + + + <% + for (java.util.Map.Entry entry: Constants.facilityPds4ToRegistry.entrySet()) { + String key = entry.getKey(); + String tmpValue = entry.getValue(); + %> + + + + + <% + } // for loop + }// end if (facility) + else if (lid.contains("airborne")) { + %> + + + + <% + for (java.util.Map.Entry entry: Constants.airbornePds4ToRegistry.entrySet()) { + String key = entry.getKey(); + String tmpValue = entry.getValue(); + %> + + + + + <% + } // for loop + }// end if (airborne) + + } // if doc == null } catch (Exception e) { e.printStackTrace(); %> <% @@ -356,9 +481,9 @@ else { }// if mission name is specified %>
- Information not found for identifier <%=lid%>. Please verify the value. -
- Investigation Information
-
<%=key%> - <% - List values = pds4Search.getValues(doc, tmpValue); - String val=""; - if (values!=null) { - if (tmpValue.equals("investigation_description") || - tmpValue.equals("investigation_objectives_summary")) { - val = values.get(0); - %> -
<%=val%>
- <% - } - else if (tmpValue.equals("identifier")) { - val = values.get(0); - String version = pds4Search.getValues(doc, "version_id").get(0); - if (version!=null) - val += "::" + version; - out.println(val); - } - else { - for (int j=0; j"); - if (values.size()>1) - out.println("
"); - } // end for - } // end else - } // end if (values!=null) - %> -
- Target Information
-
<%=key%> - <% - String val = ""; - List values = pds4Search.getValues(doc, tmpValue); - if (values!=null) { - if (tmpValue.equals("target_description")){ - val = values.get(0); - %> -
<%=val%>
- <% - } - else if (tmpValue.equals("identifier")) { - val = values.get(0); - String version = pds4Search.getValues(doc, "version_id").get(0); - if (version!=null) - val += "::" + version; - out.println(val); - } - else { - for (int j=0; j"); - } - } - } // end if (values!=null) - else { - if (tmpValue.equals("resource_link")) { - List rvalues = pds4Search.getValues(doc, tmpValue); - if (rvalues != null) { - String refLid = rvalues.get(0); - refLid = refLid.substring(0, refLid.indexOf("::")); - - SolrDocument resource1 = pds4Search.getContext(refLid); - if (resource1!=null) { - String resname, reslink; - if (tmpValue.equals("resource_link")) { - List reslinks = pds4Search.getValues(resource1, "resource_url"); - reslink = reslinks.get(0); - out.println(reslink); - } - } - } - } - } - %> -
- Instrument Host Information
-
<%=key%> - <% - String val=""; - List values = pds4Search.getValues(doc, tmpValue); - if (values!=null) { - if (tmpValue.equals("instrument_host_description")){ - val = values.get(0); - %> -
<%=val%>
- <% - } // end if (tmpValue.equals("instrument_host_desc") - else if (tmpValue.equals("identifier")) { - val = values.get(0); - String version = pds4Search.getValues(doc, "version_id").get(0); - if (version!=null) - val += "::" + version; - out.println(val); - } - else { - for (int j=0; j"); - if (values.size()>1) - out.println("
"); - } // end for - } // end else - } // end if (values!=null) - %> -
- Instrument Information
-
<%=key%> - <% - List values = pds4Search.getValues(doc, tmpValue); - String val=""; - if (values!=null) { - if (tmpValue.equals("instrument_description")){ - val = values.get(0); - %> -
<%=val%>
- <% - } - else if (tmpValue.equals("identifier")) { - val = values.get(0); - String version = pds4Search.getValues(doc, "version_id").get(0); - if (version!=null) - val += "::" + version; - out.println(val); - } - else { - for (int j=0; j"); - if (values.size()>1) - out.println("
"); - } // end for - } // end else - } // end if (values!=null) - else { - if (tmpValue.equals("instrument_host_id")) { - List instHostValues = pds4Search.getValues(doc, "instrument_host_ref"); - if (instHostValues != null) { - String instHostLid = instHostValues.get(0); - - SolrDocument instHostObj = pds4Search.getContext(instHostLid); - if (instHostObj!=null) { - List instHostIdValues = pds4Search.getValues(instHostObj, "instrument_host_name"); - String instHostId=""; - if (instHostIdValues!=null) - instHostId = instHostIdValues.get(0); - out.println(instHostId + "
"); - } - } - } // end if instrument_host_id - } // end else - //} - %> -
- Resource Information
-
<%=key%> - <% - String val = ""; - String resname="", reslink=""; - if (tmpValue.equals("resources")) { - resname = pds4Search.getValues(doc, "resource_name").get(0); - reslink = pds4Search.getValues(doc, "resource_url").get(0); - %> -
  • <%=resname%>
    - <% - } - else { - List values = pds4Search.getValues(doc, tmpValue); - if (values!=null) { - if (tmpValue.equals("resource_description")){ - val = values.get(0); - out.println(val); - } - else if (tmpValue.equals("identifier")) { - val = values.get(0); - String version = pds4Search.getValues(doc, "version_id").get(0); - if (version!=null) - val += "::" + version; - out.println(val); - } - else { - for (int j=0; j"); - } - } - } // end if (values!=null) - %> -
  • + Information not found for identifier <%=lid%>. Please verify the value. +
    + Investigation Information
    +
    <%=key%> + <% + List values = pds4Search.getValues(doc, tmpValue); + String val=""; + if (values!=null) { + if (tmpValue.equals("investigation_description") || + tmpValue.equals("investigation_objectives_summary")) { + val = values.get(0); + out.println(val); + } + else if (tmpValue.equals("identifier")) { + val = values.get(0); + String version = pds4Search.getValues(doc, "version_id").get(0); + if (version!=null) + val += "::" + version; + out.println(val); + } + else { + for (int j=0; j"); + if (values.size()>1) + out.println("
    "); + } // end for + } // end else + } // end if (values!=null) + %> +
    + Target Information
    +
    <%=key%> + <% + String val = ""; + List values = pds4Search.getValues(doc, tmpValue); + if (values!=null) { + if (tmpValue.equals("target_description")){ + val = values.get(0); + out.println(val); + } + else if (tmpValue.equals("identifier")) { + val = values.get(0); + String version = pds4Search.getValues(doc, "version_id").get(0); + if (version!=null) + val += "::" + version; + out.println(val); + } + else { + for (int j=0; j"); + } + } + } // end if (values!=null) + else { + if (tmpValue.equals("resource_link")) { + List rvalues = pds4Search.getValues(doc, tmpValue); + if (rvalues != null) { + String refLid = rvalues.get(0); + refLid = refLid.substring(0, refLid.indexOf("::")); + + SolrDocument resource1 = pds4Search.getContext(refLid); + if (resource1!=null) { + String resname, reslink; + if (tmpValue.equals("resource_link")) { + List reslinks = pds4Search.getValues(resource1, "resource_url"); + reslink = reslinks.get(0); + out.println(reslink); + } + } + } + } + } + %> +
    + Instrument Host Information
    +
    <%=key%> + <% + String val=""; + List values = pds4Search.getValues(doc, tmpValue); + if (values!=null) { + if (tmpValue.equals("instrument_host_description")){ + val = values.get(0); + out.println(val); + } // end if (tmpValue.equals("instrument_host_desc") + else if (tmpValue.equals("identifier")) { + val = values.get(0); + String version = pds4Search.getValues(doc, "version_id").get(0); + if (version!=null) + val += "::" + version; + out.println(val); + } + else { + for (int j=0; j"); + if (values.size()>1) + out.println("
    "); + } // end for + } // end else + } // end if (values!=null) + %> +
    + Instrument Information
    +
    <%=key%> + <% + List values = pds4Search.getValues(doc, tmpValue); + String val=""; + if (values!=null) { + if (tmpValue.equals("instrument_description")){ + val = values.get(0); + out.println(val); + } + else if (tmpValue.equals("identifier")) { + val = values.get(0); + String version = pds4Search.getValues(doc, "version_id").get(0); + if (version!=null) + val += "::" + version; + out.println(val); + } + else if (key.endsWith("_ref")) { + List refLids = pds4Search.getValues(doc, tmpValue); + if (refLids != null) { + for (String refLid : refLids) { + SolrDocument refObj = pds4Search.getContext(lid); + if (refObj != null) { + List titleList = pds4Search.getValues(refObj, "title"); + if (titleList != null) { + String title = titleList.get(0); + out.println("" + title + "
    "); + } + } // end if refObj != null + } // end for refLids + } + } // end if contains _ref + else { + for (int j=0; j"); + if (values.size()>1) + out.println("
    "); + } // end for + } // end else + } // end if (values!=null) + else if (lid.contains("instrument:")) { + if (tmpValue.equals("instrument_host_id")) { + List instHostValues = pds4Search.getValues(doc, "instrument_host_ref"); + if (instHostValues != null) { + String instHostLid = instHostValues.get(0); + + SolrDocument instHostObj = pds4Search.getContext(instHostLid); + if (instHostObj!=null) { + List instHostIdValues = pds4Search.getValues(instHostObj, "instrument_host_name"); + String instHostId=""; + if (instHostIdValues!=null) + instHostId = instHostIdValues.get(0); + out.println(instHostId + "
    "); + } + } + } // end if instrument_host_id + } // end else + //} + %> +
    + Resource Information
    +
    <%=key%> + <% + String val = ""; + String resname="", reslink=""; + if (tmpValue.equals("resources")) { + resname = pds4Search.getValues(doc, "resource_name").get(0); + reslink = pds4Search.getValues(doc, "resource_url").get(0); + %> +
  • <%=resname%>
    + <% + } + else { + List values = pds4Search.getValues(doc, tmpValue); + if (values!=null) { + if (tmpValue.equals("resource_description")){ + val = values.get(0); + out.println(val); + } + else if (tmpValue.equals("identifier")) { + val = values.get(0); + String version = pds4Search.getValues(doc, "version_id").get(0); + if (version!=null) + val += "::" + version; + out.println(val); + } + else { + for (int j=0; j"); + } + } + } // end if (values!=null) + %> +
  • + Telescope Information
    +
    <%=key%> + <% + out.println(insertContextInformation(pds4Search, doc, tmpValue)); + %> +
    + Facility Information
    +
    <%=key%> + <% + out.println(insertContextInformation(pds4Search, doc, tmpValue)); + %> +
    + Airborne Information
    +
    <%=key%> + <% + out.println(insertContextInformation(pds4Search, doc, tmpValue)); + %> +
    - No Search Service found: <%=searchUrl%> to retrieve the Context Information. + The PDS Database is temporarily down for maintenance. Check back later or please contact the PDS Help Desk for assistance.
    - +