You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(10) |
Sep
(36) |
Oct
(339) |
Nov
(103) |
Dec
(152) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(141) |
Feb
(102) |
Mar
(125) |
Apr
(203) |
May
(57) |
Jun
(30) |
Jul
(139) |
Aug
(46) |
Sep
(64) |
Oct
(105) |
Nov
(34) |
Dec
(162) |
| 2007 |
Jan
(81) |
Feb
(57) |
Mar
(141) |
Apr
(72) |
May
(9) |
Jun
(1) |
Jul
(144) |
Aug
(88) |
Sep
(40) |
Oct
(43) |
Nov
(34) |
Dec
(20) |
| 2008 |
Jan
(44) |
Feb
(45) |
Mar
(16) |
Apr
(36) |
May
(8) |
Jun
(77) |
Jul
(177) |
Aug
(66) |
Sep
(8) |
Oct
(33) |
Nov
(13) |
Dec
(37) |
| 2009 |
Jan
(2) |
Feb
(5) |
Mar
(8) |
Apr
|
May
(36) |
Jun
(19) |
Jul
(46) |
Aug
(8) |
Sep
(1) |
Oct
(66) |
Nov
(61) |
Dec
(10) |
| 2010 |
Jan
(13) |
Feb
(16) |
Mar
(38) |
Apr
(76) |
May
(47) |
Jun
(32) |
Jul
(35) |
Aug
(45) |
Sep
(20) |
Oct
(61) |
Nov
(24) |
Dec
(16) |
| 2011 |
Jan
(22) |
Feb
(34) |
Mar
(11) |
Apr
(8) |
May
(24) |
Jun
(23) |
Jul
(11) |
Aug
(42) |
Sep
(81) |
Oct
(48) |
Nov
(21) |
Dec
(20) |
| 2012 |
Jan
(30) |
Feb
(25) |
Mar
(4) |
Apr
(6) |
May
(1) |
Jun
(5) |
Jul
(5) |
Aug
(8) |
Sep
(6) |
Oct
(6) |
Nov
|
Dec
|
|
From: <bra...@us...> - 2010-06-14 19:17:27
|
Revision: 3155
http://archive-access.svn.sourceforge.net/archive-access/?rev=3155&view=rev
Author: bradtofel
Date: 2010-06-14 19:17:21 +0000 (Mon, 14 Jun 2010)
Log Message:
-----------
TWEAK: form now targets "_top", "see all" now focuses on current year
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp
Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp 2010-06-05 01:26:05 UTC (rev 3154)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp 2010-06-14 19:17:21 UTC (rev 3155)
@@ -55,7 +55,8 @@
String encodedGraph = data.computeGraphString(yearFormatKey,imgWidth,imgHeight);
String graphImgUrl = graphJspPrefix + "jsp/graph.jsp?graphdata=" + encodedGraph;
// TODO: this is archivalUrl specific:
-String starLink = fmt.escapeHtml(queryPrefix + "*/" + searchUrl);
+String starLink = fmt.escapeHtml(queryPrefix + wbRequest.getReplayTimestamp() +
+ "*/" + searchUrl);
%>
<!-- BEGIN WAYBACK TOOLBAR INSERT -->
@@ -173,7 +174,7 @@
<table style="border-collapse:collapse;margin:0 auto;padding:0;width:570px;"><tbody><tr>
<td style="padding:3px 0;" colspan="2">
- <form method="get" action="<%= queryPrefix %>query" name="wmtb" id="wmtb" style="margin:0!important;padding:0!important;"><input type="text" name="<%= WaybackRequest.REQUEST_URL %>" id="wmtbURL" value="<%= searchUrlSafe %>" style="width:400px;font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;"/><input type="hidden" name="<%= WaybackRequest.REQUEST_TYPE %>" value="<%= WaybackRequest.REQUEST_CAPTURE_QUERY %>"><input type="submit" value="Go" style="font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;margin-left:5px;"/><span id="wm_tb_options" style="display:block;"></span></form>
+ <form target="_top" method="get" action="<%= queryPrefix %>query" name="wmtb" id="wmtb" style="margin:0!important;padding:0!important;"><input type="text" name="<%= WaybackRequest.REQUEST_URL %>" id="wmtbURL" value="<%= searchUrlSafe %>" style="width:400px;font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;"/><input type="hidden" name="<%= WaybackRequest.REQUEST_TYPE %>" value="<%= WaybackRequest.REQUEST_REPLAY_QUERY %>"><input type="submit" value="Go" style="font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;margin-left:5px;"/><span id="wm_tb_options" style="display:block;"></span></form>
</td>
<td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
<table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-05 01:26:12
|
Revision: 3154
http://archive-access.svn.sourceforge.net/archive-access/?rev=3154&view=rev
Author: bradtofel
Date: 2010-06-05 01:26:05 +0000 (Sat, 05 Jun 2010)
Log Message:
-----------
text change. needs to be externalized...
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp
Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp 2010-06-05 01:25:12 UTC (rev 3153)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp 2010-06-05 01:26:05 UTC (rev 3154)
@@ -41,7 +41,7 @@
}
window.setTimeout("go()",<%= secs * 1000 %>);
</script>
- <h2>Redirecting...</h2>
+ <h2>Following redirect...</h2>
<p>The URL you requested:</p>
<p><%= safeSource %></p>
<p>redirected to the URL:</p>
@@ -51,4 +51,3 @@
to that target in <%= secs %> seconds.
Click <a href="<%= safeTargetReplayUrl %>">here</a> to go now.
</p>
-
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-05 01:25:18
|
Revision: 3153
http://archive-access.svn.sourceforge.net/archive-access/?rev=3153&view=rev
Author: bradtofel
Date: 2010-06-05 01:25:12 +0000 (Sat, 05 Jun 2010)
Log Message:
-----------
renamed to "-wrap" so it gets the UI wrapper
Added Paths:
-----------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial-wrap.jsp
Removed Paths:
-------------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp
Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial-wrap.jsp (from rev 3144, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp)
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial-wrap.jsp (rev 0)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial-wrap.jsp 2010-06-05 01:25:12 UTC (rev 3153)
@@ -0,0 +1,42 @@
+<%@ page import="org.archive.wayback.webapp.AccessPoint"
+%><%@ page import="org.archive.wayback.util.StringFormatter"
+%><%
+String toUrl = request.getParameter(AccessPoint.INTERSTITIAL_TARGET);
+if(toUrl == null) {
+ response.setStatus(400);
+%>
+ Bad request. require argument <%= AccessPoint.INTERSTITIAL_TARGET %>
+<%
+} else {
+ String secsS = request.getParameter(AccessPoint.INTERSTITIAL_SECONDS);
+ int secs = 5;
+ try {
+ secs = Integer.parseInt(secsS);
+ } catch (NumberFormatException e) {
+
+ }
+ if(secs < 1) {
+ secs = 5;
+ }
+ StringFormatter f = new StringFormatter(null,null);
+ String safeTargetUrl = f.escapeHtml(toUrl);
+ String safeTargetUrlJS = f.escapeJavaScript(toUrl);
+ %>
+ <script type="text/javascript">
+ function go() {
+ document.location.href = "<%= safeTargetUrlJS %>";
+ }
+ window.setTimeout("go()",<%= secs * 1000 %>);
+ </script>
+ <p>
+ Thanks for visiting the Wayback Machine. We're about to redirect you
+ to the page you requested:
+ </p>
+ <p><%= safeTargetUrl %></p>
+ <p>
+ in <%= secs %> seconds.
+ Click <a href="<%= safeTargetUrl %>">here</a> to go now.
+ </p>
+<%
+}
+%>
\ No newline at end of file
Deleted: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp 2010-06-05 01:23:08 UTC (rev 3152)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp 2010-06-05 01:25:12 UTC (rev 3153)
@@ -1,44 +0,0 @@
-<%@ page import="org.archive.wayback.webapp.AccessPoint"
-%><%@ page import="org.archive.wayback.util.StringFormatter"
-%><%
-String toUrl = request.getParameter(AccessPoint.INTERSTITIAL_TARGET);
-if(toUrl == null) {
- response.setStatus(400);
-%>
- Bad request. require argument <%= AccessPoint.INTERSTITIAL_TARGET %>
-<%
-} else {
- String secsS = request.getParameter(AccessPoint.INTERSTITIAL_SECONDS);
- int secs = 5;
- try {
- secs = Integer.parseInt(secsS);
- } catch (NumberFormatException e) {
-
- }
- if(secs < 1) {
- secs = 5;
- }
- StringFormatter f = new StringFormatter(null,null);
- String safeTargetUrl = f.escapeHtml(toUrl);
- String safeTargetUrlJS = f.escapeJavaScript(toUrl);
- %>
- <script type="text/javascript">
- function go() {
- document.location.href = "<%= safeTargetUrlJS %>";
- }
- window.setTimeout("go()",<%= secs * 1000 %>);
- </script>
- <h2>Redirecting...</h2>
- <p>
- Thanks for visiting the Wayback Machine. We're about to redirect you
- to the page you requested:
- </p>
- <p><%= safeTargetUrl %></p>
- <p>
- in <%= secs %> seconds.
- Click <a href="<%= safeTargetUrl %>">here</a> to go now.
- </p>
-<%
-}
-%>
-<
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-05 01:23:15
|
Revision: 3152
http://archive-access.svn.sourceforge.net/archive-access/?rev=3152&view=rev
Author: bradtofel
Date: 2010-06-05 01:23:08 +0000 (Sat, 05 Jun 2010)
Log Message:
-----------
allowed configuration of the Interstitial jsp page.
changed behavior of the interstitial page to only fire if a Referer header is sent, but not from our allowed host
now static files which end in "-wrap.jsp" get the UI wrapper applied to them.
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java 2010-06-05 01:20:16 UTC (rev 3151)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java 2010-06-05 01:23:08 UTC (rev 3152)
@@ -83,7 +83,7 @@
public class AccessPoint extends AbstractRequestHandler
implements ShutdownListener {
/** webapp relative location of Interstitial.jsp */
- public final static String INTERSTITIAL_JSP = "jsp/Interstitial.jsp";
+ public final static String INTERSTITIAL_JSP = "jsp/Interstitial-wrap.jsp";
/** argument for Interstitial.jsp target URL */
public final static String INTERSTITIAL_TARGET = "target";
/** argument for Interstitial.jsp seconds to delay */
@@ -106,6 +106,7 @@
private String replayPrefix = null;
private String wrapperJsp = "/WEB-INF/template/UI-wrapper.jsp";
+ private String interstitialJsp = INTERSTITIAL_JSP;
private String refererAuth = null;
@@ -133,13 +134,13 @@
return false;
}
// String contextRelativePath = httpRequest.getServletPath();
- String translated = "/" + translateRequestPath(httpRequest);
+ String translatedNoQuery = "/" + translateRequestPath(httpRequest);
// String absPath = getServletContext().getRealPath(contextRelativePath);
- String absPath = getServletContext().getRealPath(translated);
+ String absPath = getServletContext().getRealPath(translatedNoQuery);
File test = new File(absPath);
if(test.exists()) {
- String translated2 = "/" + translateRequestPathQuery(httpRequest);
+ String translatedQ = "/" + translateRequestPathQuery(httpRequest);
WaybackRequest wbRequest = new WaybackRequest();
// wbRequest.setContextPrefix(getUrlRoot());
@@ -147,7 +148,12 @@
wbRequest.fixup(httpRequest);
UIResults uiResults = new UIResults(wbRequest,uriConverter);
try {
- uiResults.forward(httpRequest, httpResponse, translated2);
+ if(translatedNoQuery.endsWith("-wrap.jsp")) {
+ uiResults.forwardWrapped(httpRequest, httpResponse,
+ translatedQ, wrapperJsp);
+ } else {
+ uiResults.forward(httpRequest, httpResponse, translatedQ);
+ }
return true;
} catch(IOException e) {
// TODO: figure out if we got IO because of a missing dispatcher
@@ -273,16 +279,16 @@
private void checkInterstitialRedirect(HttpServletRequest httpRequest)
throws BetterRequestException {
- if(refererAuth != null) {
+ if((refererAuth != null) && (refererAuth.length() > 0)) {
String referer = httpRequest.getHeader("Referer");
- if((referer == null) || (!referer.contains(refererAuth))) {
+ if((referer != null) && (referer.length() > 0) && (!referer.contains(refererAuth))) {
StringBuffer sb = httpRequest.getRequestURL();
if(httpRequest.getQueryString() != null) {
sb.append("?").append(httpRequest.getQueryString());
}
StringBuilder u = new StringBuilder();
u.append(getQueryPrefix());
- u.append(INTERSTITIAL_JSP);
+ u.append(interstitialJsp);
u.append("?");
u.append(INTERSTITIAL_SECONDS).append("=").append(5);
u.append("&");
@@ -562,6 +568,20 @@
}
/**
+ * @param interstitialJsp the interstitialJsp to set
+ */
+ public void setInterstitialJsp(String interstitialJsp) {
+ this.interstitialJsp = interstitialJsp;
+ }
+
+ /**
+ * @return the interstitialJsp
+ */
+ public String getInterstitialJsp() {
+ return interstitialJsp;
+ }
+
+ /**
* @param urlRoot explicit URL prefix to use when creating ANY self
* referencing URLs
* @deprecated use setQueryPrefix, setReplayPrefix, setStaticPrefix
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-05 01:20:22
|
Revision: 3151
http://archive-access.svn.sourceforge.net/archive-access/?rev=3151&view=rev
Author: bradtofel
Date: 2010-06-05 01:20:16 +0000 (Sat, 05 Jun 2010)
Log Message:
-----------
Started refactoring some common ArchivalUrl code into it's own class: ArchivalUrl (finally!!)
subclassed FormRequestParser, with specialized ArchivalUrl version, which just throws a BetterRequestException to bounce the user to a "prettier" form of their request.
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java
Added Paths:
-----------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrl.java
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/ArchivalUrlFormRequestParser.java
Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrl.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrl.java (rev 0)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrl.java 2010-06-05 01:20:16 UTC (rev 3151)
@@ -0,0 +1,95 @@
+/* ArchivalUrl
+ *
+ * $Id$:
+ *
+ * Created on Jun 4, 2010.
+ *
+ * Copyright (C) 2006 Internet Archive.
+ *
+ * This file is part of Wayback.
+ *
+ * Wayback is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * any later version.
+ *
+ * Wayback is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Wayback; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+package org.archive.wayback.archivalurl;
+
+import org.archive.wayback.core.WaybackRequest;
+import org.archive.wayback.util.url.UrlOperations;
+
+/**
+ * @author brad
+ *
+ */
+public class ArchivalUrl {
+ public final static String STAR = "*";
+ private WaybackRequest wbRequest;
+// public ArchivalUrl(String path) {
+//
+// }
+ public ArchivalUrl(WaybackRequest wbRequest) {
+ this.wbRequest = wbRequest;
+ }
+
+ public String toString() {
+ if(wbRequest.isReplayRequest()) {
+ return toReplayString(wbRequest.getRequestUrl());
+ } else if(wbRequest.isCaptureQueryRequest()) {
+ return toQueryString(wbRequest.getRequestUrl());
+ }
+ return toPrefixQueryString(wbRequest.getRequestUrl());
+ }
+ public String toPrefixQueryString(String url) {
+ return toQueryString("url" + STAR);
+ }
+ public String toQueryString(String url) {
+ String datespec = STAR;
+ if((wbRequest.getStartTimestamp() != null) &&
+ (wbRequest.getEndTimestamp() != null)) {
+ datespec = String.format("%s-%s%s",
+ wbRequest.getStartTimestamp(),wbRequest.getEndTimestamp(),
+ STAR);
+ }
+ return toString(datespec,url);
+ }
+
+ public String toReplayString(String url) {
+ return toString(wbRequest.getReplayTimestamp(),url);
+ }
+
+ public String toString(String datespec, String url) {
+ StringBuilder sb =
+ new StringBuilder(url.length() + datespec.length()+10);
+ sb.append(datespec);
+ if(wbRequest.isCSSContext()) {
+ sb.append(ArchivalUrlRequestParser.CSS_CONTEXT);
+ sb.append(ArchivalUrlRequestParser.FLAG_DELIM);
+ }
+ if(wbRequest.isJSContext()) {
+ sb.append(ArchivalUrlRequestParser.JS_CONTEXT);
+ sb.append(ArchivalUrlRequestParser.FLAG_DELIM);
+ }
+ if(wbRequest.isIMGContext()) {
+ sb.append(ArchivalUrlRequestParser.IMG_CONTEXT);
+ sb.append(ArchivalUrlRequestParser.FLAG_DELIM);
+ }
+ if(wbRequest.isIdentityContext()) {
+ sb.append(ArchivalUrlRequestParser.IDENTITY_CONTEXT);
+ sb.append(ArchivalUrlRequestParser.FLAG_DELIM);
+ }
+ sb.append("/");
+ sb.append(UrlOperations.stripDefaultPortFromUrl(url));
+ return sb.toString();
+ }
+}
Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrl.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Revision Id
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java 2010-06-05 01:16:53 UTC (rev 3150)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java 2010-06-05 01:20:16 UTC (rev 3151)
@@ -25,6 +25,7 @@
package org.archive.wayback.archivalurl;
import org.archive.wayback.RequestParser;
+import org.archive.wayback.archivalurl.requestparser.ArchivalUrlFormRequestParser;
import org.archive.wayback.archivalurl.requestparser.DatelessReplayRequestParser;
import org.archive.wayback.archivalurl.requestparser.PathDatePrefixQueryRequestParser;
import org.archive.wayback.archivalurl.requestparser.PathDateRangeQueryRequestParser;
@@ -77,7 +78,7 @@
new PathPrefixDatePrefixQueryRequestParser(this),
new PathPrefixDateRangeQueryRequestParser(this),
new OpenSearchRequestParser(this),
- new FormRequestParser(this),
+ new ArchivalUrlFormRequestParser(this),
new DatelessReplayRequestParser(this)
};
return theParsers;
Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/ArchivalUrlFormRequestParser.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/ArchivalUrlFormRequestParser.java (rev 0)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/ArchivalUrlFormRequestParser.java 2010-06-05 01:20:16 UTC (rev 3151)
@@ -0,0 +1,73 @@
+/* ArchivalUrlFormRequestParser
+ *
+ * $Id$:
+ *
+ * Created on Jun 4, 2010.
+ *
+ * Copyright (C) 2006 Internet Archive.
+ *
+ * This file is part of Wayback.
+ *
+ * Wayback is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * any later version.
+ *
+ * Wayback is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Wayback; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+package org.archive.wayback.archivalurl.requestparser;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.archive.wayback.archivalurl.ArchivalUrl;
+import org.archive.wayback.core.WaybackRequest;
+import org.archive.wayback.exception.BetterRequestException;
+import org.archive.wayback.requestparser.BaseRequestParser;
+import org.archive.wayback.requestparser.FormRequestParser;
+import org.archive.wayback.webapp.AccessPoint;
+
+/**
+ * @author brad
+ *
+ */
+public class ArchivalUrlFormRequestParser extends FormRequestParser {
+ /**
+ * @param wrapped BaseRequestParser to wrap
+ */
+ public ArchivalUrlFormRequestParser(BaseRequestParser wrapped) {
+ super(wrapped);
+ }
+ public WaybackRequest parse(HttpServletRequest httpRequest,
+ AccessPoint accessPoint) throws BetterRequestException {
+ WaybackRequest wbRequest = super.parse(httpRequest, accessPoint);
+ if(wbRequest != null) {
+ String replayTimestamp = wbRequest.getReplayTimestamp();
+ if((replayTimestamp != null) && replayTimestamp.length() == 0) {
+ // lets call it a star query:
+ // TODO: should we clone?
+ wbRequest.setStartTimestamp(null);
+ wbRequest.setEndTimestamp(null);
+ }
+ String requestPath =
+ accessPoint.translateRequestPathQuery(httpRequest);
+ ArchivalUrl aUrl = new ArchivalUrl(wbRequest);
+ String bestPath = aUrl.toString();
+ if(!bestPath.equals(requestPath)) {
+ String betterURI = (wbRequest.isReplayRequest() ?
+ accessPoint.getReplayPrefix() :
+ accessPoint.getQueryPrefix())
+ + bestPath;
+ throw new BetterRequestException(betterURI);
+ }
+ }
+ return wbRequest;
+ }
+}
Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/ArchivalUrlFormRequestParser.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Revision Id
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 3150
http://archive-access.svn.sourceforge.net/archive-access/?rev=3150&view=rev
Author: bradtofel
Date: 2010-06-05 01:16:53 +0000 (Sat, 05 Jun 2010)
Log Message:
-----------
BUGFIX: added another possible CDATA with immediate comment tag to OKHeadTags
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/FastArchivalUrlReplayParseEventHandler.java
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/FastArchivalUrlReplayParseEventHandler.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/FastArchivalUrlReplayParseEventHandler.java 2010-06-05 01:15:48 UTC (rev 3149)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/FastArchivalUrlReplayParseEventHandler.java 2010-06-05 01:16:53 UTC (rev 3150)
@@ -63,9 +63,11 @@
FastArchivalUrlReplayParseEventHandler.class.toString();
private String jspInsertPath = "/WEB-INF/replay/DisclaimChooser.jsp";
+ private String commentJsp = "/WEB-INF/replay/ArchiveComment.jsp";
- private final String[] okHeadTags = { "![CDATA[*", "!DOCTYPE", "HTML", "HEAD", "BASE",
- "LINK", "META", "TITLE", "STYLE", "SCRIPT" };
+ private final String[] okHeadTags = { "![CDATA[*", "![CDATA[", "?",
+ "!DOCTYPE", "HTML", "HEAD", "BASE", "LINK", "META", "TITLE",
+ "STYLE", "SCRIPT" };
private HashMap<String, Object> okHeadTagMap = null;
private final static String FRAMESET_TAG = "FRAMESET";
private final static String BODY_TAG = "BODY";
@@ -203,6 +205,8 @@
if(orig != null) {
try {
context.setBaseUrl(new URL(orig));
+ transformAttr(context, tagNode, "HREF", anchorUrlTrans);
+
} catch (MalformedURLException e) {
e.printStackTrace();
}
@@ -326,8 +330,21 @@
}
return false;
}
- public void handleParseComplete(ParseContext context) throws IOException {
- // Nothing to do.
+ public void handleParseComplete(ParseContext pContext) throws IOException {
+ if(commentJsp != null) {
+ ReplayParseContext context = (ReplayParseContext) pContext;
+ OutputStream out = context.getOutputStream();
+ String tmp = null;
+ try {
+ tmp = context.getJspExec().jspToString(commentJsp);
+ } catch (ServletException e) {
+ e.printStackTrace();
+ }
+ if(tmp != null) {
+ Charset charset = Charset.forName(context.getOutputCharset());
+ out.write(tmp.getBytes(charset));
+ }
+ }
}
/**
@@ -343,4 +360,18 @@
public void setJspInsertPath(String jspInsertPath) {
this.jspInsertPath = jspInsertPath;
}
+
+ /**
+ * @return the commentJsp
+ */
+ public String getCommentJsp() {
+ return commentJsp;
+ }
+
+ /**
+ * @param commentJsp the commentJsp to set
+ */
+ public void setCommentJsp(String commentJsp) {
+ this.commentJsp = commentJsp;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 3149
http://archive-access.svn.sourceforge.net/archive-access/?rev=3149&view=rev
Author: bradtofel
Date: 2010-06-05 01:15:48 +0000 (Sat, 05 Jun 2010)
Log Message:
-----------
whitespace
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/DatelessReplayRequestParser.java
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/DatelessReplayRequestParser.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/DatelessReplayRequestParser.java 2010-06-05 01:15:20 UTC (rev 3148)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/DatelessReplayRequestParser.java 2010-06-05 01:15:48 UTC (rev 3149)
@@ -85,7 +85,8 @@
// ok, we're going to assume this is good:
String nowTS = Timestamp.currentTimestamp().getDateStr();
String newUrl =
- accessPoint.getUriConverter().makeReplayURI(nowTS, requestPath);
+ accessPoint.getUriConverter().makeReplayURI(nowTS,
+ requestPath);
throw new BetterRequestException(newUrl);
}
} catch(MalformedURLException e) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 3148
http://archive-access.svn.sourceforge.net/archive-access/?rev=3148&view=rev
Author: bradtofel
Date: 2010-06-05 01:15:20 +0000 (Sat, 05 Jun 2010)
Log Message:
-----------
interface: now declares it could throw a BetterRequestException
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java 2010-06-04 01:52:10 UTC (rev 3147)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java 2010-06-05 01:15:20 UTC (rev 3148)
@@ -31,6 +31,7 @@
import javax.servlet.http.HttpServletRequest;
import org.archive.wayback.core.WaybackRequest;
+import org.archive.wayback.exception.BetterRequestException;
import org.archive.wayback.util.Timestamp;
import org.archive.wayback.util.url.UrlOperations;
import org.archive.wayback.webapp.AccessPoint;
@@ -60,7 +61,7 @@
* WaybackRequest object, except the Submit button argument.
*/
public WaybackRequest parse(HttpServletRequest httpRequest,
- AccessPoint accessPoint) {
+ AccessPoint accessPoint) throws BetterRequestException {
WaybackRequest wbRequest = null;
@SuppressWarnings("unchecked")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-04 01:52:17
|
Revision: 3147
http://archive-access.svn.sourceforge.net/archive-access/?rev=3147&view=rev
Author: bradtofel
Date: 2010-06-04 01:52:10 +0000 (Fri, 04 Jun 2010)
Log Message:
-----------
Deprecated
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AnnotationExceptionRenderer.java
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/CustomNotInArchiveExceptionRenderer.java
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AnnotationExceptionRenderer.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AnnotationExceptionRenderer.java 2010-06-03 23:31:35 UTC (rev 3146)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AnnotationExceptionRenderer.java 2010-06-04 01:52:10 UTC (rev 3147)
@@ -39,6 +39,7 @@
*
* @author brad
* @version $Date$, $Revision$
+ * @deprecated
*/
public class AnnotationExceptionRenderer extends BaseExceptionRenderer {
private AccessControlClient client = null;
@@ -47,17 +48,17 @@
public void init() {
client = new AccessControlClient(oracleUrl);
}
- public String getExceptionHandler(HttpServletRequest httpRequest,
- HttpServletResponse httpResponse, WaybackRequest wbRequest,
- WaybackException exception) {
- // the "standard HTML" response handler:
- String jspPath = getCustomHandler(exception,wbRequest);
- if(jspPath == null) {
- jspPath = super.getExceptionHandler(httpRequest, httpResponse,
- wbRequest, exception);
- }
- return jspPath;
- }
+// public String getExceptionHandler(HttpServletRequest httpRequest,
+// HttpServletResponse httpResponse, WaybackRequest wbRequest,
+// WaybackException exception) {
+// // the "standard HTML" response handler:
+// String jspPath = getCustomHandler(exception,wbRequest);
+// if(jspPath == null) {
+// jspPath = super.getExceptionHandler(httpRequest, httpResponse,
+// wbRequest, exception);
+// }
+// return jspPath;
+// }
private String getCustomHandler(WaybackException e, WaybackRequest wbRequest) {
String jspPath = null;
@@ -84,6 +85,7 @@
}
return null;
}
+
/**
* @return the client
*/
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/CustomNotInArchiveExceptionRenderer.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/CustomNotInArchiveExceptionRenderer.java 2010-06-03 23:31:35 UTC (rev 3146)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/CustomNotInArchiveExceptionRenderer.java 2010-06-04 01:52:10 UTC (rev 3147)
@@ -38,22 +38,23 @@
*
* @author brad
* @version $Date$, $Revision$
+ * @deprecated
*/
public class CustomNotInArchiveExceptionRenderer extends BaseExceptionRenderer {
private HashMap<String,Object> hosts = null;
private String jspHandler = null;
- public String getExceptionHandler(HttpServletRequest httpRequest,
- HttpServletResponse httpResponse, WaybackRequest wbRequest,
- WaybackException exception) {
- String jspPath = getCustomHandler(exception,wbRequest);
- if(jspPath == null) {
- jspPath = super.getExceptionHandler(httpRequest, httpResponse,
- wbRequest, exception);
- }
- return jspPath;
- }
+// public String getExceptionHandler(HttpServletRequest httpRequest,
+// HttpServletResponse httpResponse, WaybackRequest wbRequest,
+// WaybackException exception) {
+// String jspPath = getCustomHandler(exception,wbRequest);
+// if(jspPath == null) {
+// jspPath = super.getExceptionHandler(httpRequest, httpResponse,
+// wbRequest, exception);
+// }
+// return jspPath;
+// }
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-03 23:31:41
|
Revision: 3146
http://archive-access.svn.sourceforge.net/archive-access/?rev=3146&view=rev
Author: bradtofel
Date: 2010-06-03 23:31:35 +0000 (Thu, 03 Jun 2010)
Log Message:
-----------
TWEAKS: now uses jQuery(temporarily) to calculate the offset of the mouseover sparkline, being robust against different HTML doctypes.. Minor other whitespace and comment updates
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp
Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp 2010-06-03 22:19:29 UTC (rev 3145)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp 2010-06-03 23:31:35 UTC (rev 3146)
@@ -57,8 +57,11 @@
// TODO: this is archivalUrl specific:
String starLink = fmt.escapeHtml(queryPrefix + "*/" + searchUrl);
%>
-<!-- BEGIN WAYBACK TIMELINE DISCLAIMER INSERT -->
+<!-- BEGIN WAYBACK TOOLBAR INSERT -->
+
+<script type="text/javascript" src="<%= staticPrefix %>js/disclaim-element.js" ></script>
<script type="text/javascript" src="<%= staticPrefix %>js/graph-calc.js" ></script>
+<script type="text/javascript" src="<%= staticPrefix %>jflot/jquery.min.js" ></script>
<script type="text/javascript">
var firstDate = <%= firstYearDate.getTime() %>;
var lastDate = <%= lastYearDate.getTime() %>;
@@ -98,13 +101,25 @@
document.getElementById("wbMouseTrackMonthImg").style.display = val;
trackerVal = val;
}
-
+function getElementX2(obj) {
+ var thing = jQuery(obj);
+ if((thing == undefined)
+ || (typeof thing == "undefined")
+ || (typeof thing.offset == "undefined")) {
+ return getElementX(obj);
+ }
+ return Math.round(thing.offset().left);
+}
function trackMouseMove(event,element) {
var eventX = getEventX(event);
- var elementX = getElementX(element) + 6; // why 6?!?
+ var elementX = getElementX2(element);
var xOff = eventX - elementX;
-
+ if(xOff < 0) {
+ xOff = 0;
+ } else if(xOff > imgWidth) {
+ xOff = imgWidth;
+ }
var monthOff = xOff % yearImgWidth;
var year = Math.floor(xOff / yearImgWidth);
@@ -128,27 +143,27 @@
document.getElementById("displayYearEl").innerHTML = year + 1996;
document.getElementById("displayMonthEl").innerHTML = monthString;
// looks too jarring when it changes..
- //document.getElementById("displayDayEl").innerHTML = day;
+ //document.getElementById("displayDayEl").innerHTML = zeroPad(day,2);
var url = wbPrefix + dateString + '/' + wbCurrentUrl;
document.getElementById('wm-graph-anchor').href = url;
- //document.getElementById("wmtbURL").value="xO("+xOff+") y("+year+") m("+month+") monthOff("+monthOff+") DS("+dateString+") Moy("+monthOfYear+") ms("+monthString+")";
+ //document.getElementById("wmtbURL").value="evX("+eventX+") elX("+elementX+") xO("+xOff+") y("+year+") m("+month+") monthOff("+monthOff+") DS("+dateString+") Moy("+monthOfYear+") ms("+monthString+")";
if(curYear != year) {
- document.getElementById("wbMouseTrackYearImg").style.left = year * yearImgWidth;
+ var yrOff = year * yearImgWidth;
+ document.getElementById("wbMouseTrackYearImg").style.left = yrOff + "px";
curYear = year;
}
if(curMonth != month) {
- document.getElementById("wbMouseTrackMonthImg").style.left = year + (month * monthImgWidth) + 1;
+ var mtOff = year + (month * monthImgWidth) + 1;
+ document.getElementById("wbMouseTrackMonthImg").style.left = mtOff + "px";
curMonth = month;
}
}
-
</script>
-
<style type="text/css">body{margin-top:0!important;padding-top:0!important;min-width:800px!important;}#wm-ipp a:hover{text-decoration:underline!important;}</style>
-<div id="wm-ipp" style="display:none; position:relative;padding:0 5px;min-height:70px;min-width:800px;">
+<div id="wm-ipp" style="display:none; position:relative;padding:0 5px;min-height:70px;min-width:800px; z-index:9000;">
<div id="wm-ipp-inside" style="position:fixed;padding:0!important;margin:0!important;width:97%;min-width:780px;border:5px solid #000;border-top:none;background-image:url(<%= staticPrefix %>images/toolbar/wm_tb_bk_trns.png);text-align:center;-moz-box-shadow:1px 1px 3px #333;-webkit-box-shadow:1px 1px 3px #333;box-shadow:1px 1px 3px #333;font-size:11px!important;font-family:'Lucida Grande','Arial',sans-serif!important;">
<table style="border-collapse:collapse;margin:0;padding:0;width:100%;"><tbody><tr>
<td style="padding:10px;vertical-align:top;min-width:140px;">
@@ -158,7 +173,7 @@
<table style="border-collapse:collapse;margin:0 auto;padding:0;width:570px;"><tbody><tr>
<td style="padding:3px 0;" colspan="2">
- <form method="get" action="<%= queryPrefix %>jsp/bounceToReplay.jsp" name="wmtb" id="wmtb" style="margin:0!important;padding:0!important;"><input type="text" name="wmtbURL" id="wmtbURL" value="<%= searchUrlSafe %>" style="width:400px;font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;"/><input type="submit" value="Go" style="font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;margin-left:5px;"/><span id="wm_tb_options" style="display:block;"></span></form>
+ <form method="get" action="<%= queryPrefix %>query" name="wmtb" id="wmtb" style="margin:0!important;padding:0!important;"><input type="text" name="<%= WaybackRequest.REQUEST_URL %>" id="wmtbURL" value="<%= searchUrlSafe %>" style="width:400px;font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;"/><input type="hidden" name="<%= WaybackRequest.REQUEST_TYPE %>" value="<%= WaybackRequest.REQUEST_CAPTURE_QUERY %>"><input type="submit" value="Go" style="font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;margin-left:5px;"/><span id="wm_tb_options" style="display:block;"></span></form>
</td>
<td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
<table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
@@ -196,7 +211,7 @@
<%
if(data.monthPrevResult == null) {
%>
- <%= fmt.format("ToolBar.noPrevMonthText",data.addMonth(data.curResult.getCaptureDate(),-1)) %>
+ <%= fmt.format("ToolBar.noPrevMonthText",ToolBarData.addMonth(data.curResult.getCaptureDate(),-1)) %>
<%
} else {
%>
@@ -210,7 +225,7 @@
<%
if(data.monthNextResult == null) {
%>
- <%= fmt.format("ToolBar.noNextMonthText",data.addMonth(data.curResult.getCaptureDate(),1)) %>
+ <%= fmt.format("ToolBar.noNextMonthText",ToolBarData.addMonth(data.curResult.getCaptureDate(),1)) %>
<%
} else {
%>
@@ -262,7 +277,7 @@
<td style="padding:0!important;">
<a style="position:relative; white-space:nowrap; width:<%= imgWidth %>px;height:<%= imgHeight %>px;" href="" id="wm-graph-anchor">
<div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:<%= imgWidth %>px;height:<%= imgHeight %>px;background-color:#fff;cursor:pointer;" title="<%= fmt.format("ToolBar.sparklineTitle") %>">
- <img style="position:absolute; z-index:12; top:0px; left:0px;"
+ <img id="sparklineImgId" style="position:absolute; z-index:9012; top:0px; left:0px;"
onmouseover="showTrackers('inline');"
onmouseout="showTrackers('none');"
onmousemove="trackMouseMove(event,this)"
@@ -272,13 +287,13 @@
border="0"
src="<%= graphImgUrl %>"></img>
<img id="wbMouseTrackYearImg"
- style="display:none; position:absolute; z-index:10;"
+ style="display:none; position:absolute; z-index:9010;"
width="<%= yearWidth %>"
height="<%= imgHeight %>"
border="0"
src="<%= staticPrefix %>images/toolbar/transp-yellow-pixel.png"></img>
<img id="wbMouseTrackMonthImg"
- style="display:none; position:absolute; z-index:11; "
+ style="display:none; position:absolute; z-index:9011; "
width="<%= monthWidth %>"
height="<%= imgHeight %>"
border="0"
@@ -297,32 +312,11 @@
</div>
</div>
-
-<script type="text/javascript" src="<%= staticPrefix %>js/disclaim-element.js" ></script>
<script type="text/javascript">
var wmDisclaimBanner = document.getElementById("wm-ipp");
if(wmDisclaimBanner != null) {
disclaimElement(wmDisclaimBanner);
}
</script>
-<!-- END WAYBACK TIMELINE DISCLAIMER INSERT -->
+<!-- END WAYBACK TOOLBAR INSERT -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 3145
http://archive-access.svn.sourceforge.net/archive-access/?rev=3145&view=rev
Author: bradtofel
Date: 2010-06-03 22:19:29 +0000 (Thu, 03 Jun 2010)
Log Message:
-----------
BUGFIX(ACC-97): now silently remaps iso-8859-1 to cp1252.
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java 2010-06-01 22:03:23 UTC (rev 3144)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java 2010-06-03 22:19:29 UTC (rev 3145)
@@ -36,6 +36,13 @@
import org.archive.wayback.replay.TagMagix;
import org.mozilla.universalchardet.UniversalDetector;
+/**
+ * Abstract class containing common methods for determining the character
+ * encoding of a text Resource, most of which should be refactored into a
+ * Util package.
+ * @author brad
+ *
+ */
public abstract class CharsetDetector {
// hand off this many bytes to the chardet library
protected final static int MAX_CHARSET_READAHEAD = 65536;
@@ -43,6 +50,7 @@
protected final static String CHARSET_TOKEN = "charset=";
// ...and if the chardet library fails, use the Content-Type header
protected final static String HTTP_CONTENT_TYPE_HEADER = "Content-Type";
+ /** the default charset name to use when giving up */
public final static String DEFAULT_CHARSET = "UTF-8";
protected boolean isCharsetSupported(String charsetName) {
@@ -57,7 +65,13 @@
return false;
}
}
-
+ protected String mapCharset(String orig) {
+ String lc = orig.toLowerCase();
+ if(lc.contains("iso8859-1") || lc.contains("iso-8859-1")) {
+ return "cp1252";
+ }
+ return orig;
+ }
protected String contentTypeToCharset(final String contentType) {
int offset =
contentType.toUpperCase().indexOf(CHARSET_TOKEN.toUpperCase());
@@ -65,7 +79,7 @@
if (offset != -1) {
String cs = contentType.substring(offset + CHARSET_TOKEN.length());
if(isCharsetSupported(cs)) {
- return cs;
+ return mapCharset(cs);
}
// test for extra spaces... there's at least one page out there that
// indicates it's charset with:
@@ -74,7 +88,7 @@
// bad web page!
if(isCharsetSupported(cs.replace(" ", ""))) {
- return cs.replace(" ", "");
+ return mapCharset(cs.replace(" ", ""));
}
}
return null;
@@ -168,6 +182,13 @@
}
return null;
}
+ /**
+ * @param resource (presumably text) Resource to determine the charset
+ * @param request WaybackRequest which may contain additional hints to
+ * processing
+ * @return String charset name for the Resource
+ * @throws IOException if there are problems reading the Resource
+ */
public abstract String getCharset(Resource resource, WaybackRequest request)
throws IOException;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-01 22:03:29
|
Revision: 3144
http://archive-access.svn.sourceforge.net/archive-access/?rev=3144&view=rev
Author: bradtofel
Date: 2010-06-01 22:03:23 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
New template system uses a single wrapper, which includes content from a delegate .jsp
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp
Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp 2010-06-01 21:46:15 UTC (rev 3143)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/jsp/Interstitial.jsp 2010-06-01 22:03:23 UTC (rev 3144)
@@ -1,17 +1,11 @@
-<%@
-page import="org.archive.wayback.webapp.AccessPoint"
-%><%@
-page import="org.archive.wayback.util.StringFormatter"
+<%@ page import="org.archive.wayback.webapp.AccessPoint"
+%><%@ page import="org.archive.wayback.util.StringFormatter"
%><%
String toUrl = request.getParameter(AccessPoint.INTERSTITIAL_TARGET);
if(toUrl == null) {
response.setStatus(400);
%>
-<html>
- <body>
Bad request. require argument <%= AccessPoint.INTERSTITIAL_TARGET %>
- </body>
-</html>
<%
} else {
String secsS = request.getParameter(AccessPoint.INTERSTITIAL_SECONDS);
@@ -28,7 +22,6 @@
String safeTargetUrl = f.escapeHtml(toUrl);
String safeTargetUrlJS = f.escapeJavaScript(toUrl);
%>
-<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" />
<script type="text/javascript">
function go() {
document.location.href = "<%= safeTargetUrlJS %>";
@@ -45,7 +38,6 @@
in <%= secs %> seconds.
Click <a href="<%= safeTargetUrl %>">here</a> to go now.
</p>
-jsp:include page="/WEB-INF/template/UI-footer.jsp" flush="true" />
<%
}
%>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-01 21:46:21
|
Revision: 3143
http://archive-access.svn.sourceforge.net/archive-access/?rev=3143&view=rev
Author: bradtofel
Date: 2010-06-01 21:46:15 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
New transparent logo
Added Paths:
-----------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/wayback_logo_tr.gif
Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/wayback_logo_tr.gif
===================================================================
(Binary files differ)
Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/wayback_logo_tr.gif
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 3142
http://archive-access.svn.sourceforge.net/archive-access/?rev=3142&view=rev
Author: bradtofel
Date: 2010-06-01 20:03:38 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
New template system uses a single wrapper, which includes content from a delegate .jsp
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java 2010-06-01 20:01:58 UTC (rev 3141)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java 2010-06-01 20:03:38 UTC (rev 3142)
@@ -102,16 +102,19 @@
return (requestUrl != null) && requestUrl.endsWith(".css");
}
- public String getExceptionHandler(HttpServletRequest httpRequest,
+ public void renderException(HttpServletRequest httpRequest,
HttpServletResponse httpResponse, WaybackRequest wbRequest,
- WaybackException exception) {
- // the "standard HTML" response handler:
- String jspPath = errorJsp;
+ WaybackException exception, ResultURIConverter uriConverter)
+ throws ServletException, IOException {
+ httpRequest.setAttribute("exception", exception);
+ UIResults uiResults = new UIResults(wbRequest,uriConverter,exception);
+ boolean handled = false;
if(!wbRequest.isReplayRequest()) {
if(wbRequest.isXMLMode()) {
- jspPath = xmlErrorJsp;
+ uiResults.forward(httpRequest, httpResponse, xmlErrorJsp);
+ handled = true;
}
} else if (requestIsEmbedded(httpRequest, wbRequest)) {
@@ -119,40 +122,31 @@
// try to not cause client errors by sending the HTML response if
// this request is ebedded, and is obviously one of the special
// types:
+ handled = true;
-
if (requestIsJavascript(httpRequest, wbRequest)) {
- jspPath = javascriptErrorJsp;
+ uiResults.forward(httpRequest, httpResponse,
+ javascriptErrorJsp);
} else if (requestIsCSS(httpRequest, wbRequest)) {
- jspPath = cssErrorJsp;
+ uiResults.forward(httpRequest, httpResponse, cssErrorJsp);
} else if (requestIsImage(httpRequest, wbRequest)) {
- jspPath = imageErrorJsp;
+ uiResults.forward(httpRequest, httpResponse, imageErrorJsp);
+ } else {
+ handled = false;
}
}
- return jspPath;
+ if(!handled) {
+ uiResults.forwardWrapped(httpRequest, httpResponse,
+ errorJsp, wbRequest.getAccessPoint().getWrapperJsp());
+ }
}
- /* (non-Javadoc)
- * @see org.archive.wayback.ExceptionRenderer#renderException(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, org.archive.wayback.core.WaybackRequest, org.archive.wayback.exception.WaybackException)
- */
- public void renderException(HttpServletRequest httpRequest,
- HttpServletResponse httpResponse, WaybackRequest wbRequest,
- WaybackException exception, ResultURIConverter uriConverter)
- throws ServletException, IOException {
- String jspPath = getExceptionHandler(httpRequest, httpResponse,
- wbRequest, exception);
-
- httpRequest.setAttribute("exception", exception);
- UIResults uiResults = new UIResults(wbRequest,uriConverter,exception);
- uiResults.forward(httpRequest, httpResponse, jspPath);
- }
-
public String getErrorJsp() {
return errorJsp;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-01 20:02:07
|
Revision: 3141
http://archive-access.svn.sourceforge.net/archive-access/?rev=3141&view=rev
Author: bradtofel
Date: 2010-06-01 20:01:58 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
Whitespace cleanup
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp
Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp 2010-06-01 19:54:00 UTC (rev 3140)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp 2010-06-01 20:01:58 UTC (rev 3141)
@@ -1,54 +1,29 @@
-<%@
- page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"
- %><%@
- page import="java.util.Iterator"
- %><%@
- page import="java.util.ArrayList"
- %><%@
- page import="java.util.Date"
- %><%@
- page import="java.util.Calendar"
- %><%@
- page import="java.util.List"
- %><%@
- page import="java.text.ParseException"
- %><%@
- page import="org.archive.wayback.ResultURIConverter"
- %><%@
- page import="org.archive.wayback.WaybackConstants"
- %><%@
- page import="org.archive.wayback.core.CaptureSearchResult"
- %><%@
- page import="org.archive.wayback.core.CaptureSearchResults"
- %><%@
- page import="org.archive.wayback.core.UIResults"
- %><%@
- page import="org.archive.wayback.core.WaybackRequest"
- %><%@
- page import="org.archive.wayback.partition.CaptureSearchResultPartitionMap"
- %><%@
- page import="org.archive.wayback.partition.PartitionPartitionMap"
- %><%@
- page import="org.archive.wayback.partition.PartitionsToGraph"
- %><%@
- page import="org.archive.wayback.partition.ToolBarData"
- %><%@
- page import="org.archive.wayback.util.graph.Graph"
- %><%@
- page import="org.archive.wayback.util.graph.GraphEncoder"
- %><%@
- page import="org.archive.wayback.util.graph.GraphRenderer"
- %><%@
- page import="org.archive.wayback.util.partition.Partition"
- %><%@
- page import="org.archive.wayback.util.partition.Partitioner"
- %><%@
- page import="org.archive.wayback.util.partition.PartitionSize"
- %><%@
- page import="org.archive.wayback.util.StringFormatter"
- %><%@
- page import="org.archive.wayback.util.url.UrlOperations"
- %><%
+<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"
+%><%@ page import="java.util.Iterator"
+%><%@ page import="java.util.ArrayList"
+%><%@ page import="java.util.Date"
+%><%@ page import="java.util.Calendar"
+%><%@ page import="java.util.List"
+%><%@ page import="java.text.ParseException"
+%><%@ page import="org.archive.wayback.ResultURIConverter"
+%><%@ page import="org.archive.wayback.WaybackConstants"
+%><%@ page import="org.archive.wayback.core.CaptureSearchResult"
+%><%@ page import="org.archive.wayback.core.CaptureSearchResults"
+%><%@ page import="org.archive.wayback.core.UIResults"
+%><%@ page import="org.archive.wayback.core.WaybackRequest"
+%><%@ page import="org.archive.wayback.partition.CaptureSearchResultPartitionMap"
+%><%@ page import="org.archive.wayback.partition.PartitionPartitionMap"
+%><%@ page import="org.archive.wayback.partition.PartitionsToGraph"
+%><%@ page import="org.archive.wayback.partition.ToolBarData"
+%><%@ page import="org.archive.wayback.util.graph.Graph"
+%><%@ page import="org.archive.wayback.util.graph.GraphEncoder"
+%><%@ page import="org.archive.wayback.util.graph.GraphRenderer"
+%><%@ page import="org.archive.wayback.util.partition.Partition"
+%><%@ page import="org.archive.wayback.util.partition.Partitioner"
+%><%@ page import="org.archive.wayback.util.partition.PartitionSize"
+%><%@ page import="org.archive.wayback.util.StringFormatter"
+%><%@ page import="org.archive.wayback.util.url.UrlOperations"
+%><%
UIResults results = UIResults.extractReplay(request);
WaybackRequest wbRequest = results.getWbRequest();
ResultURIConverter uriConverter = results.getURIConverter();
@@ -192,11 +167,11 @@
<%
if(data.prevResult == null) {
%>
- <img src="<%= staticPrefix %>images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0"/>
+ <img src="<%= staticPrefix %>images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0" />
<%
} else {
%>
- <a href="<%= data.makeReplayURL(data.prevResult) %>" title="<%= fmt.format("ToolBar.prevTitle",data.prevResult.getCaptureDate()) %>"><img src="<%= staticPrefix %>images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0"/></a>
+ <a href="<%= data.makeReplayURL(data.prevResult) %>" title="<%= fmt.format("ToolBar.prevTitle",data.prevResult.getCaptureDate()) %>"><img src="<%= staticPrefix %>images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0" /></a>
<%
}
%>
@@ -251,7 +226,7 @@
<%
if(data.yearPrevResult == null) {
%>
- <%= fmt.format("ToolBar.noPrevYearText",data.addYear(data.curResult.getCaptureDate(),-1)) %>
+ <%= fmt.format("ToolBar.noPrevYearText",ToolBarData.addYear(data.curResult.getCaptureDate(),-1)) %>
<%
} else {
%>
@@ -265,7 +240,7 @@
<%
if(data.yearNextResult == null) {
%>
- <%= fmt.format("ToolBar.noNextYearText",data.addYear(data.curResult.getCaptureDate(),1)) %>
+ <%= fmt.format("ToolBar.noNextYearText",ToolBarData.addYear(data.curResult.getCaptureDate(),1)) %>
<%
} else {
%>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-01 19:54:09
|
Revision: 3140
http://archive-access.svn.sourceforge.net/archive-access/?rev=3140&view=rev
Author: bradtofel
Date: 2010-06-01 19:54:00 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
New template system uses a single wrapper, which includes content from a delegate .jsp
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/CalendarResults.jsp
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLCaptureResults.jsp
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLUrlResults.jsp
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp
Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/CalendarResults.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/CalendarResults.jsp 2010-06-01 19:43:08 UTC (rev 3139)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/CalendarResults.jsp 2010-06-01 19:54:00 UTC (rev 3140)
@@ -1,22 +1,21 @@
-<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%>
-<%@ page import="java.util.List" %>
-<%@ page import="java.util.ArrayList" %>
-<%@ page import="java.util.Date" %>
-<%@ page import="java.util.Iterator" %>
-<%@ page import="java.text.ParseException" %>
-<%@ page import="org.archive.wayback.WaybackConstants" %>
-<%@ page import="org.archive.wayback.core.CaptureSearchResult" %>
-<%@ page import="org.archive.wayback.core.CaptureSearchResults" %>
-<%@ page import="org.archive.wayback.core.UIResults" %>
-<%@ page import="org.archive.wayback.core.WaybackRequest" %>
-<%@ page import="org.archive.wayback.partition.CaptureSearchResultPartitionMap" %>
-<%@ page import="org.archive.wayback.util.partition.Partition" %>
-<%@ page import="org.archive.wayback.util.partition.Partitioner" %>
-<%@ page import="org.archive.wayback.util.partition.PartitionSize" %>
-<%@ page import="org.archive.wayback.util.StringFormatter" %>
-<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" />
-<jsp:include page="/WEB-INF/template/CookieJS.jsp" flush="true" />
-<%
+<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"
+%><%@ page import="java.util.List"
+%><%@ page import="java.util.ArrayList"
+%><%@ page import="java.util.Date"
+%><%@ page import="java.util.Iterator"
+%><%@ page import="java.text.ParseException"
+%><%@ page import="org.archive.wayback.WaybackConstants"
+%><%@ page import="org.archive.wayback.core.CaptureSearchResult"
+%><%@ page import="org.archive.wayback.core.CaptureSearchResults"
+%><%@ page import="org.archive.wayback.core.UIResults"
+%><%@ page import="org.archive.wayback.core.WaybackRequest"
+%><%@ page import="org.archive.wayback.partition.CaptureSearchResultPartitionMap"
+%><%@ page import="org.archive.wayback.util.partition.Partition"
+%><%@ page import="org.archive.wayback.util.partition.Partitioner"
+%><%@ page import="org.archive.wayback.util.partition.PartitionSize"
+%><%@ page import="org.archive.wayback.util.StringFormatter"
+%><jsp:include page="/WEB-INF/template/CookieJS.jsp" flush="true" /><%
+
UIResults results = UIResults.extractCaptureQuery(request);
WaybackRequest wbRequest = results.getWbRequest();
@@ -203,5 +202,4 @@
}
}
}
-%>
-<jsp:include page="/WEB-INF/template/UI-footer.jsp" flush="true" />
+%>
\ No newline at end of file
Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLCaptureResults.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLCaptureResults.jsp 2010-06-01 19:43:08 UTC (rev 3139)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLCaptureResults.jsp 2010-06-01 19:54:00 UTC (rev 3140)
@@ -1,15 +1,14 @@
-<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%>
-<%@ page import="java.util.Iterator" %>
-<%@ page import="java.util.ArrayList" %>
-<%@ page import="java.util.Date" %>
-<%@ page import="org.archive.wayback.WaybackConstants" %>
-<%@ page import="org.archive.wayback.core.CaptureSearchResult" %>
-<%@ page import="org.archive.wayback.core.CaptureSearchResults" %>
-<%@ page import="org.archive.wayback.core.UIResults" %>
-<%@ page import="org.archive.wayback.core.WaybackRequest" %>
-<%@ page import="org.archive.wayback.util.StringFormatter" %>
-<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" />
-<%
+<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"
+%><%@ page import="java.util.Iterator"
+%><%@ page import="java.util.ArrayList"
+%><%@ page import="java.util.Date"
+%><%@ page import="org.archive.wayback.WaybackConstants"
+%><%@ page import="org.archive.wayback.core.CaptureSearchResult"
+%><%@ page import="org.archive.wayback.core.CaptureSearchResults"
+%><%@ page import="org.archive.wayback.core.UIResults"
+%><%@ page import="org.archive.wayback.core.WaybackRequest"
+%><%@ page import="org.archive.wayback.util.StringFormatter"
+%><%
UIResults results = UIResults.extractCaptureQuery(request);
WaybackRequest wbRequest = results.getWbRequest();
@@ -113,6 +112,4 @@
}
}
}
-%>
-
-<jsp:include page="/WEB-INF/template/UI-footer.jsp" flush="true" />
+%>
\ No newline at end of file
Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLUrlResults.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLUrlResults.jsp 2010-06-01 19:43:08 UTC (rev 3139)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLUrlResults.jsp 2010-06-01 19:54:00 UTC (rev 3140)
@@ -1,17 +1,15 @@
-<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%>
-<%@ page import="java.util.Iterator" %>
-<%@ page import="java.util.ArrayList" %>
-<%@ page import="java.util.Date" %>
-<%@ page import="org.archive.wayback.ResultURIConverter" %>
-<%@ page import="org.archive.wayback.WaybackConstants" %>
-<%@ page import="org.archive.wayback.core.UIResults" %>
-<%@ page import="org.archive.wayback.core.UrlSearchResult" %>
-<%@ page import="org.archive.wayback.core.UrlSearchResults" %>
-<%@ page import="org.archive.wayback.core.WaybackRequest" %>
-<%@ page import="org.archive.wayback.util.StringFormatter" %>
-<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" />
-<%
-
+<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"
+%><%@ page import="java.util.Iterator"
+%><%@ page import="java.util.ArrayList"
+%><%@ page import="java.util.Date"
+%><%@ page import="org.archive.wayback.ResultURIConverter"
+%><%@ page import="org.archive.wayback.WaybackConstants"
+%><%@ page import="org.archive.wayback.core.UIResults"
+%><%@ page import="org.archive.wayback.core.UrlSearchResult"
+%><%@ page import="org.archive.wayback.core.UrlSearchResults"
+%><%@ page import="org.archive.wayback.core.WaybackRequest"
+%><%@ page import="org.archive.wayback.util.StringFormatter"
+%><%
UIResults results = UIResults.extractUrlQuery(request);
WaybackRequest wbRequest = results.getWbRequest();
UrlSearchResults uResults = results.getUrlResults();
@@ -111,6 +109,4 @@
}
}
}
-%>
-
-<jsp:include page="/WEB-INF/template/UI-footer.jsp" flush="true" />
+%>
\ No newline at end of file
Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp 2010-06-01 19:43:08 UTC (rev 3139)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp 2010-06-01 19:54:00 UTC (rev 3140)
@@ -1,13 +1,13 @@
-<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%>
-<%@ page import="java.util.Date" %>
-<%@ page import="java.lang.StringBuffer" %>
-<%@ page import="org.archive.wayback.archivalurl.ArchivalUrlDateRedirectReplayRenderer" %>
-<%@ page import="org.archive.wayback.ResultURIConverter" %>
-<%@ page import="org.archive.wayback.core.UIResults" %>
-<%@ page import="org.archive.wayback.core.WaybackRequest" %>
-<%@ page import="org.archive.wayback.core.CaptureSearchResult" %>
-<%@ page import="org.archive.wayback.util.StringFormatter" %>
-<%
+<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"
+%><%@ page import="java.util.Date"
+%><%@ page import="java.lang.StringBuffer"
+%><%@ page import="org.archive.wayback.archivalurl.ArchivalUrlDateRedirectReplayRenderer"
+%><%@ page import="org.archive.wayback.ResultURIConverter"
+%><%@ page import="org.archive.wayback.core.UIResults"
+%><%@ page import="org.archive.wayback.core.WaybackRequest"
+%><%@ page import="org.archive.wayback.core.CaptureSearchResult"
+%><%@ page import="org.archive.wayback.util.StringFormatter"
+%><%
UIResults results = UIResults.extractReplay(request);
WaybackRequest wbr = results.getWbRequest();
@@ -35,7 +35,6 @@
int secs = 5;
%>
-<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" />
<script type="text/javascript">
function go() {
document.location.href = "<%= safeTargetReplayUrlJS %>";
@@ -52,5 +51,4 @@
to that target in <%= secs %> seconds.
Click <a href="<%= safeTargetReplayUrl %>">here</a> to go now.
</p>
-<jsp:include page="/WEB-INF/template/UI-footer.jsp" flush="true" />
-
\ No newline at end of file
+
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-01 19:43:14
|
Revision: 3139
http://archive-access.svn.sourceforge.net/archive-access/?rev=3139&view=rev
Author: bradtofel
Date: 2010-06-01 19:43:08 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
static images used in Toolbar.jsp
Added Paths:
-----------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/transp-red-pixel.png
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/transp-yellow-pixel.png
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wayback-toolbar-logo.png
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_bk_trns.png
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_close.png
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_help.png
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_nxt_on.png
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_prv_on.png
Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/transp-red-pixel.png
===================================================================
(Binary files differ)
Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/transp-red-pixel.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/transp-yellow-pixel.png
===================================================================
(Binary files differ)
Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/transp-yellow-pixel.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wayback-toolbar-logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wayback-toolbar-logo.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_bk_trns.png
===================================================================
(Binary files differ)
Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_bk_trns.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_close.png
===================================================================
(Binary files differ)
Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_close.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_help.png
===================================================================
(Binary files differ)
Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_help.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_nxt_on.png
===================================================================
(Binary files differ)
Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_nxt_on.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_prv_on.png
===================================================================
(Binary files differ)
Property changes on: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/images/toolbar/wm_tb_prv_on.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-01 19:42:13
|
Revision: 3138
http://archive-access.svn.sourceforge.net/archive-access/?rev=3138&view=rev
Author: bradtofel
Date: 2010-06-01 19:42:04 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
New template system uses a single wrapper, which includes content from a delegate .jsp
Added Paths:
-----------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-wrapper.jsp
Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-wrapper.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-wrapper.jsp (rev 0)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-wrapper.jsp 2010-06-01 19:42:04 UTC (rev 3138)
@@ -0,0 +1,139 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<%@ page import="org.archive.wayback.core.WaybackRequest" %>
+<%@ page import="org.archive.wayback.core.UIResults" %>
+<%@ page import="org.archive.wayback.util.StringFormatter" %>
+<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%>
+<%
+UIResults results = UIResults.getGeneric(request);
+WaybackRequest wbRequest = results.getWbRequest();
+StringFormatter fmt = wbRequest.getFormatter();
+String contentJsp = results.getContentJsp();
+String staticPrefix = results.getStaticPrefix();
+String queryPrefix = results.getQueryPrefix();
+String replayPrefix = results.getReplayPrefix();
+
+%><html xmlns="http://www.w3.org/1999/xhtml">
+
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
+ <link rel="stylesheet" type="text/css"
+ href="<%= staticPrefix %>css/styles.css"
+ src="<%= staticPrefix %>css/styles.css" />
+ <title><%= fmt.format("UIGlobal.pageTitle") %></title>
+ <base target="_top" />
+ </head>
+
+ <body bgcolor="white" alink="red" vlink="#0000aa" link="blue"
+ style="font-family: Arial; font-size: 10pt">
+
+ <table width="100%" border="0" cellpadding="0" cellspacing="5">
+
+ <tr>
+
+ <!-- WAYBACK LOGO -->
+
+ <td width="26%"><a href="<%= staticPrefix %>"><img src="<%= staticPrefix %>images/wayback_logo_tr.gif" width="153" height="54" border="0"></a></td>
+
+ <!-- /WAYBACK LOGO -->
+
+ <!-- COLLECTION-EMPTYLOGO -->
+
+ <td width="70%" align="right"></td>
+
+ <!-- /COLLECTION-EMPTY LOGO -->
+
+ </tr>
+
+ <!-- GREEN BANNER -->
+ <tr>
+ <td colspan="2" height="30" align="center" class="mainSecHeadW">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+
+ <tr class="mainBColor">
+ <td colspan="2">
+ <table border="0" width="80%" align="center">
+
+
+ <!-- URL FORM -->
+ <form action="<%= queryPrefix %>query" method="get">
+
+
+ <tr>
+ <td nowrap align="center"><img src="<%= staticPrefix %>images/shim.gif" width="1" height="20">
+
+ <b class="mainBodyW">
+ <font size="2" color="#FFFFFF" face="Arial, Helvetica, sans-serif">
+ <%= fmt.format("UIGlobal.enterWebAddress") %>
+ </font>
+ <input type="hidden" name="<%= WaybackRequest.REQUEST_TYPE %>" value="<%= WaybackRequest.REQUEST_CAPTURE_QUERY %>">
+ <input type="text" name="<%= WaybackRequest.REQUEST_URL %>" value="http://" size="24" maxlength="256">
+
+ </b>
+ <select name="<%= WaybackRequest.REQUEST_DATE %>" size="1">
+ <option value="" selected><%= fmt.format("UIGlobal.selectYearAll") %></option>
+ <option>2008</option>
+ <option>2007</option>
+ <option>2006</option>
+ <option>2005</option>
+ <option>2004</option>
+ <option>2003</option>
+ <option>2002</option>
+ <option>2001</option>
+ <option>2000</option>
+ <option>1999</option>
+ <option>1998</option>
+ <option>1997</option>
+ <option>1996</option>
+ </select>
+
+ <input type="submit" name="Submit" value="<%= fmt.format("UIGlobal.urlSearchButton") %>" align="absMiddle">
+
+ <a href="<%= staticPrefix %>advanced_search.jsp" style="color:white;font-size:11px">
+ <%= fmt.format("UIGlobal.advancedSearchLink") %>
+ </a>
+
+ </td>
+ </tr>
+
+
+ </form>
+ <!-- /URL FORM -->
+
+ </table>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <!-- /GREEN BANNER -->
+ </table>
+<!-- PAGE CONTENTS -->
+<%
+if((contentJsp == null) || (contentJsp.length() == 0)) {
+ %>
+ No content here...
+ <%
+} else {
+ %>
+ <jsp:include page="<%= contentJsp %>" flush="true"></jsp:include>
+ <%
+}
+%>
+<!-- /PAGE CONTENTS -->
+ <div align="center">
+ <hr noshade size="1" align="center" />
+
+ <p>
+ <a href="<%= staticPrefix %>">
+ <%= fmt.format("UIGlobal.homeLink") %>
+ </a> |
+ <a href="<%= staticPrefix %>help.jsp">
+ <%= fmt.format("UIGlobal.helpLink") %>
+ </a>
+ </p>
+ </div>
+ </body>
+</html>
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-01 19:39:27
|
Revision: 3137
http://archive-access.svn.sourceforge.net/archive-access/?rev=3137&view=rev
Author: bradtofel
Date: 2010-06-01 19:39:21 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
Now defaults to Toolbar.jsp
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/DisclaimChooser.jsp
Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/DisclaimChooser.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/DisclaimChooser.jsp 2010-06-01 19:38:43 UTC (rev 3136)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/DisclaimChooser.jsp 2010-06-01 19:39:21 UTC (rev 3137)
@@ -10,5 +10,5 @@
if(wbr.isLiveWebRequest()) {
%><jsp:include page="/WEB-INF/replay/LiveWebDisclaimer.jsp" flush="true" /><%
} else {
- %><jsp:include page="/WEB-INF/replay/GraphDisclaimer.jsp" flush="true" /><%
+ %><jsp:include page="/WEB-INF/replay/Toolbar.jsp" flush="true" /><%
}%>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-01 19:38:52
|
Revision: 3136
http://archive-access.svn.sourceforge.net/archive-access/?rev=3136&view=rev
Author: bradtofel
Date: 2010-06-01 19:38:43 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
Added new properties for rendering Toolbar.jsp text
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/classes/WaybackUI.properties
Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/classes/WaybackUI.properties
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/classes/WaybackUI.properties 2010-06-01 19:37:52 UTC (rev 3135)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/classes/WaybackUI.properties 2010-06-01 19:38:43 UTC (rev 3136)
@@ -152,5 +152,44 @@
graph.nextMonth=Month›››
graph.nextYear=Year››››
+
+ToolBar.closeTitle=Close the toolbar
+ToolBar.closeText=Close
+ToolBar.helpTitle=Get some help using the Wayback Machine
+ToolBar.helpText=Help
+ToolBar.sparklineTitle=Explore captures for this URL
+ToolBar.captureRangeTitle=Timespan for captures of this URL
+ToolBar.captureRangeText={0,date,d MMM yy} - {1,date,d MMM yy}
+
+ToolBar.numCapturesTitle=See a list of every capture for this URL
+ToolBar.numCapturesText={0} captures
+
+ToolBar.prevTitle={0,date,H:mm:ss MMM d, yyyy}
+ToolBar.curDayTitle=You are here: {0,date,H:mm:ss MMM d, yyyy}
+ToolBar.curDayText={0,date,d}
+ToolBar.nextTitle={0,date,H:mm:ss MMM d, yyyy}
+
+ToolBar.noPrevMonthText={0,date,MMM}
+ToolBar.prevMonthTitle={0,date,d MMM yyyy}
+ToolBar.prevMonthText=‹{0,date,MMM}
+ToolBar.curMonthTitle=You are here: {0,date,H:mm:ss MMM d, yyyy}
+ToolBar.curMonthText={0,date,MMM}
+ToolBar.noNextMonthText={0,date,MMM}
+ToolBar.nextMonthTitle={0,date,d MMM yyyy}
+ToolBar.nextMonthText={0,date,MMM} ›
+
+ToolBar.noPrevYearText={0,date,yyyy}
+ToolBar.prevYearTitle={0,date,d MMM yyyy}
+ToolBar.prevYearText=‹{0,date,yyyy}
+ToolBar.curYearTitle=You are here: {0,date,H:mm:ss MMM d, yyyy}
+ToolBar.curYearText={0,date,yyyy}
+ToolBar.noNextYearText={0,date,yyyy}
+ToolBar.nextYearTitle={0,date,d MMM yyyy}
+ToolBar.nextYearText={0,date,yyyy} ›
+
+
+
+3 April 2010
+# 20 May 2010 14:09:56
PartitionSize.dateHeader.yearGraphLabel={0,date,yyyy}
PartitionSize.dateHeader.monthGraphLabel={0,date,MMM}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-01 19:37:58
|
Revision: 3135
http://archive-access.svn.sourceforge.net/archive-access/?rev=3135&view=rev
Author: bradtofel
Date: 2010-06-01 19:37:52 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
Removed header/footer includes, now uses the UI-wrapper.jsp
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/HTMLError.jsp
Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/HTMLError.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/HTMLError.jsp 2010-06-01 19:37:08 UTC (rev 3134)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/HTMLError.jsp 2010-06-01 19:37:52 UTC (rev 3135)
@@ -26,11 +26,7 @@
String queryPrefix = wbr.getAccessPoint().getQueryPrefix();
String replayPrefix = wbr.getAccessPoint().getReplayPrefix();
String requestUrl = wbr.getRequestUrl();
-%>
-<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" />
-<%
-
StringFormatter fmt = results.getWbRequest().getFormatter();
%>
@@ -108,4 +104,3 @@
<%
}
%>
-<jsp:include page="/WEB-INF/template/UI-footer.jsp" flush="true" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-01 19:37:14
|
Revision: 3134
http://archive-access.svn.sourceforge.net/archive-access/?rev=3134&view=rev
Author: bradtofel
Date: 2010-06-01 19:37:08 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
INITIAL REV: new Toolbar.jsp, and accompanying ToolBarData class which draws a snazzy toolbar into HTML pages during replay. ToolBarData does all the heavy lifting of massaging the results data for the jsp
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionsToGraph.java
Added Paths:
-----------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/ToolBarData.java
trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionsToGraph.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionsToGraph.java 2010-06-01 18:52:55 UTC (rev 3133)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionsToGraph.java 2010-06-01 19:37:08 UTC (rev 3134)
@@ -27,11 +27,14 @@
import java.util.ArrayList;
import java.util.Calendar;
+import java.util.Date;
+import java.util.Iterator;
import java.util.List;
import java.util.TimeZone;
import org.archive.wayback.ResultURIConverter;
import org.archive.wayback.core.CaptureSearchResult;
+import org.archive.wayback.core.CaptureSearchResults;
import org.archive.wayback.util.StringFormatter;
import org.archive.wayback.util.Timestamp;
import org.archive.wayback.util.graph.Graph;
Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/ToolBarData.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/ToolBarData.java (rev 0)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/ToolBarData.java 2010-06-01 19:37:08 UTC (rev 3134)
@@ -0,0 +1,226 @@
+/* ToolBarData
+ *
+ * $Id$:
+ *
+ * Created on May 27, 2010.
+ *
+ * Copyright (C) 2006 Internet Archive.
+ *
+ * This file is part of Wayback.
+ *
+ * Wayback is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * any later version.
+ *
+ * Wayback is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Wayback; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+package org.archive.wayback.partition;
+
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+import org.archive.wayback.core.CaptureSearchResult;
+import org.archive.wayback.core.CaptureSearchResults;
+import org.archive.wayback.core.UIResults;
+import org.archive.wayback.util.StringFormatter;
+import org.archive.wayback.util.graph.Graph;
+import org.archive.wayback.util.graph.GraphEncoder;
+import org.archive.wayback.util.partition.Partition;
+import org.archive.wayback.util.partition.PartitionSize;
+import org.archive.wayback.util.partition.Partitioner;
+
+
+/**
+ * @author brad
+ *
+ */
+public class ToolBarData {
+
+ private UIResults uiResults;
+ private StringFormatter fmt;
+
+ /** Latest Result one year before current, or null */
+ public CaptureSearchResult yearPrevResult;
+ /** Latest Result one month before current, or null */
+ public CaptureSearchResult monthPrevResult;
+ /** Latest Result before current, or null */
+ public CaptureSearchResult prevResult;
+ /** Earliest Result after current, or null */
+ public CaptureSearchResult nextResult;
+ /** Earliest Result one month after current, or null */
+ public CaptureSearchResult monthNextResult;
+ /** Earliest Result one year after current, or null */
+ public CaptureSearchResult yearNextResult;
+
+ /** current result being shown */
+ public CaptureSearchResult curResult;
+ /** the CaptureSearchResults object from the ResourceIndex. */
+ public CaptureSearchResults results;
+ /** List<Part<Part<CResult>>> for years*/
+ public List<Partition<Partition<CaptureSearchResult>>> yearPartitions;
+ /** List<Part<CResult>> for months*/
+ public List<Partition<CaptureSearchResult>> monthPartitions;
+
+ private static final PartitionSize yearSize = Partitioner.yearSize;
+ private static final PartitionSize monthSize = Partitioner.monthSize;
+
+ private static final CaptureSearchResultPartitionMap monthMap =
+ new CaptureSearchResultPartitionMap();
+ private static final PartitionPartitionMap yearMap =
+ new PartitionPartitionMap();
+
+ private static final Partitioner<Partition<CaptureSearchResult>>
+ yearPartitioner =
+ new Partitioner<Partition<CaptureSearchResult>>(yearMap);
+ private static final Partitioner<CaptureSearchResult> monthPartitioner =
+ new Partitioner<CaptureSearchResult>(monthMap);
+
+ /**
+ * @param uiResults the UIResults holding replay info
+ */
+ public ToolBarData(UIResults uiResults) {
+ this.uiResults = uiResults;
+ fmt = uiResults.getWbRequest().getFormatter();
+ results = uiResults.getCaptureResults();
+ curResult = uiResults.getResult();
+ findRelativeLinks();
+ Date firstDate = uiResults.getWbRequest().getStartDate();
+ Date lastDate = uiResults.getWbRequest().getEndDate();
+
+ yearPartitions = yearPartitioner.getRange(yearSize,firstDate,lastDate);
+
+ Date firstYearDate = yearPartitions.get(0).getStart();
+ Date lastYearDate = yearPartitions.get(yearPartitions.size()-1).getEnd();
+
+ monthPartitions =
+ monthPartitioner.getRange(monthSize,firstYearDate,lastYearDate);
+
+ Iterator<CaptureSearchResult> it = results.iterator();
+
+ monthPartitioner.populate(monthPartitions,it);
+ yearPartitioner.populate(yearPartitions,monthPartitions.iterator());
+
+ }
+
+ /**
+ * @param formatKey String template for format Dates
+ * @param width pixel width of resulting graph
+ * @param height pixel height of resulting graph
+ * @return String argument which will generate a graph for the results
+ */
+ public String computeGraphString(String formatKey, int width, int height) {
+ Graph graph = PartitionsToGraph.partsOfPartsToGraph(yearPartitions,
+ fmt,formatKey,width,height);
+ return GraphEncoder.encode(graph);
+
+ }
+ /**
+ * @param result Restul to draw replay URL for
+ * @return String absolute URL that will replay result
+ */
+ public String makeReplayURL(CaptureSearchResult result) {
+ return fmt.escapeHtml(uiResults.getURIConverter().makeReplayURI(
+ result.getCaptureTimestamp(), result.getOriginalUrl()));
+ }
+
+ /**
+ * @return the total number of results
+ */
+ public long getResultCount() {
+ return uiResults.getCaptureResults().getReturnedCount();
+ }
+ /**
+ * @return the Date of the first capture in the result set
+ */
+ public Date getFirstResultDate() {
+ return uiResults.getCaptureResults().getFirstResultDate();
+ }
+ /**
+ * @return the Date of the last capture in the result set
+ */
+ public Date getLastResultDate() {
+ return uiResults.getCaptureResults().getLastResultDate();
+ }
+
+
+ private static Date addDateField(Date date, int field, int amt) {
+ Calendar c = PartitionsToGraph.getUTCCalendar();
+ c.setTime(date);
+ c.add(field, amt);
+ return c.getTime();
+ }
+ /**
+ * Increment a Date object by +/- some years
+ * @param date Date to +/- some years from
+ * @param amt number of years to add/remove
+ * @return new Date object offset by the indicated years
+ */
+ public static Date addYear(Date date, int amt) {
+ return addDateField(date,Calendar.YEAR,amt);
+ }
+ /**
+ * Increment a Date object by +/- some months
+ * @param date Date to +/- some months from
+ * @param amt number of months to add/remove
+ * @return new Date object offset by the indicated months
+ */
+ public static Date addMonth(Date date, int amt) {
+ return addDateField(date,Calendar.MONTH,amt);
+ }
+ /**
+ * Increment a Date object by +/- some days
+ * @param date Date to +/- some days from
+ * @param amt number of days to add/remove
+ * @return new Date object offset by the indicated days
+ */
+ public static Date addDay(Date date, int amt) {
+ return addDateField(date,Calendar.DATE,amt);
+ }
+ private void findRelativeLinks() {
+ Date cur = curResult.getCaptureDate();
+
+ Date minYear = addYear(cur,-1);
+ Date minMonth = addMonth(cur,-1);
+ Date addYear = addYear(cur,1);
+ Date addMonth = addMonth(cur,1);
+ Iterator<CaptureSearchResult> itr = results.iterator();
+ while(itr.hasNext()) {
+ CaptureSearchResult result = itr.next();
+ Date d = result.getCaptureDate();
+ if(d.compareTo(cur) < 0) {
+ prevResult = result;
+ if(d.compareTo(minMonth) < 0) {
+ monthPrevResult = result;
+ }
+ if(d.compareTo(minYear) < 0 ) {
+ yearPrevResult = result;
+ }
+ } else if(d.compareTo(cur) > 0) {
+ if(nextResult == null) {
+ nextResult = result;
+ }
+ if(d.compareTo(addYear) > 0) {
+ if(yearNextResult == null) {
+ yearNextResult = result;
+ }
+ }
+ if(d.compareTo(addMonth) > 0) {
+ if(monthNextResult == null) {
+ monthNextResult = result;
+ }
+ }
+ }
+ }
+ }
+}
Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/ToolBarData.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Revision Id
Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp
===================================================================
--- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp (rev 0)
+++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Toolbar.jsp 2010-06-01 19:37:08 UTC (rev 3134)
@@ -0,0 +1,353 @@
+<%@
+ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"
+ %><%@
+ page import="java.util.Iterator"
+ %><%@
+ page import="java.util.ArrayList"
+ %><%@
+ page import="java.util.Date"
+ %><%@
+ page import="java.util.Calendar"
+ %><%@
+ page import="java.util.List"
+ %><%@
+ page import="java.text.ParseException"
+ %><%@
+ page import="org.archive.wayback.ResultURIConverter"
+ %><%@
+ page import="org.archive.wayback.WaybackConstants"
+ %><%@
+ page import="org.archive.wayback.core.CaptureSearchResult"
+ %><%@
+ page import="org.archive.wayback.core.CaptureSearchResults"
+ %><%@
+ page import="org.archive.wayback.core.UIResults"
+ %><%@
+ page import="org.archive.wayback.core.WaybackRequest"
+ %><%@
+ page import="org.archive.wayback.partition.CaptureSearchResultPartitionMap"
+ %><%@
+ page import="org.archive.wayback.partition.PartitionPartitionMap"
+ %><%@
+ page import="org.archive.wayback.partition.PartitionsToGraph"
+ %><%@
+ page import="org.archive.wayback.partition.ToolBarData"
+ %><%@
+ page import="org.archive.wayback.util.graph.Graph"
+ %><%@
+ page import="org.archive.wayback.util.graph.GraphEncoder"
+ %><%@
+ page import="org.archive.wayback.util.graph.GraphRenderer"
+ %><%@
+ page import="org.archive.wayback.util.partition.Partition"
+ %><%@
+ page import="org.archive.wayback.util.partition.Partitioner"
+ %><%@
+ page import="org.archive.wayback.util.partition.PartitionSize"
+ %><%@
+ page import="org.archive.wayback.util.StringFormatter"
+ %><%@
+ page import="org.archive.wayback.util.url.UrlOperations"
+ %><%
+UIResults results = UIResults.extractReplay(request);
+WaybackRequest wbRequest = results.getWbRequest();
+ResultURIConverter uriConverter = results.getURIConverter();
+StringFormatter fmt = wbRequest.getFormatter();
+
+String staticPrefix = results.getStaticPrefix();
+String queryPrefix = results.getQueryPrefix();
+String replayPrefix = results.getReplayPrefix();
+
+String graphJspPrefix = results.getContextConfig("graphJspPrefix");
+if(graphJspPrefix == null) {
+ graphJspPrefix = queryPrefix;
+}
+ToolBarData data = new ToolBarData(results);
+
+String searchUrl =
+ UrlOperations.stripDefaultPortFromUrl(wbRequest.getRequestUrl());
+String searchUrlSafe = fmt.escapeHtml(searchUrl);
+String searchUrlJS = fmt.escapeJavaScript(searchUrl);
+Date firstYearDate = data.yearPartitions.get(0).getStart();
+Date lastYearDate = data.yearPartitions.get(data.yearPartitions.size()-1).getEnd();
+
+int resultIndex = 1;
+int imgWidth = 375;
+int imgHeight = 27;
+int monthWidth = 2;
+int yearWidth = 25;
+String yearFormatKey = "PartitionSize.dateHeader.yearGraphLabel";
+String encodedGraph = data.computeGraphString(yearFormatKey,imgWidth,imgHeight);
+String graphImgUrl = graphJspPrefix + "jsp/graph.jsp?graphdata=" + encodedGraph;
+// TODO: this is archivalUrl specific:
+String starLink = fmt.escapeHtml(queryPrefix + "*/" + searchUrl);
+%>
+<!-- BEGIN WAYBACK TIMELINE DISCLAIMER INSERT -->
+<script type="text/javascript" src="<%= staticPrefix %>js/graph-calc.js" ></script>
+<script type="text/javascript">
+var firstDate = <%= firstYearDate.getTime() %>;
+var lastDate = <%= lastYearDate.getTime() %>;
+var wbPrefix = "<%= replayPrefix %>";
+var wbCurrentUrl = "<%= searchUrlJS %>";
+
+var curYear = -1;
+var curMonth = -1;
+var yearCount = 15;
+var firstYear = 1996;
+var imgWidth=<%= imgWidth %>;
+var yearImgWidth = <%= yearWidth %>;
+var monthImgWidth = <%= monthWidth %>;
+var trackerVal = "none";
+var displayDay = "<%= fmt.format("ToolBar.curDayText",data.curResult.getCaptureDate()) %>";
+var displayMonth = "<%= fmt.format("ToolBar.curMonthText",data.curResult.getCaptureDate()) %>";
+var displayYear = "<%= fmt.format("ToolBar.curYearText",data.curResult.getCaptureDate()) %>";
+var prettyMonths = ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];
+
+function showTrackers(val) {
+ if(val == trackerVal) {
+ return;
+ }
+ if(val == "inline") {
+ document.getElementById("displayYearEl").style.color = "#f00";
+ document.getElementById("displayMonthEl").style.color = "#f00";
+ document.getElementById("displayDayEl").style.color = "#f00";
+ } else {
+ document.getElementById("displayYearEl").innerHTML = displayYear;
+ document.getElementById("displayYearEl").style.color = "#ff0";
+ document.getElementById("displayMonthEl").innerHTML = displayMonth;
+ document.getElementById("displayMonthEl").style.color = "#ff0";
+ document.getElementById("displayDayEl").innerHTML = displayDay;
+ document.getElementById("displayDayEl").style.color = "#ff0";
+ }
+ document.getElementById("wbMouseTrackYearImg").style.display = val;
+ document.getElementById("wbMouseTrackMonthImg").style.display = val;
+ trackerVal = val;
+}
+
+function trackMouseMove(event,element) {
+
+ var eventX = getEventX(event);
+ var elementX = getElementX(element) + 6; // why 6?!?
+ var xOff = eventX - elementX;
+
+ var monthOff = xOff % yearImgWidth;
+
+ var year = Math.floor(xOff / yearImgWidth);
+ var yearStart = year * yearImgWidth;
+ var monthOfYear = Math.floor(monthOff / monthImgWidth);
+ if(monthOfYear > 11) {
+ monthOfYear = 11;
+ }
+ // 1 extra border pixel at the left edge of the year:
+ var month = (year * 12) + monthOfYear;
+ var day = 1;
+ if(monthOff % 2 == 1) {
+ day = 15;
+ }
+ var dateString =
+ zeroPad(year + firstYear) +
+ zeroPad(monthOfYear+1,2) +
+ zeroPad(day,2) + "000000";
+
+ var monthString = prettyMonths[monthOfYear];
+ document.getElementById("displayYearEl").innerHTML = year + 1996;
+ document.getElementById("displayMonthEl").innerHTML = monthString;
+ // looks too jarring when it changes..
+ //document.getElementById("displayDayEl").innerHTML = day;
+
+ var url = wbPrefix + dateString + '/' + wbCurrentUrl;
+ document.getElementById('wm-graph-anchor').href = url;
+
+ //document.getElementById("wmtbURL").value="xO("+xOff+") y("+year+") m("+month+") monthOff("+monthOff+") DS("+dateString+") Moy("+monthOfYear+") ms("+monthString+")";
+ if(curYear != year) {
+ document.getElementById("wbMouseTrackYearImg").style.left = year * yearImgWidth;
+ curYear = year;
+ }
+ if(curMonth != month) {
+ document.getElementById("wbMouseTrackMonthImg").style.left = year + (month * monthImgWidth) + 1;
+ curMonth = month;
+ }
+}
+
+</script>
+
+
+<style type="text/css">body{margin-top:0!important;padding-top:0!important;min-width:800px!important;}#wm-ipp a:hover{text-decoration:underline!important;}</style>
+<div id="wm-ipp" style="display:none; position:relative;padding:0 5px;min-height:70px;min-width:800px;">
+<div id="wm-ipp-inside" style="position:fixed;padding:0!important;margin:0!important;width:97%;min-width:780px;border:5px solid #000;border-top:none;background-image:url(<%= staticPrefix %>images/toolbar/wm_tb_bk_trns.png);text-align:center;-moz-box-shadow:1px 1px 3px #333;-webkit-box-shadow:1px 1px 3px #333;box-shadow:1px 1px 3px #333;font-size:11px!important;font-family:'Lucida Grande','Arial',sans-serif!important;">
+ <table style="border-collapse:collapse;margin:0;padding:0;width:100%;"><tbody><tr>
+ <td style="padding:10px;vertical-align:top;min-width:140px;">
+ <a href="<%= queryPrefix %>" title="Wayback Machine home page"><img src="<%= staticPrefix %>images/toolbar/wayback-toolbar-logo.png" alt="Wayback Machine" width="110" height="39" border="0"/></a>
+ </td>
+ <td style="padding:0!important;text-align:center;vertical-align:top;width:100%;">
+
+ <table style="border-collapse:collapse;margin:0 auto;padding:0;width:570px;"><tbody><tr>
+ <td style="padding:3px 0;" colspan="2">
+ <form method="get" action="<%= queryPrefix %>jsp/bounceToReplay.jsp" name="wmtb" id="wmtb" style="margin:0!important;padding:0!important;"><input type="text" name="wmtbURL" id="wmtbURL" value="<%= searchUrlSafe %>" style="width:400px;font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;"/><input type="submit" value="Go" style="font-size:11px;font-family:'Lucida Grande','Arial',sans-serif;margin-left:5px;"/><span id="wm_tb_options" style="display:block;"></span></form>
+ </td>
+ <td style="vertical-align:bottom;padding:5px 0 0 0!important;" rowspan="2">
+ <table style="border-collapse:collapse;width:110px;color:#99a;font-family:'Helvetica','Lucida Grande','Arial',sans-serif;"><tbody>
+ <tr>
+ <td style="padding-right:9px;text-align:right;">
+ <%
+ if(data.prevResult == null) {
+ %>
+ <img src="<%= staticPrefix %>images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0"/>
+ <%
+ } else {
+ %>
+ <a href="<%= data.makeReplayURL(data.prevResult) %>" title="<%= fmt.format("ToolBar.prevTitle",data.prevResult.getCaptureDate()) %>"><img src="<%= staticPrefix %>images/toolbar/wm_tb_prv_on.png" alt="Previous capture" width="14" height="16" border="0"/></a>
+ <%
+ }
+ %>
+ </td>
+ <td id="displayDayEl" style="background:#000;color:#ff0;width:34px;height:24px;padding:2px 0 0 0;text-align:center;font-size:22px;" title="<%= fmt.format("ToolBar.curDayTitle",data.curResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.curDayText",data.curResult.getCaptureDate()) %></td>
+ <td style="padding-left:9px;white-space:nowrap;overflow:visible;" nowrap="nowrap">
+ <%
+ if(data.nextResult == null) {
+ %>
+ <img src="<%= staticPrefix %>images/toolbar/wm_tb_nxt_on.png" alt="Next capture" width="14" height="16" border="0"/>
+ <%
+ } else {
+ %>
+ <a href="<%= data.makeReplayURL(data.nextResult) %>" title="<%= fmt.format("ToolBar.nextTitle",data.nextResult.getCaptureDate()) %>"><img src="<%= staticPrefix %>images/toolbar/wm_tb_nxt_on.png" alt="Next capture" width="14" height="16" border="0"/></a>
+ <%
+ }
+ %>
+ </td>
+ </tr>
+ <tr style="width:110px;height:16px;font-size:10px!important;">
+ <td style="padding-right:9px;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
+ <%
+ if(data.monthPrevResult == null) {
+ %>
+ <%= fmt.format("ToolBar.noPrevMonthText",data.addMonth(data.curResult.getCaptureDate(),-1)) %>
+ <%
+ } else {
+ %>
+ <a href="<%= data.makeReplayURL(data.monthPrevResult) %>" style="text-decoration:none;color:#33f;" title="<%= fmt.format("ToolBar.prevMonthTitle",data.monthPrevResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.prevMonthText",data.monthPrevResult.getCaptureDate()) %></a>
+ <%
+ }
+ %>
+ </td>
+ <td id="displayMonthEl" style="background:#000;color:#ff0;font-size:12px!important;width:34px;height:15px;padding-top:1px;text-align:center;" title="<%= fmt.format("ToolBar.curMonthTitle",data.curResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.curMonthText",data.curResult.getCaptureDate()) %></td>
+ <td style="padding-left:9px;white-space:nowrap;overflow:visible;" nowrap="nowrap">
+ <%
+ if(data.monthNextResult == null) {
+ %>
+ <%= fmt.format("ToolBar.noNextMonthText",data.addMonth(data.curResult.getCaptureDate(),1)) %>
+ <%
+ } else {
+ %>
+ <a href="<%= data.makeReplayURL(data.monthNextResult) %>" style="text-decoration:none;color:#33f;" title="<%= fmt.format("ToolBar.nextMonthTitle",data.monthNextResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.nextMonthText",data.monthNextResult.getCaptureDate()) %></a>
+ <%
+ }
+ %>
+ </td>
+ </tr>
+
+ <tr style="width:110px;height:13px;font-size:9px!important;">
+ <td style="padding-right:9px;text-align:right;white-space:nowrap;overflow:visible;" nowrap="nowrap">
+ <%
+ if(data.yearPrevResult == null) {
+ %>
+ <%= fmt.format("ToolBar.noPrevYearText",data.addYear(data.curResult.getCaptureDate(),-1)) %>
+ <%
+ } else {
+ %>
+ <a href="<%= data.makeReplayURL(data.yearPrevResult) %>" style="text-decoration:none;color:#33f;" title="<%= fmt.format("ToolBar.prevYearTitle",data.yearPrevResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.prevYearText",data.yearPrevResult.getCaptureDate()) %></a>
+ <%
+ }
+ %>
+ </td>
+ <td id="displayYearEl" style="background:#000;color:#ff0;font-size:10px!important;padding-top:1px;width:34px;height:13px;text-align:center;" title="<%= fmt.format("ToolBar.curYearTitle",data.curResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.curYearText",data.curResult.getCaptureDate()) %></td>
+ <td style="padding-left:9px;white-space:nowrap;overflow:visible;" nowrap="nowrap">
+ <%
+ if(data.yearNextResult == null) {
+ %>
+ <%= fmt.format("ToolBar.noNextYearText",data.addYear(data.curResult.getCaptureDate(),1)) %>
+ <%
+ } else {
+ %>
+ <a href="<%= data.makeReplayURL(data.yearNextResult) %>" style="text-decoration:none;color:#33f;" title="<%= fmt.format("ToolBar.nextYearTitle",data.yearNextResult.getCaptureDate()) %>"><%= fmt.format("ToolBar.nextYearText",data.yearNextResult.getCaptureDate()) %></a>
+ <%
+ }
+ %>
+ </td>
+ </tr>
+ </tbody></table>
+ </td>
+
+ </tr>
+ <tr>
+ <td style="vertical-align:middle;padding:0!important;">
+ <a href="<%= starLink %>" style="color:#33f;font-size:11px;" title="<%= fmt.format("ToolBar.numCapturesTitle") %>"><strong><%= fmt.format("ToolBar.numCapturesText",data.getResultCount()) %></strong></a>
+ <div style="margin:0!important;padding:0!important;color:#666;font-size:9px;padding-top:2px!important;white-space:nowrap;" title="<%= fmt.format("ToolBar.captureRangeTitle") %>"><%= fmt.format("ToolBar.captureRangeText",data.getFirstResultDate(),data.getLastResultDate()) %></div>
+ </td>
+ <td style="padding:0!important;">
+ <a style="position:relative; white-space:nowrap; width:<%= imgWidth %>px;height:<%= imgHeight %>px;" href="" id="wm-graph-anchor">
+ <div id="wm-ipp-sparkline" style="position:relative; white-space:nowrap; width:<%= imgWidth %>px;height:<%= imgHeight %>px;background-color:#fff;cursor:pointer;" title="<%= fmt.format("ToolBar.sparklineTitle") %>">
+ <img style="position:absolute; z-index:12; top:0px; left:0px;"
+ onmouseover="showTrackers('inline');"
+ onmouseout="showTrackers('none');"
+ onmousemove="trackMouseMove(event,this)"
+ alt="sparklines"
+ width="<%= imgWidth %>"
+ height="<%= imgHeight %>"
+ border="0"
+ src="<%= graphImgUrl %>"></img>
+ <img id="wbMouseTrackYearImg"
+ style="display:none; position:absolute; z-index:10;"
+ width="<%= yearWidth %>"
+ height="<%= imgHeight %>"
+ border="0"
+ src="<%= staticPrefix %>images/toolbar/transp-yellow-pixel.png"></img>
+ <img id="wbMouseTrackMonthImg"
+ style="display:none; position:absolute; z-index:11; "
+ width="<%= monthWidth %>"
+ height="<%= imgHeight %>"
+ border="0"
+ src="<%= staticPrefix %>images/toolbar/transp-red-pixel.png"></img>
+ </div>
+ </a>
+
+ </td>
+ </tr></tbody></table>
+ </td>
+ <td style="text-align:right;padding:5px;width:65px;font-size:11px!important;">
+ <a href="javascript:;" onclick="document.getElementById('wm-ipp').style.display='none';" style="display:block;padding-right:18px;background:url(<%= staticPrefix %>images/toolbar/wm_tb_close.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;margin-bottom:23px;" title="<%= fmt.format("ToolBar.closeTitle") %>"><%= fmt.format("ToolBar.closeText") %></a>
+ <a href="FAQ" style="display:block;padding-right:18px;background:url(<%= staticPrefix %>images/toolbar/wm_tb_help.png) no-repeat 100% 0;color:#33f;font-family:'Lucida Grande','Arial',sans-serif;" title="<%= fmt.format("ToolBar.helpTitle") %>"><%= fmt.format("ToolBar.helpText") %></a>
+ </td>
+ </tr></tbody></table>
+
+</div>
+</div>
+
+<script type="text/javascript" src="<%= staticPrefix %>js/disclaim-element.js" ></script>
+<script type="text/javascript">
+ var wmDisclaimBanner = document.getElementById("wm-ipp");
+ if(wmDisclaimBanner != null) {
+ disclaimElement(wmDisclaimBanner);
+ }
+</script>
+<!-- END WAYBACK TIMELINE DISCLAIMER INSERT -->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-01 18:53:01
|
Revision: 3133
http://archive-access.svn.sourceforge.net/archive-access/?rev=3133&view=rev
Author: bradtofel
Date: 2010-06-01 18:52:55 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
BUGFIX: was not closing recorder in exception situations
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/URLtoARCCacher.java
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/URLtoARCCacher.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/URLtoARCCacher.java 2010-06-01 18:46:00 UTC (rev 3132)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/URLtoARCCacher.java 2010-06-01 18:52:55 UTC (rev 3133)
@@ -139,7 +139,6 @@
LOGGER.info("URL(" + url + ") HTTP:" + code);
ByteOp.discardStream(getMethod.getResponseBodyAsStream());
getMethod.releaseConnection();
- recorder.closeRecorders();
gotUrl = true;
} catch (URIException e) {
@@ -157,6 +156,7 @@
// } catch (IOException e) {
// e.printStackTrace();
} finally {
+ recorder.closeRecorders();
Recorder.setHttpRecorder(null);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-06-01 18:46:08
|
Revision: 3132
http://archive-access.svn.sourceforge.net/archive-access/?rev=3132&view=rev
Author: bradtofel
Date: 2010-06-01 18:46:00 +0000 (Tue, 01 Jun 2010)
Log Message:
-----------
Now backed by ByteBuffer
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/BitArray.java
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/BitArray.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/BitArray.java 2010-05-29 00:48:36 UTC (rev 3131)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/BitArray.java 2010-06-01 18:46:00 UTC (rev 3132)
@@ -25,6 +25,8 @@
package org.archive.wayback.util;
+import java.nio.ByteBuffer;
+
/**
* @author brad
*
@@ -50,7 +52,7 @@
~0x40,
~0x80
};
- private byte array[] = null;
+ private ByteBuffer bb;
/**
* Construct a new BitArray holding at least n bits
@@ -62,32 +64,48 @@
if(bits > 0) {
bytes++;
}
- this.array = new byte[bytes];
+ bb = ByteBuffer.allocate(bytes);
}
/**
* Construct a new BitArray using argument as initial values.
* @param array byte array of initial values
*/
public BitArray(byte array[]) {
- this.array = array;
+ bb = ByteBuffer.wrap(array);
}
/**
- * @return the byte array backing this bit array.
+ * Construct a new BitArray holding at least n bits
+ * @param bb number of bits to hold
*/
+ public BitArray(ByteBuffer bb) {
+ this.bb = bb;
+ }
+
+ /**
+ * @return the byte array backing the ByteBuffer backing this bit array.
+ */
public byte[] getBytes() {
- return array;
+ return bb.array();
}
+
/**
+ * @return the ByteBuffer backing this bit array.
+ */
+ public ByteBuffer getByteBuffer() {
+ return bb;
+ }
+
+ /**
* @param i index of bit to test
* @return true if the i'th bit is set, false otherwise
*/
public boolean get(int i) {
int idx = i / 8;
- if(idx >= array.length) {
+ if(idx >= bb.limit()) {
throw new IndexOutOfBoundsException();
}
int bit = 7 - (i % 8);
- return ((array[idx] & MASKS[bit]) == MASKS[bit]);
+ return ((bb.get(idx) & MASKS[bit]) == MASKS[bit]);
}
/**
* set the i'th bit to 1 or 0
@@ -96,14 +114,14 @@
*/
public void set(int i, boolean value) {
int idx = i / 8;
- if(idx >= array.length) {
+ if(idx >= bb.limit()) {
throw new IndexOutOfBoundsException();
}
int bit = 7 - (i % 8);
if(value) {
- array[idx] = (byte) (array[idx] | MASKS[bit]);
+ bb.put(idx, (byte) (bb.get(idx) | MASKS[bit]));
} else {
- array[idx] = (byte) (array[idx] & MASKSR[bit]);
+ bb.put(idx,(byte) (bb.get(idx) & MASKSR[bit]));
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bra...@us...> - 2010-05-29 00:48:42
|
Revision: 3131
http://archive-access.svn.sourceforge.net/archive-access/?rev=3131&view=rev
Author: bradtofel
Date: 2010-05-29 00:48:36 +0000 (Sat, 29 May 2010)
Log Message:
-----------
INTERFACE: reduced specificity from Resource to InputStream, add method to get the full ParseContext metdata Map, added new Interface representing all available parse events.
Modified Paths:
--------------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ParseContext.java
Added Paths:
-----------
trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/handlers/AllEventsHandler.java
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java 2010-05-28 23:18:42 UTC (rev 3130)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java 2010-05-29 00:48:36 UTC (rev 3131)
@@ -25,6 +25,7 @@
package org.archive.wayback.replay.charset;
import java.io.IOException;
+import java.io.InputStream;
import java.nio.charset.Charset;
import java.nio.charset.IllegalCharsetNameException;
import java.util.Iterator;
@@ -117,7 +118,7 @@
* @return String character set found from META tags in the HTML
* @throws IOException
*/
- protected String getCharsetFromMeta(Resource resource) throws IOException {
+ protected String getCharsetFromMeta(InputStream resource) throws IOException {
String charsetName = null;
byte[] bbuffer = new byte[MAX_CHARSET_READAHEAD];
@@ -143,7 +144,7 @@
* @return String character encoding found, or null if nothing looked good.
* @throws IOException
*/
- protected String getCharsetFromBytes(Resource resource) throws IOException {
+ protected String getCharsetFromBytes(InputStream resource) throws IOException {
String charsetName = null;
byte[] bbuffer = new byte[MAX_CHARSET_READAHEAD];
Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ParseContext.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ParseContext.java 2010-05-28 23:18:42 UTC (rev 3130)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ParseContext.java 2010-05-29 00:48:36 UTC (rev 3131)
@@ -27,6 +27,7 @@
import java.net.URISyntaxException;
import java.net.URL;
import java.util.HashMap;
+import java.util.Map;
import org.apache.commons.httpclient.URIException;
import org.archive.net.UURI;
@@ -77,6 +78,9 @@
public String getData(String key) {
return data.get(key);
}
+ public Map<String,String> getMap() {
+ return data;
+ }
/**
* @param url against which relative URLs should be resolved for this parse
*/
@@ -102,7 +106,8 @@
url = url.substring(0,hashIdx);
}
try {
- return UURIFactory.getInstance(baseUrl, url).toString() + frag;
+ return baseUrl.resolve(url,false).toString() + frag;
+// return UURIFactory.getInstance(baseUrl, url).toString() + frag;
} catch (URIException e) {
e.printStackTrace();
}
Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/handlers/AllEventsHandler.java
===================================================================
--- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/handlers/AllEventsHandler.java (rev 0)
+++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/handlers/AllEventsHandler.java 2010-05-29 00:48:36 UTC (rev 3131)
@@ -0,0 +1,7 @@
+package org.archive.wayback.util.htmllex.handlers;
+
+public interface AllEventsHandler extends CloseTagHandler, ContentTextHandler,
+CSSTextHandler, JSTextHandler, OpenTagHandler, ParseCompleteHandler,
+RemarkTextHandler {
+
+}
Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/handlers/AllEventsHandler.java
___________________________________________________________________
Added: svn:keywords
+ Author Date Revision Id
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|