Cleanup of webapp context root. Removing many unused jsp files and some unused controllers. NIHVIVO-1000
This commit is contained in:
parent
ef3988022f
commit
f4409580b4
23 changed files with 10 additions and 980 deletions
|
@ -381,15 +381,6 @@
|
||||||
<url-pattern>/flagUpdate</url-pattern>
|
<url-pattern>/flagUpdate</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
<servlet>
|
|
||||||
<servlet-name>SitemapIndexController</servlet-name>
|
|
||||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.SitemapIndexController</servlet-class>
|
|
||||||
</servlet>
|
|
||||||
<servlet-mapping>
|
|
||||||
<servlet-name>SitemapIndexController</servlet-name>
|
|
||||||
<url-pattern>/sitemap.xml</url-pattern>
|
|
||||||
</servlet-mapping>
|
|
||||||
|
|
||||||
<servlet>
|
<servlet>
|
||||||
<servlet-name>RDFUploadFormController</servlet-name>
|
<servlet-name>RDFUploadFormController</servlet-name>
|
||||||
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.jena.RDFUploadFormController</servlet-class>
|
<servlet-class>edu.cornell.mannlib.vitro.webapp.controller.jena.RDFUploadFormController</servlet-class>
|
||||||
|
|
|
@ -31,8 +31,8 @@ import edu.cornell.mannlib.vitro.webapp.beans.Portal;
|
||||||
public class ContactMailServlet extends VitroHttpServlet {
|
public class ContactMailServlet extends VitroHttpServlet {
|
||||||
private static final Log log = LogFactory.getLog(ContactMailServlet.class);
|
private static final Log log = LogFactory.getLog(ContactMailServlet.class);
|
||||||
|
|
||||||
private final static String CONFIRM_PAGE = "/thankyou.jsp";
|
private final static String CONFIRM_PAGE = "/templates/parts/thankyou.jsp";
|
||||||
private final static String ERR_PAGE = "/contact_err.jsp";
|
private final static String ERR_PAGE = "/templates/parts/contact_err.jsp";
|
||||||
private final static String SPAM_MESSAGE = "Your message was flagged as spam.";
|
private final static String SPAM_MESSAGE = "Your message was flagged as spam.";
|
||||||
private final static String EMAIL_BACKUP_FILE_PATH = "/WEB-INF/LatestMessage.html";
|
private final static String EMAIL_BACKUP_FILE_PATH = "/WEB-INF/LatestMessage.html";
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,6 @@ public class Controllers {
|
||||||
|
|
||||||
// jsps go here:
|
// jsps go here:
|
||||||
|
|
||||||
public static final String EMPTY = "/empty.jsp";
|
|
||||||
public static final String TAB = "/index.jsp";
|
public static final String TAB = "/index.jsp";
|
||||||
|
|
||||||
public static final String LOGIN_JSP = "/login_process.jsp";
|
public static final String LOGIN_JSP = "/login_process.jsp";
|
||||||
|
@ -80,17 +79,17 @@ public class Controllers {
|
||||||
|
|
||||||
public static final String BROWSE_GROUP_JSP = "/templates/browse/browseGroup.jsp";
|
public static final String BROWSE_GROUP_JSP = "/templates/browse/browseGroup.jsp";
|
||||||
|
|
||||||
public static final String HORIZONTAL_JSP = "/horizontal.jsp";
|
public static final String HORIZONTAL_JSP = "/templates/edit/fetch/horizontal.jsp";
|
||||||
public static final String VERTICAL_JSP = "/templates/edit/fetch/vertical.jsp";
|
public static final String VERTICAL_JSP = "/templates/edit/fetch/vertical.jsp";
|
||||||
|
|
||||||
public static final String CHECK_DATATYPE_PROPERTIES = "/checkDatatypeProperties.jsp";
|
public static final String CHECK_DATATYPE_PROPERTIES = "/jsp/checkDatatypeProperties.jsp";
|
||||||
public static final String EXPORT_SELECTION_JSP = "/jenaIngest/exportSelection.jsp";
|
public static final String EXPORT_SELECTION_JSP = "/jenaIngest/exportSelection.jsp";
|
||||||
|
|
||||||
public static final String VCLASS_RETRY_URL = "vclass_retry";
|
public static final String VCLASS_RETRY_URL = "vclass_retry";
|
||||||
|
|
||||||
public static final String TOGGLE_SCRIPT_ELEMENT = "<script language='JavaScript' type='text/javascript' src='js/toggle.js'></script>";
|
public static final String TOGGLE_SCRIPT_ELEMENT = "<script language='JavaScript' type='text/javascript' src='js/toggle.js'></script>";
|
||||||
|
|
||||||
public static final Object SEARCH_ERROR_JSP = "/search_error.jsp";
|
public static final Object SEARCH_ERROR_JSP = "/templates/parts/search_error.jsp";
|
||||||
|
|
||||||
|
|
||||||
//public static final String TAB_ENTITIES_LIST_JSP = "templates/tab/tabEntities.jsp";
|
//public static final String TAB_ENTITIES_LIST_JSP = "templates/tab/tabEntities.jsp";
|
||||||
|
|
|
@ -1,178 +0,0 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.controller;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import javax.servlet.RequestDispatcher;
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import org.apache.commons.logging.Log;
|
|
||||||
import org.apache.commons.logging.LogFactory;
|
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Individual;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Tab;
|
|
||||||
|
|
||||||
public class SitemapIndexController extends VitroHttpServlet {
|
|
||||||
private static final Log log = LogFactory.getLog(SitemapIndexController.class.getName());
|
|
||||||
|
|
||||||
private static ArrayList<ArrayList<String>> urlIndex = null;
|
|
||||||
|
|
||||||
public void doGet( HttpServletRequest req, HttpServletResponse res )
|
|
||||||
throws IOException, ServletException {
|
|
||||||
try {
|
|
||||||
super.doGet(req, res);
|
|
||||||
VitroRequest vreq = new VitroRequest(req);
|
|
||||||
String entityListString = vreq.getParameter("entityListNum");
|
|
||||||
Integer entityListNum = null;
|
|
||||||
if(entityListString != null) entityListNum = Integer.parseInt(entityListString);
|
|
||||||
if(entityListNum != null)
|
|
||||||
{
|
|
||||||
generateEntitySitemap(req, res, entityListNum);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
String tabsPortalString = vreq.getParameter("tabsPortalNum");
|
|
||||||
Integer tabsPortalNum = null;
|
|
||||||
if(tabsPortalString != null) tabsPortalNum = Integer.parseInt(tabsPortalString);
|
|
||||||
if(tabsPortalNum != null)
|
|
||||||
{
|
|
||||||
generateTabsSitemap(req, res, tabsPortalNum);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
setUrlIndex(vreq);
|
|
||||||
|
|
||||||
vreq.setAttribute("individuals", urlIndex.size());
|
|
||||||
vreq.setAttribute("context", req.getServerName()+":"+req.getServerPort()+req.getContextPath());
|
|
||||||
Portal portal = vreq.getPortal();
|
|
||||||
RequestDispatcher rd = vreq.getRequestDispatcher("/siteMapIndex.jsp");
|
|
||||||
rd.forward(req,res);
|
|
||||||
|
|
||||||
} catch (Throwable e) {
|
|
||||||
log.error(e);
|
|
||||||
req.setAttribute("javax.servlet.jsp.jspException",e);
|
|
||||||
RequestDispatcher rd = req.getRequestDispatcher("/error.jsp");
|
|
||||||
rd.forward(req, res);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void generateEntitySitemap(HttpServletRequest req, HttpServletResponse res, int listNum)
|
|
||||||
{
|
|
||||||
VitroRequest vreq = new VitroRequest(req);
|
|
||||||
if(urlIndex == null) setUrlIndex(vreq);
|
|
||||||
RequestDispatcher rd = vreq.getRequestDispatcher("/siteMap.jsp");
|
|
||||||
vreq.setAttribute("list", urlIndex.get(listNum));
|
|
||||||
try {
|
|
||||||
rd.forward(req,res);
|
|
||||||
}
|
|
||||||
catch(Exception e)
|
|
||||||
{
|
|
||||||
log.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void generateTabsSitemap(HttpServletRequest req, HttpServletResponse res, int portalNum)
|
|
||||||
{
|
|
||||||
VitroRequest vreq = new VitroRequest(req);
|
|
||||||
List<Tab> tabs = (List<Tab>)vreq.getWebappDaoFactory().getTabDao().getTabsForPortal(portalNum);
|
|
||||||
ArrayList<String> tabsList = new ArrayList<String>();
|
|
||||||
for(int i=0; i<tabs.size(); i++)
|
|
||||||
{
|
|
||||||
addDecendentTabs(tabsList, tabs.get(i), portalNum, "http://"+vreq.getServerName()+":"+vreq.getServerPort()+vreq.getContextPath());
|
|
||||||
}
|
|
||||||
RequestDispatcher rd = vreq.getRequestDispatcher("/siteMap.jsp");
|
|
||||||
vreq.setAttribute("list", tabsList);
|
|
||||||
try {
|
|
||||||
rd.forward(req,res);
|
|
||||||
}
|
|
||||||
catch(Exception e)
|
|
||||||
{
|
|
||||||
log.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void addDecendentTabs(ArrayList<String> tabsList, Tab tab, int portalNum, String contextPath)
|
|
||||||
{
|
|
||||||
if(tab == null) return;
|
|
||||||
String tabURI = contextPath+escapeEntity("/index.jsp?home="+portalNum+"&"+tab.getTabDepthName()+"="+tab.getTabId());
|
|
||||||
tabsList.add(tabURI);
|
|
||||||
//tabsList.add(tabURI);
|
|
||||||
|
|
||||||
Collection<Tab> childTabs = tab.getChildTabs();
|
|
||||||
if(childTabs != null)
|
|
||||||
for(Tab t:childTabs) addDecendentTabs(tabsList, t, portalNum, contextPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setUrlIndex(VitroRequest vreq)
|
|
||||||
{
|
|
||||||
Iterator<Individual> individualIter = vreq.getWebappDaoFactory().getIndividualDao().getAllOfThisTypeIterator();
|
|
||||||
ArrayList<ArrayList<String>> arrays = new ArrayList<ArrayList<String>>();
|
|
||||||
for(int i=0; individualIter.hasNext(); i++)
|
|
||||||
{
|
|
||||||
ArrayList<String> individuals = new ArrayList<String>();
|
|
||||||
for(int j=0; j<50000 && individualIter.hasNext(); j++)
|
|
||||||
{
|
|
||||||
String individualUri = SitemapIndexController.forURL(individualIter.next().getURI());
|
|
||||||
|
|
||||||
individualUri = "http://"+vreq.getServerName()+":"+vreq.getServerPort()+vreq.getContextPath()+"/entity?home=1&uri="+individualUri;
|
|
||||||
//individualUri = "http://vivo.cornell.edu/entity?home=1&uri="+individualUri;
|
|
||||||
|
|
||||||
individuals.add(escapeEntity(individualUri));
|
|
||||||
|
|
||||||
}
|
|
||||||
arrays.add(individuals);
|
|
||||||
}
|
|
||||||
urlIndex = arrays;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static String forURL(String frag)
|
|
||||||
{
|
|
||||||
String result = null;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
result = URLEncoder.encode(frag, "UTF-8");
|
|
||||||
} catch (UnsupportedEncodingException ex) {
|
|
||||||
throw new RuntimeException("UTF-8 not supported", ex);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String escapeEntity(String frag)
|
|
||||||
{
|
|
||||||
if(frag.contains("&")) frag = replaceAll(frag, "&", "&");
|
|
||||||
if(frag.contains("'")) frag = replaceAll(frag, "'", "'");
|
|
||||||
if(frag.contains("\"")) frag = replaceAll(frag, "\"", """);
|
|
||||||
if(frag.contains(">")) frag = replaceAll(frag, ">", ">");
|
|
||||||
if(frag.contains("<")) frag = replaceAll(frag, "<", "<");
|
|
||||||
return frag;
|
|
||||||
}
|
|
||||||
|
|
||||||
private String replaceAll(String original, String match, String replace)
|
|
||||||
{
|
|
||||||
int index1 = original.indexOf(match);
|
|
||||||
int index2 = original.indexOf(replace);
|
|
||||||
if(index1 == index2 && index1 != -1)
|
|
||||||
{
|
|
||||||
original = original.substring(0, index1+replace.length()+1)+replaceAll(original.substring(index1+replace.length()+1), match, replace);
|
|
||||||
return original;
|
|
||||||
}
|
|
||||||
if(index1 == -1) return original;
|
|
||||||
String before = original.substring(0, index1) + replace;
|
|
||||||
return before + replaceAll(original.substring(index1+1), match, replace);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
|
||||||
throws ServletException,IOException {
|
|
||||||
doGet(request, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,58 +0,0 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.controller;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
import javax.servlet.RequestDispatcher;
|
|
||||||
import javax.servlet.ServletException;
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
|
||||||
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean;
|
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Controller for Terms of Use page
|
|
||||||
* @author bjl23
|
|
||||||
*/
|
|
||||||
public class TermsOfUseController extends VitroHttpServlet{
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
public void doPost(HttpServletRequest request, HttpServletResponse response)
|
|
||||||
throws ServletException, IOException {
|
|
||||||
doGet(request, response);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void doGet( HttpServletRequest request, HttpServletResponse response )
|
|
||||||
throws IOException, ServletException {
|
|
||||||
try {
|
|
||||||
super.doGet(request,response);
|
|
||||||
VitroRequest vreq = new VitroRequest(request);
|
|
||||||
|
|
||||||
ApplicationBean appBean=vreq.getAppBean();
|
|
||||||
Portal portalBean=vreq.getPortal();
|
|
||||||
|
|
||||||
request.setAttribute("rootBreadCrumbAnchorOrAppName", portalBean.getRootBreadCrumbAnchor()==null || portalBean.getRootBreadCrumbAnchor().equals("")?portalBean.getAppName():portalBean.getRootBreadCrumbAnchor());
|
|
||||||
request.setAttribute("copyrightAnchor", portalBean.getCopyrightAnchor());
|
|
||||||
//request.setAttribute("rootLogotypeTitle", appBean.getRootLogotypeTitle()); THIS IS NOT POPULATED
|
|
||||||
request.setAttribute("appName", portalBean.getAppName());
|
|
||||||
|
|
||||||
request.setAttribute("title", portalBean.getAppName()+" Terms of Use");
|
|
||||||
request.setAttribute("bodyJsp", "/usageTerms.jsp");// <<< this is where the body gets set
|
|
||||||
request.setAttribute("portalBean",portalBean);
|
|
||||||
|
|
||||||
RequestDispatcher rd =
|
|
||||||
request.getRequestDispatcher(Controllers.BASIC_JSP);
|
|
||||||
rd.forward(request, response);
|
|
||||||
|
|
||||||
} catch (Throwable e) {
|
|
||||||
// This is how we use an error.jsp
|
|
||||||
//it expects javax.servlet.jsp.jspException to be set to the
|
|
||||||
//exception so that it can display the info out of that.
|
|
||||||
request.setAttribute("javax.servlet.jsp.jspException", e);
|
|
||||||
RequestDispatcher rd = request.getRequestDispatcher("/error.jsp");
|
|
||||||
rd.include(request, response);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -68,7 +68,7 @@ public class UserMailController extends VitroHttpServlet{
|
||||||
request.setAttribute("portalId",Integer.valueOf(portalBean.getPortalId()));
|
request.setAttribute("portalId",Integer.valueOf(portalBean.getPortalId()));
|
||||||
|
|
||||||
request.setAttribute("title", portalBean.getAppName()+" Mail Users Form");
|
request.setAttribute("title", portalBean.getAppName()+" Mail Users Form");
|
||||||
request.setAttribute("bodyJsp", "/emailUsers.jsp");// <<< this is where the body gets set
|
request.setAttribute("bodyJsp", "/templates/parts/emailUsers.jsp");// <<< this is where the body gets set
|
||||||
request.setAttribute("portalBean",portalBean);
|
request.setAttribute("portalBean",portalBean);
|
||||||
|
|
||||||
RequestDispatcher rd =
|
RequestDispatcher rd =
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
||||||
|
<%-- This the non-freemarker AboutController iis still used by datastar. That
|
||||||
|
controller uses this jsp. --%>
|
||||||
|
|
||||||
<div id="content">
|
<div id="content">
|
||||||
|
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
||||||
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.MiscWebUtils" %>
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<title>Authroization Test</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/edit.css">
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
|
|
||||||
<table width="90%" cellpadding="1" cellspacing="1" border="0" align="center">
|
|
||||||
|
|
||||||
<tr><td colspan="4" height="1"><img src="site_icons/transparent.gif" width="100%" height="1" border="0"></td></tr>
|
|
||||||
|
|
||||||
<%
|
|
||||||
|
|
||||||
out.println("here");
|
|
||||||
java.util.Map params = request.getParameterMap();
|
|
||||||
java.util.Iterator keys = params.keySet().iterator();
|
|
||||||
|
|
||||||
%> <tr><td><b>params</b></td></tr> <%
|
|
||||||
while (keys.hasNext()){
|
|
||||||
String name = (String) keys.next();
|
|
||||||
String val = (String) params.get(name);
|
|
||||||
out.println("<tr><td>"+ name + "</td><td>"+ val +"</td></tr>");
|
|
||||||
}
|
|
||||||
%> <tr><td><b>headers</b></td></tr> <%
|
|
||||||
java.util.Enumeration hnames = request.getHeaderNames();
|
|
||||||
while( hnames.hasMoreElements() ){
|
|
||||||
String name = (String) hnames.nextElement();
|
|
||||||
String val = request.getHeader(name);
|
|
||||||
out.println("<tr><td>"+ name + "</td><td>"+ val +"</td></tr>");
|
|
||||||
}%>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<%= MiscWebUtils.getReqInfo(request) %>
|
|
||||||
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,169 +0,0 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
||||||
|
|
||||||
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
||||||
<%@ taglib uri='WEB-INF/tlds/database.tld' prefix='database'%>
|
|
||||||
<%@ page import="java.util.*,java.io.*,javax.xml.parsers.*,java.net.*,org.gnu.stealthp.rsslib.*" %>
|
|
||||||
<%
|
|
||||||
/**
|
|
||||||
* @version 1 2005-08-04
|
|
||||||
* @author Jon Corson-Rikert
|
|
||||||
*
|
|
||||||
* CHANGE HISTORY
|
|
||||||
* 2005-08-18 jc55 added "raw" mode for inclusion in tabs
|
|
||||||
*/
|
|
||||||
|
|
||||||
final int DEFAULT_PORTAL_ID=1;
|
|
||||||
String portalIdStr=(portalIdStr=request.getParameter("home"))==null?String.valueOf(DEFAULT_PORTAL_ID): portalIdStr.equals("")?String.valueOf(DEFAULT_PORTAL_ID):portalIdStr;
|
|
||||||
int incomingPortalId=Integer.parseInt(portalIdStr);
|
|
||||||
|
|
||||||
final String DEFAULT_RSS_URL="http://www.nsf.gov/mynsf/RSS/rss2news.xml"; //http://www.nsf.gov/mynsf/RSS/rss2discoveries.xml
|
|
||||||
boolean includeHeaders=true;
|
|
||||||
String rawStr=(rawStr=request.getParameter("raw"))==null?"false": rawStr.equals("")?"false":rawStr;
|
|
||||||
if (rawStr!=null && rawStr.equalsIgnoreCase("true")) {
|
|
||||||
includeHeaders=false;
|
|
||||||
}
|
|
||||||
if (includeHeaders) {%>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="css/edit.css">
|
|
||||||
<title>RSS</title>
|
|
||||||
<% final String DEFAULT_APPNAME="RSS";
|
|
||||||
final String DEFAULT_STYLESHEET="portal";
|
|
||||||
String appName=DEFAULT_APPNAME;
|
|
||||||
String styleSheet=DEFAULT_STYLESHEET;%>
|
|
||||||
<database:query id="portal" scope="page">
|
|
||||||
SELECT appName,styleSheet FROM portals WHERE id='<%=portalIdStr%>'
|
|
||||||
</database:query>
|
|
||||||
<database:rows query="portal">
|
|
||||||
<% int portal_col=0; %>
|
|
||||||
<database:columns query="portal" id="theValue">
|
|
||||||
<% switch (portal_col) {
|
|
||||||
case 0: appName=theValue; break;
|
|
||||||
case 1: styleSheet="portal"; break;
|
|
||||||
}
|
|
||||||
++portal_col; %>
|
|
||||||
</database:columns>
|
|
||||||
</database:rows>
|
|
||||||
<database:release query="portal" />
|
|
||||||
</head>
|
|
||||||
<body><%
|
|
||||||
}%>
|
|
||||||
<table width="90%" border="0" cellspacing="0" cellpadding="0" align="center">
|
|
||||||
<%
|
|
||||||
if (includeHeaders) {%>
|
|
||||||
<tr><td colspan="7">
|
|
||||||
<jsp:include page="header.jsp" flush="true" >
|
|
||||||
<jsp:param name="home" value="<%=portalIdStr%>" />
|
|
||||||
</jsp:include>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr><td colspan="7" height="1"><img src="site_icons/transparent.gif" width="100%" height="1" border="0"></td></tr><%
|
|
||||||
} %>
|
|
||||||
<tr><td colspan="7">
|
|
||||||
<% String noisyStr=(noisyStr=(String)request.getAttribute("noisy"))==null || noisyStr.equals("")?((noisyStr=request.getParameter("noisy"))==null || noisyStr.equals("")?"false":noisyStr):noisyStr;
|
|
||||||
boolean NOISY=(noisyStr.equalsIgnoreCase("true"))?true:false;
|
|
||||||
String urlStr=(urlStr=(String)request.getAttribute("url"))==null || urlStr.equals("")?((urlStr=request.getParameter("url"))==null || urlStr.equals("")?DEFAULT_RSS_URL:urlStr):urlStr;
|
|
||||||
if (urlStr==null || urlStr.equals("")) {%>
|
|
||||||
<h3>Error in URL parameter</h3>
|
|
||||||
<p>System could not decode <%=urlStr%> as a URL</p>
|
|
||||||
<% } else {
|
|
||||||
URL u=null;
|
|
||||||
try {
|
|
||||||
u = new URL(urlStr);
|
|
||||||
RSSHandler hand=new RSSHandler();
|
|
||||||
try {
|
|
||||||
RSSParser.parseXmlFile(u,hand,false);
|
|
||||||
RSSChannel ch= hand.getRSSChannel();%>
|
|
||||||
<h3><%=ch.getTitle()%></h3>
|
|
||||||
<% String lastDateStr=ch.getLastBuildDate();
|
|
||||||
if (lastDateStr==null || lastDateStr.equals("")) {
|
|
||||||
RSSDoublinCoreModule dcModule=ch.getRSSDoublinCoreModule();
|
|
||||||
if (dcModule!=null){
|
|
||||||
lastDateStr=dcModule.getDcDate();
|
|
||||||
if (lastDateStr!=null && !lastDateStr.equals("")){
|
|
||||||
int timeStartPos=lastDateStr.indexOf("T");
|
|
||||||
int timeEndPos=lastDateStr.indexOf("Z");
|
|
||||||
if (timeStartPos>0 && timeEndPos>0){ %>
|
|
||||||
<p><i>listings current as of <%=lastDateStr.substring(0,timeStartPos)%> at <%=lastDateStr.substring(timeStartPos+1,timeEndPos)%></i></p>
|
|
||||||
<% } else {%>
|
|
||||||
<p><i>listings current as of: <%=lastDateStr%></i></p>
|
|
||||||
<% }
|
|
||||||
} else {%>
|
|
||||||
<p>RSSDoublinCoreModule.getDcDate() returns null or blank String</p>
|
|
||||||
<% }
|
|
||||||
} else {%>
|
|
||||||
<p>RSSDoublinCoreModule is null</p>
|
|
||||||
<% }
|
|
||||||
}
|
|
||||||
String copyrightStr=ch.getCopyright();
|
|
||||||
if (copyrightStr!=null && !copyrightStr.equals("")){%>
|
|
||||||
<p><%=ch.getCopyright()%></p>
|
|
||||||
<% }
|
|
||||||
if (NOISY && ch.getRSSImage()!=null) {%>
|
|
||||||
<p>IMAGE INFO:<br/><%=ch.getRSSImage().toString()%></p>
|
|
||||||
<p>IMAGE IN HTML:<br/><%=ch.getRSSImage().toHTML()%></p>
|
|
||||||
<% } else if (NOISY) {%>
|
|
||||||
<p>CHANNEL HAS NO IMAGE</p>
|
|
||||||
<% }
|
|
||||||
|
|
||||||
if (NOISY && ch.getRSSTextInput()!=null) {%>
|
|
||||||
<p>INPUT INFO:<br/><%=ch.getRSSTextInput().toString()%></p>
|
|
||||||
<p>HTML INPUT:<br/><%=ch.getRSSTextInput().toHTML()%></p>
|
|
||||||
<% } else if (NOISY) {%>
|
|
||||||
<p>CHANNEL HAS NO FORM INPUT</p>
|
|
||||||
<% }
|
|
||||||
|
|
||||||
if (NOISY && ch.getDoublinCoreElements()!=null) {%>
|
|
||||||
<p>DUBLIN CORE INFO:<br/><%=ch.getDoublinCoreElements().toString()%></p>
|
|
||||||
<% } else if (NOISY) {%>
|
|
||||||
<p>CHANNEL HAS NO DUBLIN CORE TAGS</p>
|
|
||||||
<% }%>
|
|
||||||
|
|
||||||
<% if (NOISY) {%>
|
|
||||||
<h3>SEQUENCE INFO</h3>
|
|
||||||
<% if (ch.getItemsSequence()!=null) {%>
|
|
||||||
<p><%=hand.getRSSChannel().getItemsSequence().toString()%></p>
|
|
||||||
<% } else if (NOISY) {%>
|
|
||||||
<p>CHANNEL HAS NO SEQUENCE; MAYBE VERSION 0.9 or 2+?</p>
|
|
||||||
<% }
|
|
||||||
}
|
|
||||||
LinkedList lst = hand.getRSSChannel().getItems();%>
|
|
||||||
<h3>ITEMS INFO (<%=lst.size()%>)</h3>
|
|
||||||
<ul>
|
|
||||||
<% for (int i = 0; i < lst.size(); i++){
|
|
||||||
RSSItem itm = (RSSItem)lst.get(i);%>
|
|
||||||
<li><%=itm.toString()%></li>
|
|
||||||
<% if (itm.getDoublinCoreElements()!=null) {%>
|
|
||||||
<br/>DUBLIN CORE INFO FOR ITEM: <%=itm.getDoublinCoreElements().toString()%>
|
|
||||||
<% } else if (NOISY) {%>
|
|
||||||
<br/>ITEM HAS NO DUBLIN CORE TAGS
|
|
||||||
<% }%>
|
|
||||||
</li>
|
|
||||||
<% } // end for
|
|
||||||
} catch (org.gnu.stealthp.rsslib.RSSException ex) {%>
|
|
||||||
<h3>error initializing RSSHandler</h3>
|
|
||||||
<p><%=ex.getMessage()%></p>
|
|
||||||
<% }
|
|
||||||
} catch (java.net.MalformedURLException ex) {%>
|
|
||||||
<h3>Error in URL parameter</h3>
|
|
||||||
<p>System could not convert <%=urlStr%> to a Java URL: <%=ex.getMessage()%></p>
|
|
||||||
<% }
|
|
||||||
|
|
||||||
} // end else URLstr not null or blank%>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<%
|
|
||||||
if (includeHeaders) {%>
|
|
||||||
<tr><td colspan="7">
|
|
||||||
<jsp:include page="footer.jsp" flush="true">
|
|
||||||
<jsp:param name="home" value="<%=portalIdStr%>" />
|
|
||||||
</jsp:include>
|
|
||||||
</td>
|
|
||||||
</tr><%
|
|
||||||
}%>
|
|
||||||
</table><%
|
|
||||||
if (includeHeaders) {%>
|
|
||||||
</body>
|
|
||||||
</html><%
|
|
||||||
}%>
|
|
|
@ -1,2 +0,0 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
||||||
|
|
||||||
|
<%-- used by RefactorOperationController.java --%>
|
||||||
|
|
||||||
<%@ page import="java.util.*, java.lang.String.*"%>
|
<%@ page import="java.util.*, java.lang.String.*"%>
|
||||||
<%@ page import="edu.cornell.mannlib.vedit.beans.ButtonForm" %>
|
<%@ page import="edu.cornell.mannlib.vedit.beans.ButtonForm" %>
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
||||||
|
|
||||||
<%@ page isThreadSafe="false" %>
|
|
||||||
<%@ page import="java.util.*" %>
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.Controllers" %>
|
|
||||||
|
|
||||||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
|
|
||||||
|
|
||||||
<% final int DEFAULT_PORTAL_ID=1;
|
|
||||||
String portalIdStr=(portalIdStr=(String)request.getAttribute("home"))==null ?
|
|
||||||
((portalIdStr=request.getParameter("home"))==null?String.valueOf(DEFAULT_PORTAL_ID):portalIdStr):portalIdStr;
|
|
||||||
//int incomingPortalId=Integer.parseInt(portalIdStr);
|
|
||||||
%>
|
|
||||||
|
|
||||||
<jsp:useBean id="loginHandler" class="edu.cornell.mannlib.vedit.beans.LoginFormBean" scope="session">
|
|
||||||
<jsp:setProperty name="loginHandler" property="*"/>
|
|
||||||
</jsp:useBean>
|
|
||||||
|
|
||||||
<c:url var="siteAdminUrl" value="<%= Controllers.SITE_ADMIN %>" />
|
|
||||||
|
|
||||||
<%
|
|
||||||
|
|
||||||
String submitModeStr = request.getParameter("loginSubmitMode");
|
|
||||||
if ( submitModeStr == null ) {
|
|
||||||
submitModeStr = "unknown";
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( submitModeStr.equalsIgnoreCase("Log Out")) { %>
|
|
||||||
<jsp:forward page="/logout" >
|
|
||||||
<jsp:param name="home" value="<%= portalIdStr %>" />
|
|
||||||
</jsp:forward>
|
|
||||||
|
|
||||||
<% } else if ( submitModeStr.equalsIgnoreCase("Log In")) {
|
|
||||||
String loginNameStr = request.getParameter("loginName");
|
|
||||||
String loginPasswordStr = request.getParameter("loginPassword"); %>
|
|
||||||
<jsp:setProperty name="loginHandler" property="loginName" value="<%= loginNameStr %>" />
|
|
||||||
<jsp:setProperty name="loginHandler" property="loginPassword" value="<%= loginPasswordStr %>" />
|
|
||||||
<jsp:setProperty name="loginHandler" property="loginRemoteAddr" value="<%= request.getRemoteAddr() %>" />
|
|
||||||
|
|
||||||
<% if ( loginHandler.validateLoginForm() ) { %>
|
|
||||||
<jsp:forward page="/authenticate" >
|
|
||||||
<jsp:param name="home" value="<%= portalIdStr %>" />
|
|
||||||
</jsp:forward>
|
|
||||||
<% } else {
|
|
||||||
String redirectURL = "${siteAdminUrl}?home=" + portalIdStr + "&login=block";
|
|
||||||
response.sendRedirect(redirectURL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
%>
|
|
|
@ -1,34 +0,0 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="contents">
|
|
||||||
|
|
||||||
<h1>Import OWL/RDFS Ontologies</h1>
|
|
||||||
|
|
||||||
<span class="warning">Note: This is not yet fully stable. Avoid running on production servers.</span>
|
|
||||||
|
|
||||||
<form name="owlFromUri" method="post" action="importOwl">
|
|
||||||
<p>Import OWL/RDF XML ontology from URI:</p>
|
|
||||||
|
|
||||||
<input name="owlUri" size="60%"/>
|
|
||||||
<input type="submit" value="Import"/>
|
|
||||||
|
|
||||||
<p>Value to use for property domains/ranges that are not specified or cannot be interpreted:
|
|
||||||
<select name="nulldomrange">
|
|
||||||
<option value="none"><em>none</em></option>
|
|
||||||
<option value="owl:Thing" selected="selected">owl:Thing</option>
|
|
||||||
</select></p>
|
|
||||||
|
|
||||||
<p>Format <select name="isN3">
|
|
||||||
<option value="false">RDF/XML</option>
|
|
||||||
<option value="true">N3</option>
|
|
||||||
</select></p>
|
|
||||||
<!-- <input type="checkbox" disabled="disabled" name="omitInd" />
|
|
||||||
import classes and properties only (no individuals) -->
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div><!-- contents -->
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
||||||
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.web.*" %>
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.controller.VitroRequest" %>
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.dao.WebappDaoFactory" %>
|
|
||||||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
|
|
||||||
<%@ page errorPage="/error.jsp"%>
|
|
||||||
<%@ page contentType="text/html; charset=UTF-8"%>
|
|
||||||
|
|
||||||
<c:set var="portal" value="${requestScope.portalBean}"/>
|
|
||||||
|
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
||||||
<head>
|
|
||||||
<link rel="stylesheet" type="text/css" href="<c:url value="${themeDir}css/screen.css"/>" media="screen"/>
|
|
||||||
|
|
||||||
<c:out value="${requestScope.css}" escapeXml="false"/>
|
|
||||||
<title>Edit Your Profile</title>
|
|
||||||
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="wrap">
|
|
||||||
<jsp:include page="/${themeDir}jsp/identity.jsp" flush="true"/>
|
|
||||||
<div id="contentwrap">
|
|
||||||
<jsp:include page="/${themeDir}jsp/menu.jsp" flush="true"/>
|
|
||||||
<div id="content" class="full">
|
|
||||||
<div align="center">
|
|
||||||
If you are a member of the Cornell community and would like to edit you profile
|
|
||||||
in the Vivo system please login using your netId.
|
|
||||||
</div>
|
|
||||||
<div align="center">
|
|
||||||
<c:url value="/edit/login.jsp" var="loginUrl"/>
|
|
||||||
<button type="button" onclick="javascript:document.location.href='${loginUrl}'">Login</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- END div 'content' -->
|
|
||||||
</div><!-- END div 'contentwrap' -->
|
|
||||||
<jsp:include page="/${themeDir}jsp/footer.jsp" flush="true"/>
|
|
||||||
</div><!-- END div 'wrap' -->
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,30 +0,0 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
||||||
|
|
||||||
<%@ page import="java.util.*, java.lang.String.*"%>
|
|
||||||
<%@ page import="edu.cornell.mannlib.vedit.beans.ButtonForm" %>
|
|
||||||
<%@ page import="java.util.ArrayList" %>
|
|
||||||
|
|
||||||
<%
|
|
||||||
|
|
||||||
ArrayList<String> list = (ArrayList<String>)request.getAttribute("list");
|
|
||||||
String changeFrequency = "weekly";
|
|
||||||
response.setContentType("application/xml");
|
|
||||||
%>
|
|
||||||
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"
|
|
||||||
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
||||||
|
|
||||||
<%
|
|
||||||
// List Sitemaps for individuals
|
|
||||||
for(int i=0; i<list.size(); i++)
|
|
||||||
{
|
|
||||||
%>
|
|
||||||
<url>
|
|
||||||
<loc><%= list.get(i) %></loc>
|
|
||||||
<changefreq><%= changeFrequency %></changefreq>
|
|
||||||
</url>
|
|
||||||
<% }
|
|
||||||
%>
|
|
||||||
</urlset>
|
|
|
@ -1,38 +0,0 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
||||||
|
|
||||||
<%@ page import="java.util.*, java.lang.String.*"%>
|
|
||||||
<%@ page import="edu.cornell.mannlib.vedit.beans.ButtonForm" %>
|
|
||||||
<%@ page import="java.util.ArrayList" %>
|
|
||||||
|
|
||||||
<%
|
|
||||||
int individuals = (Integer)request.getAttribute("individuals");
|
|
||||||
String context = (String)request.getAttribute("context");
|
|
||||||
int numPortals = 16;
|
|
||||||
response.setContentType("application/xml");
|
|
||||||
%>
|
|
||||||
|
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<sitemapindex xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/siteindex.xsd"
|
|
||||||
xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
||||||
|
|
||||||
<%
|
|
||||||
// List Sitemaps for individuals
|
|
||||||
for(int i=0; i<individuals; i++)
|
|
||||||
{
|
|
||||||
%>
|
|
||||||
<sitemap>
|
|
||||||
<loc>http://<%= context %>/sitemap.xml?entityListNum=<%= i %></loc>
|
|
||||||
</sitemap>
|
|
||||||
<%
|
|
||||||
}
|
|
||||||
for(int i=0; i<numPortals; i++)
|
|
||||||
{
|
|
||||||
%>
|
|
||||||
<sitemap>
|
|
||||||
<loc>http://<%= context %>/sitemap.xml?tabsPortalNum=<%= i %></loc>
|
|
||||||
</sitemap>
|
|
||||||
<%
|
|
||||||
}
|
|
||||||
%>
|
|
||||||
</sitemapindex>
|
|
|
@ -1,54 +0,0 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
||||||
|
|
||||||
<%@ page import="edu.cornell.mannlib.vedit.beans.LoginFormBean" %>
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.ArrayIdentifierBundle" %>
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.auth.identifier.IdentifierBundle" %>
|
|
||||||
<%@ page
|
|
||||||
import="edu.cornell.mannlib.vitro.webapp.auth.identifier.NetIdIdentifierFactory"
|
|
||||||
%>
|
|
||||||
<%@ page import="edu.cornell.mannlib.vitro.webapp.filters.VitroRequestPrep" %>
|
|
||||||
<%@ page import="java.util.Enumeration" %>
|
|
||||||
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
|
|
||||||
|
|
||||||
<%
|
|
||||||
if( request.getParameter("force") != null ){
|
|
||||||
VitroRequestPrep.forceToSelfEditing(request);
|
|
||||||
}
|
|
||||||
if( request.getParameter("stopfaking") != null){
|
|
||||||
VitroRequestPrep.forceOutOfSelfEditing(request);
|
|
||||||
}
|
|
||||||
%>
|
|
||||||
|
|
||||||
|
|
||||||
<html>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<h1>auth info</h1>
|
|
||||||
|
|
||||||
<form action="<c:url value="testauth.jsp"/>" >
|
|
||||||
<input type="hidden" name="force" value="1"/>
|
|
||||||
<input type="submit" value="use fake netid for testing"/>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
<p/>
|
|
||||||
|
|
||||||
<form action="<c:url value="testauth.jsp"/>" >
|
|
||||||
<input type="hidden" name="stopfaking" value="1"/>
|
|
||||||
<input type="submit" value="stop usng netid for testing"/>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
<%
|
|
||||||
out.println("<table>");
|
|
||||||
|
|
||||||
Enumeration fj = request.getHeaderNames();
|
|
||||||
while( fj.hasMoreElements()){
|
|
||||||
String name = (String)fj.nextElement();
|
|
||||||
out.print("\n<tr><td>" + name + "</td>");
|
|
||||||
out.print("<td>" + request.getHeader(name) + "</td></tr>");
|
|
||||||
}
|
|
||||||
|
|
||||||
out.println("</table>");
|
|
||||||
%>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,151 +0,0 @@
|
||||||
//GLOBAL VARIABLES
|
|
||||||
//***************************************************************************************
|
|
||||||
//vars from DHTMLapi.js, Edition 2
|
|
||||||
//****************************************************************************************
|
|
||||||
// Global variables
|
|
||||||
var isCSS, isW3C, isIE4, isNN4, isIE6CSS;
|
|
||||||
// initialize upon load to let all browsers establish content objects
|
|
||||||
function initDHTMLAPI() {
|
|
||||||
if (document.images) {
|
|
||||||
isCSS = (document.body && document.body.style) ? true : false;
|
|
||||||
isW3C = (isCSS && document.getElementById) ? true : false;
|
|
||||||
isIE4 = (isCSS && document.all) ? true : false;
|
|
||||||
isNN4 = (document.layers) ? true : false;
|
|
||||||
isIE6CSS = (document.compatMode && document.compatMode.indexOf("CSS1") >= 0) ? true : false;
|
|
||||||
//alert("isCSS: "+isCSS+", isW3C: "+isW3C+", isIE4: "+isIE4 +", isNN4: "+isNN4+", isIE6CSS: "+isIE6CSS );
|
|
||||||
} else {
|
|
||||||
alert("document.images not defined in initDHTMLAPI()");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// set event handler to initialize API
|
|
||||||
window.onload = initDHTMLAPI;
|
|
||||||
//window.onresize = resizeWindow;
|
|
||||||
|
|
||||||
|
|
||||||
//***************************************************************************************
|
|
||||||
//vars from ZoomBox.htm
|
|
||||||
//****************************************************************************************
|
|
||||||
// Global vars for browser type and version
|
|
||||||
var isNav = (navigator.appName.indexOf("Netscape")>=0);
|
|
||||||
var isNav4 = false;
|
|
||||||
var isIE4_old = false;
|
|
||||||
var is5up = false;
|
|
||||||
//alert(navigator.appVersion);
|
|
||||||
if (isNav) {
|
|
||||||
if (parseFloat(navigator.appVersion)<5) {
|
|
||||||
isNav4=true;
|
|
||||||
//alert("Netscape 4.x or older");
|
|
||||||
} else {
|
|
||||||
is5up = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
isIE4_old=true;
|
|
||||||
if (navigator.appVersion.indexOf("MSIE 5")>0) {
|
|
||||||
isIE4_old = false;
|
|
||||||
is5up = true;
|
|
||||||
//alert("IE5");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function getTagById(tagId) {
|
|
||||||
var selectedTag;
|
|
||||||
if (document.all) {
|
|
||||||
selectedTag=document.all.item(tagId);
|
|
||||||
} else {
|
|
||||||
selectedTag=document.getElementById(tagId);
|
|
||||||
}
|
|
||||||
return selectedTag;
|
|
||||||
}
|
|
||||||
|
|
||||||
function switchElementDisplay( whichTag ) {
|
|
||||||
var tagToSwitch = getTagById( whichTag );
|
|
||||||
if ( tagToSwitch == null )
|
|
||||||
return;
|
|
||||||
if ( tagToSwitch.style.display == "" || tagToSwitch.style.display == "none" ) {
|
|
||||||
tagToSwitch.style.display = "block";
|
|
||||||
} else {
|
|
||||||
tagToSwitch.style.display="none";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function switchGroupDisplay( whichTag, whichToggleImage, imageDirectory ) {
|
|
||||||
var tagToSwitch = getTagById( whichTag );
|
|
||||||
if ( tagToSwitch == null )
|
|
||||||
return;
|
|
||||||
if ( imageDirectory == null ) {
|
|
||||||
imageDirectory="images";
|
|
||||||
}
|
|
||||||
var toggleIcon = getTagById( whichToggleImage );
|
|
||||||
if ( tagToSwitch.style.display == "" || tagToSwitch.style.display == "none" ) {
|
|
||||||
tagToSwitch.style.display = "block";
|
|
||||||
toggleIcon.src = imageDirectory + ((whichTag=="textblock") ? "/togglelegend.gif" : "/minus.gif");
|
|
||||||
//if ( document.all ) {
|
|
||||||
// tagToSwitch.scrollIntoView();
|
|
||||||
//}
|
|
||||||
if (whichTag != "legend" && whichTag != "themelist" && whichTag != "textblock" && whichTag != "overviewMap" ) {
|
|
||||||
closeAllButThisGroupDisplay( whichTag );
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tagToSwitch.style.display="none";
|
|
||||||
toggleIcon.src= imageDirectory + ((whichTag=="textblock") ? "/Toc.gif" : "/plus.gif");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeGroupDisplay( whichTag, whichToggleImage, imageDirectory ) {
|
|
||||||
var tagToClose = getTagById( whichTag );
|
|
||||||
if ( tagToClose == null )
|
|
||||||
return;
|
|
||||||
var toggleIcon = getTagById( whichToggleImage );
|
|
||||||
if ( tagToClose.style.display != "" && tagToClose.style.display != "none" ) {
|
|
||||||
tagToClose.style.display="none";
|
|
||||||
toggleIcon.src = imageDirectory + "/plus.gif";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeAllButThisGroupDisplay( whichTag, whichVal ) {
|
|
||||||
if ( whichTag != "layerGrp1" ) closeGroupDisplay("layerGrp1","layerGrp1Switch");
|
|
||||||
if ( whichTag != "layerGrp2" ) closeGroupDisplay("layerGrp2","layerGrp2Switch");
|
|
||||||
if ( whichTag != "layerGrp3" ) closeGroupDisplay("layerGrp3","layerGrp3Switch");
|
|
||||||
if ( whichTag != "layerGrp4" ) closeGroupDisplay("layerGrp4","layerGrp4Switch");
|
|
||||||
if ( whichTag != "layerGrp5" ) closeGroupDisplay("layerGrp5","layerGrp5Switch");
|
|
||||||
}
|
|
||||||
|
|
||||||
function initGroupDisplay( whichTag, value ) {
|
|
||||||
var tagToSet = getTagById( whichTag );
|
|
||||||
if (tagToSet == null ) {
|
|
||||||
alert("whichTag " + whichTag + " cannot be found in initGroupDisplay");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if ( value == "block" ) {
|
|
||||||
tagToSet.style.display="block";
|
|
||||||
} else {
|
|
||||||
tagToSet.style.display="none";
|
|
||||||
}
|
|
||||||
tagToSet.style.color="#6A5ACD";
|
|
||||||
}
|
|
||||||
|
|
||||||
function getGroupDisplayValue( whichTag ) {
|
|
||||||
var tagToSwitch = getTagById( whichTag );
|
|
||||||
if ( tagToSwitch == null )
|
|
||||||
return;
|
|
||||||
return tagToSwitch.style.display;
|
|
||||||
}
|
|
||||||
|
|
||||||
function onMouseOverHeading( tagToHighlight ) {
|
|
||||||
// don't do getTagById because tag does not have id: var tagToHighlight = getTagById( whichTag );
|
|
||||||
//if (tagToHighlight == null ) // leave in for Mozilla diagnostics
|
|
||||||
// return;
|
|
||||||
//thisTag.style.textDecoration = 'underline';
|
|
||||||
tagToHighlight.style.color = "#CC9933"; //<a:hover>
|
|
||||||
tagToHighlight.style.cursor="pointer";
|
|
||||||
}
|
|
||||||
|
|
||||||
function onMouseOutHeading( tagToUnHighlight ) {
|
|
||||||
// don't do this because tag does not have id: var tagToUnHighlight = getTagById( whichTag );
|
|
||||||
//if (tagToUnHighlight == null ) // leave in for Mozilla diagnostics
|
|
||||||
// return;
|
|
||||||
//tagToUnHighlight.style.textDecoration = 'none';
|
|
||||||
tagToUnHighlight.style.color = "black" //"#6A5ACD"; // <a>
|
|
||||||
tagToUnHighlight.style.cursor="pointer";
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,116 +0,0 @@
|
||||||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
|
||||||
|
|
||||||
<%@ page isThreadSafe = "false" %>
|
|
||||||
<%@ page import="java.util.*,java.lang.String.*" %>
|
|
||||||
|
|
||||||
<%
|
|
||||||
String editFormStr = (String)request.getAttribute("editform");
|
|
||||||
String editFormHeadStr = editFormStr.substring(0,editFormStr.length()-4)+".head.jsp";
|
|
||||||
%>
|
|
||||||
|
|
||||||
<%
|
|
||||||
String headerStr = (String)request.getAttribute("header");
|
|
||||||
if ( headerStr == null || (!headerStr.equalsIgnoreCase("noheader")) ) { %>
|
|
||||||
<% } %>
|
|
||||||
<jsp:useBean id="results" class="java.util.ArrayList" scope="request" />
|
|
||||||
<%
|
|
||||||
int rows = 0;
|
|
||||||
|
|
||||||
|
|
||||||
String minEditRoleStr = (String)request.getAttribute("min_edit_role");
|
|
||||||
|
|
||||||
String firstValue = "null";
|
|
||||||
Integer columnCount = (Integer)request.getAttribute("columncount");
|
|
||||||
rows = columnCount.intValue();
|
|
||||||
|
|
||||||
String clickSortStr = (String)request.getAttribute("clicksort");
|
|
||||||
|
|
||||||
if ( rows > 0 && results.size() > rows ) { // avoid divide by zero error in next statement
|
|
||||||
String suppressStr = null;
|
|
||||||
int columns = results.size() / rows;
|
|
||||||
if ( ( suppressStr = (String)request.getAttribute("suppressquery")) == null ) { // only inserted into request if true %>
|
|
||||||
<p><i><b><%= columns - 1 %></b> results were retrieved in <b><%= rows %></b> rows for query "<%=request.getAttribute("querystring")%>".</i></p>
|
|
||||||
<% }
|
|
||||||
if ( clickSortStr != null && clickSortStr.equals("true")) {
|
|
||||||
if ( columns > 2 ) { %>
|
|
||||||
<p><i>Click on the row header to sort columns by that row.</i></p>
|
|
||||||
<% }
|
|
||||||
} %>
|
|
||||||
<table border="0" cellpadding="2" cellspacing="0" width="100%">
|
|
||||||
<% String[] resultsArray = new String[results.size()]; // see Core Java Vol. 1 p.216
|
|
||||||
results.toArray( resultsArray );
|
|
||||||
firstValue = resultsArray[ rows ];
|
|
||||||
request.setAttribute("firstvalue",firstValue);
|
|
||||||
//secondValue= resultsArray[ rows + 1 ];
|
|
||||||
String classString = "";
|
|
||||||
boolean[] postQHeaderCols = new boolean[ columns ];
|
|
||||||
for ( int eachcol=0; eachcol < columns; eachcol++ ) {
|
|
||||||
postQHeaderCols[ eachcol ] = false;
|
|
||||||
}
|
|
||||||
for ( int thisrow = 0; thisrow < rows; thisrow++ ) {
|
|
||||||
//int currentPostQCol = 0;
|
|
||||||
boolean dropRow = false;
|
|
||||||
for ( int thiscol = 0; thiscol < columns; thiscol++ ) {
|
|
||||||
String thisResult= resultsArray[ (rows * thiscol) + thisrow ];
|
|
||||||
if ( thisResult.equals("+")) { /* occurs all in first row, so postQHeaderCols should be correctly initialized */
|
|
||||||
classString = "postheaderright";
|
|
||||||
postQHeaderCols[ thiscol ] = true;
|
|
||||||
//++currentPostQCol;
|
|
||||||
thisResult=" ";
|
|
||||||
} else if ( thisResult.indexOf("@@")== 0) {
|
|
||||||
classString="postheadercenter";
|
|
||||||
thisResult ="query values"; //leave as follows for diagnostics: thisResult.substring(2);
|
|
||||||
thisResult = thisResult.substring(2);
|
|
||||||
} else {
|
|
||||||
if ( postQHeaderCols[ thiscol ] == true )
|
|
||||||
classString = "postheaderright";
|
|
||||||
else if ( thiscol == 1 && thisrow < 2 )
|
|
||||||
classString = "rowbold";
|
|
||||||
else
|
|
||||||
classString = "row";
|
|
||||||
if ( thisResult.equals(""))
|
|
||||||
thisResult=" ";
|
|
||||||
}
|
|
||||||
if ( thiscol == 0 ) { // 1st column of new row
|
|
||||||
if ( thisrow > 0 ) { // first must close prior row %>
|
|
||||||
</tr>
|
|
||||||
<% if (thisResult.equals("XX")) {
|
|
||||||
dropRow = true;
|
|
||||||
} %>
|
|
||||||
<tr valign="top" class="rowvert"> <!-- okay to start even a dropRow because it will get no <td> elements -->
|
|
||||||
<% } else { %>
|
|
||||||
<tr valign="top" class="header"> <!-- okay to start even a dropRow because it will get no <td> elements -->
|
|
||||||
<% }
|
|
||||||
if ( !dropRow ) { %>
|
|
||||||
<td width="10%" class="verticalfieldlabel">
|
|
||||||
<%=thisResult%>
|
|
||||||
<% }
|
|
||||||
} else { // 2nd or higher column
|
|
||||||
if ( !dropRow ) { %>
|
|
||||||
<td class="<%=classString%>" >
|
|
||||||
<% if (thisResult.equals("XX")) { %>
|
|
||||||
<%=" "%>
|
|
||||||
<% } else { %>
|
|
||||||
<%=thisResult%>
|
|
||||||
<% }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if ( !dropRow ) { %>
|
|
||||||
</td>
|
|
||||||
<% }
|
|
||||||
}
|
|
||||||
} %>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<%
|
|
||||||
} else {
|
|
||||||
System.out.println("No results reported when " + rows + " rows and a result array size of " + results.size()); %>
|
|
||||||
No results retrieved for query "<%=request.getAttribute("querystring")%>".
|
|
||||||
<% Iterator errorIter = results.iterator();
|
|
||||||
while ( errorIter.hasNext()) {
|
|
||||||
String errorResult = (String)errorIter.next(); %>
|
|
||||||
<p>Error returned: <%= errorResult%></p>
|
|
||||||
<% }
|
|
||||||
} %>
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue