-
+
+<%!
+ 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) {
- %>
-
-
- Information not found for identifier <%=lid%>. Please verify the value.
- |
-
- <%
- }
- else {
- if ((lid.contains("investigation") || lid.contains("mission")) && !lid.contains("resource:resource")) {
- %>
-
-
- Investigation Information
- |
-
- <%
- for (java.util.Map.Entry entry: Constants.msnPds4ToRegistry.entrySet()) {
- String key = entry.getKey();
- String tmpValue = entry.getValue();
- %>
-
- <%=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)
- %>
- |
-
- <%
- } // for loop
- } // end if (investigation)
- else if (lid.contains("target")) {
- %>
-
-
- Target Information
- |
-
- <%
-
- for (java.util.Map.Entry entry: Constants.targetPds4ToRegistry.entrySet()) {
- String key = entry.getKey();
- String tmpValue = entry.getValue();
- %>
-
- <%=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);
- }
- }
- }
- }
- }
- %>
- |
-
- <%
- } // for loop
- } // end if target
- else if (lid.contains("instrument_host")) {
- %>
-
-
- Instrument Host Information
- |
-
- <%
- for (java.util.Map.Entry entry: Constants.instHostCtxPds4ToSearch.entrySet()) {
- String key = entry.getKey();
- String tmpValue = entry.getValue();
- %>
-
- <%=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)
- %>
- |
-
- <%
- } // for loop
- }// end if (instrument_host)
- else if (lid.contains("instrument:")) {
- %>
-
-
- Instrument Information
- |
-
- <%
- for (java.util.Map.Entry entry: Constants.instCtxPds4ToSearch.entrySet()) {
- String key = entry.getKey();
- String tmpValue = entry.getValue();
- %>
-
- <%=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
- //}
- %>
- |
-
- <%
- } // for loop
- }// end if (instrument)
- else if (lid.contains("resource:resource")) {
- %>
-
-
- Resource Information
- |
-
- <%
-
- for (java.util.Map.Entry entry: Constants.resrcCtxPds4ToSearch.entrySet()) {
- String key = entry.getKey();
- String tmpValue = entry.getValue();
- %>
-
- <%=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)
- %>
- |
-
- <%
- } // end else
- } // for loop
- } // end if target
- } // if extObj !=null
+ SolrDocument doc = pds4Search.getContext(lid);
+
+ if (doc==null) {
+ %>
+
+
+ Information not found for identifier <%=lid%>. Please verify the value.
+ |
+
+ <%
+ }
+ else {
+ if ((lid.contains("investigation") || lid.contains("mission")) && !lid.contains("resource:resource")) {
+ %>
+
+
+ Investigation Information
+ |
+
+ <%
+ for (java.util.Map.Entry entry: Constants.msnPds4ToRegistry.entrySet()) {
+ String key = entry.getKey();
+ String tmpValue = entry.getValue();
+ %>
+
+ <%=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)
+ %>
+ |
+
+ <%
+ } // for loop
+ } // end if (investigation)
+ else if (lid.contains("target")) {
+ %>
+
+
+ Target Information
+ |
+
+ <%
+
+ for (java.util.Map.Entry entry: Constants.targetPds4ToRegistry.entrySet()) {
+ String key = entry.getKey();
+ String tmpValue = entry.getValue();
+ %>
+
+ <%=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);
+ }
+ }
+ }
+ }
+ }
+ %>
+ |
+
+ <%
+ } // for loop
+ } // end if target
+ else if (lid.contains("instrument_host")) {
+ %>
+
+
+ Instrument Host Information
+ |
+
+ <%
+ for (java.util.Map.Entry entry: Constants.instHostCtxPds4ToSearch.entrySet()) {
+ String key = entry.getKey();
+ String tmpValue = entry.getValue();
+ %>
+
+ <%=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)
+ %>
+ |
+
+ <%
+ } // for loop
+ }// end if (instrument_host)
+ else if (lid.contains("instrument:")) {
+ %>
+
+
+ Instrument Information
+ |
+
+ <%
+ for (java.util.Map.Entry entry: Constants.instCtxPds4ToSearch.entrySet()) {
+ String key = entry.getKey();
+ String tmpValue = entry.getValue();
+ %>
+
+ <%=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
+ //}
+ %>
+ |
+
+ <%
+ } // for loop
+ }// end if (instrument)
+ else if (lid.contains("resource:resource")) {
+ %>
+
+
+ Resource Information
+ |
+
+ <%
+
+ for (java.util.Map.Entry entry: Constants.resrcCtxPds4ToSearch.entrySet()) {
+ String key = entry.getKey();
+ String tmpValue = entry.getValue();
+ %>
+
+ <%=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)
+ %>
+ |
+
+ <%
+ } // end else
+ } // for loop
+ } // end if resource:resource
+ else if (lid.contains("telescope")) {
+ %>
+
+
+ Telescope Information
+ |
+
+ <%
+ for (java.util.Map.Entry entry: Constants.telescopePds4ToRegistry.entrySet()) {
+ String key = entry.getKey();
+ String tmpValue = entry.getValue();
+ %>
+
+ <%=key%> |
+
+ <%
+ out.println(insertContextInformation(pds4Search, doc, tmpValue));
+ %>
+ |
+
+ <%
+ } // for loop
+ }// end if (telescope)
+ else if (lid.contains("facility")) {
+ %>
+
+
+ Facility Information
+ |
+
+ <%
+ for (java.util.Map.Entry entry: Constants.facilityPds4ToRegistry.entrySet()) {
+ String key = entry.getKey();
+ String tmpValue = entry.getValue();
+ %>
+
+ <%=key%> |
+
+ <%
+ out.println(insertContextInformation(pds4Search, doc, tmpValue));
+ %>
+ |
+
+ <%
+ } // for loop
+ }// end if (facility)
+ else if (lid.contains("airborne")) {
+ %>
+
+
+ Airborne Information
+ |
+
+ <%
+ for (java.util.Map.Entry entry: Constants.airbornePds4ToRegistry.entrySet()) {
+ String key = entry.getKey();
+ String tmpValue = entry.getValue();
+ %>
+
+ <%=key%> |
+
+ <%
+ out.println(insertContextInformation(pds4Search, doc, tmpValue));
+ %>
+ |
+
+ <%
+ } // for loop
+ }// end if (airborne)
+
+ } // if doc == null
} catch (Exception e) {
e.printStackTrace();
%>
- 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.
|
<%
@@ -356,9 +481,9 @@ else {
}// if mission name is specified
%>
-
+
diff --git a/src/main/webapp/pds/viewDataset.jsp b/src/main/webapp/pds/viewDataset.jsp
index abb96e335..68dba3b18 100644
--- a/src/main/webapp/pds/viewDataset.jsp
+++ b/src/main/webapp/pds/viewDataset.jsp
@@ -359,7 +359,7 @@ else {
|
- No Search Service found: <%=searchUrl%> to retrieve the Data Set Information.
+ The PDS Database is temporarily down for maintenance. Check back later or please contact the PDS Help Desk for assistance.
|
diff --git a/src/main/webapp/pds/viewDocument.jsp b/src/main/webapp/pds/viewDocument.jsp
index fcdefc430..ae31e0d05 100644
--- a/src/main/webapp/pds/viewDocument.jsp
+++ b/src/main/webapp/pds/viewDocument.jsp
@@ -82,7 +82,7 @@
%>
- No Search Service found: <%=searchUrl%> to retrieve the Document Information.
+ The PDS Database is temporarily down for maintenance. Check back later or please contact the PDS Help Desk for assistance.
|
<%
@@ -404,7 +404,7 @@
%>
- No Search Service found: <%=searchUrl%> to retrieve the Document Information.
+ The PDS Database is temporarily down for maintenance. Check back later or please contact the PDS Help Desk for assistance.
|
<%
diff --git a/src/main/webapp/pds/viewProduct.jsp b/src/main/webapp/pds/viewProduct.jsp
index 56d8d22ab..ec139fe9d 100644
--- a/src/main/webapp/pds/viewProduct.jsp
+++ b/src/main/webapp/pds/viewProduct.jsp
@@ -99,7 +99,7 @@
%>
- No Search Service found: <%=searchUrl%> to retrieve the Observational Product Information.
+ The PDS Database is temporarily down for maintenance. Check back later or please contact the PDS Help Desk for assistance.
|
<%
@@ -369,7 +369,7 @@
%>
- No Search Service found: <%=searchUrl%> to retrieve <%=objLid%>
+ The PDS Database is temporarily down for maintenance. Check back later or please contact the PDS Help Desk for assistance.
|
<%
diff --git a/src/main/webapp/pds/viewProductExternal.jsp b/src/main/webapp/pds/viewProductExternal.jsp
index 2186996ce..6105db147 100644
--- a/src/main/webapp/pds/viewProductExternal.jsp
+++ b/src/main/webapp/pds/viewProductExternal.jsp
@@ -93,7 +93,7 @@
%>
- No Search Service found: <%=searchUrl%> to retrieve the Document Information.
+ The PDS Database is temporarily down for maintenance. Check back later or please contact the PDS Help Desk for assistance.
|
<%
@@ -412,7 +412,7 @@
%>
- No Search Service found: <%=searchUrl%> to retrieve the Document Information.
+ The PDS Database is temporarily down for maintenance. Check back later or please contact the PDS Help Desk for assistance.
|
<%