From: <bra...@us...> - 2008-07-21 23:15:16
|
Revision: 2461 http://archive-access.svn.sourceforge.net/archive-access/?rev=2461&view=rev Author: bradtofel Date: 2008-07-21 23:15:24 +0000 (Mon, 21 Jul 2008) Log Message: ----------- MOVE: webapp/exception -> webapp/WEB-INF/exception Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/CSSError.jsp 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/JavaScriptError.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/XMLError.jsp Removed Paths: ------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/CSSError.jsp 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/JavaScriptError.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/XMLError.jsp Deleted: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/CSSError.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/exception/CSSError.jsp 2008-07-02 00:17:37 UTC (rev 2386) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/CSSError.jsp 2008-07-21 23:15:24 UTC (rev 2461) @@ -1,18 +0,0 @@ -<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> -<%@ page import="org.archive.wayback.exception.WaybackException" %> -<%@ page import="org.archive.wayback.core.UIResults" %> -<%@ page import="org.archive.wayback.util.StringFormatter" %> -<% - -WaybackException e = (WaybackException) request.getAttribute("exception"); -UIResults results = UIResults.getFromRequest(request); -StringFormatter fmt = results.getFormatter(); -response.setStatus(e.getStatus()); - -%> -/* CSS wayback retrieval error: - - Title: <%= fmt.format(e.getTitleKey()) %> - Message: <%= fmt.format(e.getMessageKey()) %> - - */ Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/CSSError.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/exception/CSSError.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/CSSError.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/CSSError.jsp 2008-07-21 23:15:24 UTC (rev 2461) @@ -0,0 +1,17 @@ +<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> +<%@ page import="org.archive.wayback.exception.WaybackException" %> +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<% +UIResults results = UIResults.extractException(request); +WaybackException e = results.getException(); +StringFormatter fmt = results.getWbRequest().getFormatter(); +response.setStatus(e.getStatus()); + +%> +/* CSS wayback retrieval error: + + Title: <%= fmt.format(e.getTitleKey()) %> + Message: <%= fmt.format(e.getMessageKey()) %> + + */ Deleted: 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/exception/HTMLError.jsp 2008-07-02 00:17:37 UTC (rev 2386) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/HTMLError.jsp 2008-07-21 23:15:24 UTC (rev 2461) @@ -1,19 +0,0 @@ -<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> -<%@ page import="org.archive.wayback.exception.WaybackException" %> -<%@ page import="org.archive.wayback.core.UIResults" %> -<%@ page import="org.archive.wayback.util.StringFormatter" %> -<% -WaybackException e = (WaybackException) request.getAttribute("exception"); -e.setupResponse(response); -%> -<jsp:include page="/template/UI-header.jsp" flush="true" /> -<% - -UIResults results = UIResults.getFromRequest(request); -StringFormatter fmt = results.getFormatter(); - -%> - -<h2><%= fmt.format(e.getTitleKey()) %></h2> -<p><b><%= fmt.format(e.getMessageKey(),e.getMessage()) %></b></p> -<jsp:include page="/template/UI-footer.jsp" flush="true" /> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/HTMLError.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/exception/HTMLError.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/HTMLError.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/HTMLError.jsp 2008-07-21 23:15:24 UTC (rev 2461) @@ -0,0 +1,19 @@ +<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> +<%@ page import="org.archive.wayback.exception.WaybackException" %> +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<% +UIResults results = UIResults.extractException(request); +WaybackException e = results.getException(); +e.setupResponse(response); +%> +<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" /> +<% + +StringFormatter fmt = results.getWbRequest().getFormatter(); + +%> + +<h2><%= fmt.format(e.getTitleKey()) %></h2> +<p><b><%= fmt.format(e.getMessageKey(),e.getMessage()) %></b></p> +<jsp:include page="/WEB-INF/template/UI-footer.jsp" flush="true" /> Deleted: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/JavaScriptError.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/exception/JavaScriptError.jsp 2008-07-02 00:17:37 UTC (rev 2386) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/JavaScriptError.jsp 2008-07-21 23:15:24 UTC (rev 2461) @@ -1,16 +0,0 @@ -<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> -<%@ page import="org.archive.wayback.exception.WaybackException" %> -<%@ page import="org.archive.wayback.core.UIResults" %> -<%@ page import="org.archive.wayback.util.StringFormatter" %> -<% - -WaybackException e = (WaybackException) request.getAttribute("exception"); -UIResults results = UIResults.getFromRequest(request); -StringFormatter fmt = results.getFormatter(); -response.setStatus(e.getStatus()); - -%> -// Javascript wayback retrieval error: -// -// Title: <%= fmt.format(e.getTitleKey()) %> -// Message: <%= fmt.format(e.getMessageKey()) %> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/JavaScriptError.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/exception/JavaScriptError.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/JavaScriptError.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/JavaScriptError.jsp 2008-07-21 23:15:24 UTC (rev 2461) @@ -0,0 +1,16 @@ +<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> +<%@ page import="org.archive.wayback.exception.WaybackException" %> +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<% + +UIResults results = UIResults.extractException(request); +WaybackException e = results.getException(); +StringFormatter fmt = results.getWbRequest().getFormatter(); +response.setStatus(e.getStatus()); + +%> +// Javascript wayback retrieval error: +// +// Title: <%= fmt.format(e.getTitleKey()) %> +// Message: <%= fmt.format(e.getMessageKey()) %> Deleted: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/XMLError.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/exception/XMLError.jsp 2008-07-02 00:17:37 UTC (rev 2386) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/XMLError.jsp 2008-07-21 23:15:24 UTC (rev 2461) @@ -1,19 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<%@ page language="java" pageEncoding="utf-8" contentType="text/xml;charset=utf-8"%> -<%@ page import="org.archive.wayback.exception.WaybackException" %> -<%@ page import="org.archive.wayback.core.UIResults" %> -<%@ page import="org.archive.wayback.util.StringFormatter" %> -<% - -WaybackException e = (WaybackException) request.getAttribute("exception"); -UIResults results = UIResults.getFromRequest(request); -StringFormatter fmt = results.getFormatter(); -//response.setStatus(e.getStatus()); - -%> -<wayback> - <error> - <title><%= UIResults.encodeXMLContent(fmt.format(e.getTitleKey())) %></title> - <message><%= UIResults.encodeXMLContent(fmt.format(e.getMessageKey())) %></message> - </error> -</wayback> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/XMLError.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/exception/XMLError.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/XMLError.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/XMLError.jsp 2008-07-21 23:15:24 UTC (rev 2461) @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<%@ page language="java" pageEncoding="utf-8" contentType="text/xml;charset=utf-8"%> +<%@ page import="org.archive.wayback.exception.WaybackException" %> +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<% + +UIResults results = UIResults.extractException(request); +WaybackException e = results.getException(); +StringFormatter fmt = results.getWbRequest().getFormatter(); +//response.setStatus(e.getStatus()); + +%> +<wayback> + <error> + <title><%= UIResults.encodeXMLContent(fmt.format(e.getTitleKey())) %></title> + <message><%= UIResults.encodeXMLContent(fmt.format(e.getMessageKey())) %></message> + </error> +</wayback> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2008-07-21 23:19:10
|
Revision: 2463 http://archive-access.svn.sourceforge.net/archive-access/?rev=2463&view=rev Author: bradtofel Date: 2008-07-21 23:19:17 +0000 (Mon, 21 Jul 2008) Log Message: ----------- MOVE: webapp/query -> webapp/WEB-INF/query Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/ 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/query/XMLCaptureResults.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/XMLUrlResults.jsp Removed Paths: ------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/CalendarResults.jsp Deleted: 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/query/CalendarResults.jsp 2008-07-02 00:25:15 UTC (rev 2388) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/CalendarResults.jsp 2008-07-21 23:19:17 UTC (rev 2463) @@ -1,174 +0,0 @@ -<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> -<%@ 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.Timestamp" %> -<%@ page import="org.archive.wayback.core.UIResults" %> -<%@ page import="org.archive.wayback.query.UICaptureQueryResults" %> -<%@ page import="org.archive.wayback.query.resultspartitioner.ResultsPartitionsFactory" %> -<%@ page import="org.archive.wayback.query.resultspartitioner.ResultsPartition" %> -<%@ page import="org.archive.wayback.util.StringFormatter" %> -<jsp:include page="/template/UI-header.jsp" flush="true" /> -<% - -UICaptureQueryResults results = (UICaptureQueryResults) UIResults.getFromRequest(request); -StringFormatter fmt = results.getFormatter(); -String searchString = results.getSearchUrl(); - -Date searchStartDate = results.getStartTimestamp().getDate(); -Date searchEndDate = results.getEndTimestamp().getDate(); -long firstResult = results.getFirstResult(); -long lastResult = results.getLastResult(); -long resultCount = results.getResultsMatching(); - -//Timestamp searchStartTs = results.getStartTimestamp(); -//Timestamp searchEndTs = results.getEndTimestamp(); -//String prettySearchStart = results.prettyDateFull(searchStartTs.getDate()); -//String prettySearchEnd = results.prettyDateFull(searchEndTs.getDate()); - -ArrayList<ResultsPartition> partitions = ResultsPartitionsFactory.get( - results.getResults(),results.getWbRequest()); -int numPartitions = partitions.size(); -%> -<table border="0" cellpadding="5" width="100%" class="mainSearchBanner" cellspacing="0"> - <tr> - <td> - <%= fmt.format("PathQueryClassic.searchedFor",searchString) %> - </td> - <td align="right"> - <%= fmt.format("PathQueryClassic.resultsSummary",resultCount) %> - </td> - </tr> -</table> -<br> - - -<table border="0" width="100%"> - <tr bgcolor="#CCCCCC"> - <td colspan="<%= numPartitions %>" align="center" class="mainCalendar"> - <%= fmt.format("PathQueryClassic.searchResults",searchStartDate,searchEndDate) %> - </td> - </tr> - -<!-- RESULT COLUMN HEADERS --> - <tr bgcolor="#CCCCCC"> -<% - for(int i = 0; i < numPartitions; i++) { - ResultsPartition partition = partitions.get(i); -%> - <td align="center" class="mainBigBody"> - <%= partition.getTitle() %> - </td> -<% - } -%> - </tr> -<!-- /RESULT COLUMN HEADERS --> - - - -<!-- RESULT COLUMN COUNTS --> - <tr bgcolor="#CCCCCC"> -<% - for(int i = 0; i < numPartitions; i++) { - ResultsPartition partition = (ResultsPartition) partitions.get(i); -%> - <td align="center" class="mainBigBody"> - <%= fmt.format("ResultPartition.columnSummary",partition.resultsCount()) %> - </td> -<% - } -%> - </tr> -<!-- /RESULT COLUMN COUNTS --> - - -<!-- RESULT COLUMN DATA --> - <tr bgcolor="#EBEBEB"> -<% - boolean first = false; - String lastMD5 = null; - - for(int i = 0; i < numPartitions; i++) { - ResultsPartition partition = (ResultsPartition) partitions.get(i); - ArrayList<CaptureSearchResult> partitionResults = partition.getMatches(); -%> - <td nowrap class="mainBody" valign="top"> -<% - if(partitionResults.size() == 0) { -%> - -<% - } else { - - for(int j = 0; j < partitionResults.size(); j++) { - - CaptureSearchResult result = partitionResults.get(j); - String url = result.getUrlKey(); - String captureDate = result.getCaptureTimestamp(); - Timestamp captureTS = Timestamp.parseBefore(captureDate); - String prettyDate = fmt.format("PathQuery.classicResultLinkText", - captureTS.getDate()); - String origHost = result.getOriginalHost(); - String MD5 = result.getDigest(); - String redirectFlag = (0 == result.getRedirectUrl().compareTo("-")) - ? "" : fmt.format("PathPrefixQuery.redirectIndicator"); - String httpResponse = result.getHttpCode(); - String mimeType = result.getMimeType(); - - String arcFile = result.getFile(); - String arcOffset = String.valueOf(result.getOffset()); - - String replayUrl = results.resultToReplayUrl(result); - - boolean updated = false; - if(lastMD5 == null) { - lastMD5 = MD5; - updated = true; - } else if(0 != lastMD5.compareTo(MD5)) { - updated = true; - lastMD5 = MD5; - } - String updateStar = updated ? "*" : ""; -%> - <a href="<%= replayUrl %>"><%= prettyDate %></a> <%= updateStar %><br></br> -<% - - } - - } -%> - </td> -<% - } - -%> - </tr> -<!-- /RESULT COLUMN DATA --> -</table> - - -<% -// show page indicators: -if(results.getNumPages() > 1) { - int curPage = results.getCurPage(); - %> - <hr></hr> - <% - for(int i = 1; i <= results.getNumPages(); i++) { - if(i == curPage) { - %> - <b><%= i %></b> - <% - } else { - %> - <a href="<%= results.urlForPage(i) %>"><%= i %></a> - <% - } - } -} -%> -<jsp:include page="/template/UI-footer.jsp" flush="true" /> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/CalendarResults.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/query/CalendarResults.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/CalendarResults.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/CalendarResults.jsp 2008-07-21 23:19:17 UTC (rev 2463) @@ -0,0 +1,180 @@ +<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> +<%@ 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.query.resultspartitioner.ResultsPartitionsFactory" %> +<%@ page import="org.archive.wayback.query.resultspartitioner.ResultsPartition" %> +<%@ 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" /> +<% +UIResults results = UIResults.extractCaptureQuery(request); + +WaybackRequest wbRequest = results.getWbRequest(); +CaptureSearchResults cResults = results.getCaptureResults(); +StringFormatter fmt = wbRequest.getFormatter(); +String searchString = wbRequest.getRequestUrl(); + + +Date searchStartDate = wbRequest.getStartDate(); +Date searchEndDate = wbRequest.getEndDate(); +long firstResult = cResults.getFirstReturned(); +long lastResult = cResults.getReturnedCount() + firstResult; +long resultCount = cResults.getMatchingCount(); + +ArrayList<ResultsPartition> partitions = + ResultsPartitionsFactory.get(cResults, wbRequest); +int numPartitions = partitions.size(); +%> +<table border="0" cellpadding="5" width="100%" class="mainSearchBanner" cellspacing="0"> + <tr> + <td> + <%= fmt.format("PathQueryClassic.searchedFor",searchString) %> + </td> + <td align="right"> + <select onchange="SetAnchorWindow(this.value)"> + <option value="86400">1 day</option> + <option value="604800">1 week</option> + <option value="2592000">1 month</option> + <option value="31536000">1 year</option> + <option value="315360000">10 years</option> + </select> + <%= fmt.format("PathQueryClassic.resultsSummary",resultCount) %> + </td> + </tr> +</table> +<br> + + +<table border="0" width="100%"> + <tr bgcolor="#CCCCCC"> + <td colspan="<%= numPartitions %>" align="center" class="mainCalendar"> + <%= fmt.format("PathQueryClassic.searchResults",searchStartDate,searchEndDate) %> + </td> + </tr> + +<!-- RESULT COLUMN HEADERS --> + <tr bgcolor="#CCCCCC"> +<% + for(int i = 0; i < numPartitions; i++) { + ResultsPartition partition = partitions.get(i); +%> + <td align="center" class="mainBigBody"> + <%= partition.getTitle() %> + </td> +<% + } +%> + </tr> +<!-- /RESULT COLUMN HEADERS --> + + + +<!-- RESULT COLUMN COUNTS --> + <tr bgcolor="#CCCCCC"> +<% + for(int i = 0; i < numPartitions; i++) { + ResultsPartition partition = (ResultsPartition) partitions.get(i); +%> + <td align="center" class="mainBigBody"> + <%= fmt.format("ResultPartition.columnSummary",partition.resultsCount()) %> + </td> +<% + } +%> + </tr> +<!-- /RESULT COLUMN COUNTS --> + + +<!-- RESULT COLUMN DATA --> + <tr bgcolor="#EBEBEB"> +<% + boolean first = false; + String lastMD5 = null; + + for(int i = 0; i < numPartitions; i++) { + ResultsPartition partition = (ResultsPartition) partitions.get(i); + ArrayList<CaptureSearchResult> partitionResults = partition.getMatches(); +%> + <td nowrap class="mainBody" valign="top"> +<% + if(partitionResults.size() == 0) { +%> + +<% + } else { + + for(int j = 0; j < partitionResults.size(); j++) { + + CaptureSearchResult result = partitionResults.get(j); + String url = result.getUrlKey(); + String captureTimestamp = result.getCaptureTimestamp(); + Date captureDate = result.getCaptureDate(); + String prettyDate = fmt.format("PathQuery.classicResultLinkText", + captureDate); + String origHost = result.getOriginalHost(); + String MD5 = result.getDigest(); + String redirectFlag = (0 == result.getRedirectUrl().compareTo("-")) + ? "" : fmt.format("PathPrefixQuery.redirectIndicator"); + String httpResponse = result.getHttpCode(); + String mimeType = result.getMimeType(); + + String arcFile = result.getFile(); + String arcOffset = String.valueOf(result.getOffset()); + + String replayUrl = results.resultToReplayUrl(result); + + boolean updated = false; + if(lastMD5 == null) { + lastMD5 = MD5; + updated = true; + } else if(0 != lastMD5.compareTo(MD5)) { + updated = true; + lastMD5 = MD5; + } + String updateStar = updated ? "*" : ""; +%> + <a onclick="SetAnchorDate('<%= captureTimestamp %>');" href="<%= replayUrl %>"><%= prettyDate %></a> <%= updateStar %><br></br> +<% + + } + + } +%> + </td> +<% + } + +%> + </tr> +<!-- /RESULT COLUMN DATA --> +</table> + + +<% +// show page indicators: +if(cResults.getNumPages() > 1) { + int curPage = cResults.getCurPageNum(); + %> + <hr></hr> + <% + for(int i = 1; i <= cResults.getNumPages(); i++) { + if(i == curPage) { + %> + <b><%= i %></b> + <% + } else { + %> + <a href="<%= results.urlForPage(i) %>"><%= i %></a> + <% + } + } +} +%> +<jsp:include page="/WEB-INF/template/UI-footer.jsp" flush="true" /> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLCaptureResults.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/query/HTMLCaptureResults.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLCaptureResults.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLCaptureResults.jsp 2008-07-21 23:19:17 UTC (rev 2463) @@ -0,0 +1,113 @@ +<%@ 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="/template/UI-header.jsp" flush="true" /> +<% + +UIResults results = UIResults.extractCaptureQuery(request); +WaybackRequest wbRequest = results.getWbRequest(); +CaptureSearchResults cResults = results.getCaptureResults(); +StringFormatter fmt = wbRequest.getFormatter(); + +String searchString = wbRequest.getRequestUrl(); + +long resultCount = cResults.getReturnedCount(); +Date searchStartDate = wbRequest.getStartDate(); +Date searchEndDate = wbRequest.getEndDate(); + +Iterator<CaptureSearchResult> itr = cResults.iterator(); +%> + <%= fmt.format("PathQuery.resultsSummary",resultCount,searchString) %> + <br></br> + <%= fmt.format("PathQuery.resultRange",searchStartDate,searchEndDate) %> + <hr></hr> + <% + boolean first = false; + String lastMD5 = null; + while(itr.hasNext()) { + CaptureSearchResult result = (CaptureSearchResult) itr.next(); + + String url = result.getUrlKey(); + + String prettyDate = result.getCaptureTimestamp(); + String origHost = result.getOriginalHost(); + String MD5 = result.getDigest(); + String redirectFlag = (0 == result.getRedirectUrl().compareTo("-")) + ? "" : fmt.format("PathQuery.redirectIndicator"); + String httpResponse = result.getHttpCode(); + String mimeType = result.getMimeType(); + + String arcFile = result.getFile(); + String arcOffset = String.valueOf(result.getOffset()); + + String replayUrl = results.resultToReplayUrl(result); + + boolean updated = false; + if(lastMD5 == null) { + lastMD5 = MD5; + updated = true; + } else if(0 != lastMD5.compareTo(MD5)) { + updated = true; + lastMD5 = MD5; + } + if(updated) { + %> + <a href="<%= replayUrl %>"><%= prettyDate %></a> + <span style="color:black;"><%= origHost %></span> + <span style="color:gray;"><%= httpResponse %></span> + <span style="color:brown;"><%= mimeType %></span> + <!-- + <span style="color:red;"><%= arcFile %></span> + <span style="color:red;"><%= arcOffset %></span> + --> + <%= redirectFlag %> + <%= fmt.format("PathQuery.newVersionIndicator") %> + + <br/> + <% + } else { + %> + <a href="<%= replayUrl %>"><%= prettyDate %></a> + <span style="color:green;"><%= origHost %></span> + <!-- + <span style="color:red;"><%= arcFile %></span> + <span style="color:red;"><%= arcOffset %></span> + --> + <br/> + <% + } + } + +// show page indicators: +int curPage = cResults.getCurPageNum(); +if(curPage > cResults.getNumPages()) { + %> + <hr></hr> + <a href="<%= results.urlForPage(1) %>">First results</a> + <% +} else if(cResults.getNumPages() > 1) { + %> + <hr></hr> + <% + for(int i = 1; i <= cResults.getNumPages(); i++) { + if(i == curPage) { + %> + <b><%= i %></b> + <% + } else { + %> + <a href="<%= results.urlForPage(i) %>"><%= i %></a> + <% + } + } +} +%> + +<jsp:include page="/template/UI-footer.jsp" flush="true" /> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLUrlResults.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/query/HTMLUrlResults.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLUrlResults.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLUrlResults.jsp 2008-07-21 23:19:17 UTC (rev 2463) @@ -0,0 +1,117 @@ +<%@ 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="/template/UI-header.jsp" flush="true" /> +<% + +UIResults results = UIResults.extractUrlQuery(request); +WaybackRequest wbRequest = results.getWbRequest(); +UrlSearchResults uResults = results.getUrlResults(); +ResultURIConverter uriConverter = results.getURIConverter(); +StringFormatter fmt = wbRequest.getFormatter(); + +String searchString = wbRequest.getRequestUrl(); + + + +Date searchStartDate = wbRequest.getStartDate(); +Date searchEndDate = wbRequest.getEndDate(); + +long firstResult = uResults.getFirstReturned(); +long resultCount = uResults.getReturnedCount(); +long lastResult = resultCount + firstResult; + +long totalCaptures = uResults.getMatchingCount(); + +%> +<%= fmt.format("PathPrefixQuery.showingResults",firstResult,lastResult, + resultCount,searchString) %> +<br/> + +<hr></hr> +<% +Iterator<UrlSearchResult> itr = uResults.iterator(); +while(itr.hasNext()) { + UrlSearchResult result = itr.next(); + + String urlKey = result.getUrlKey(); + String originalUrl = result.getOriginalUrl(); + String firstDateTSss = result.getFirstCaptureTimestamp(); + String lastDateTSss = result.getLastCaptureTimestamp(); + long numCaptures = result.getNumCaptures(); + long numVersions = result.getNumVersions(); + + Date firstDate = result.getFirstCaptureDate(); + Date lastDate = result.getLastCaptureDate(); + + if(numCaptures == 1) { + String ts = result.getFirstCaptureTimestamp(); + String anchor = uriConverter.makeReplayURI(ts,originalUrl); + %> + <a href="<%= anchor %>"> + <%= urlKey %> + </a> + <span class="mainSearchText"> + <%= fmt.format("PathPrefixQuery.versionCount",numVersions) %> + </span> + <br/> + <span class="mainSearchText"> + <%= fmt.format("PathPrefixQuery.singleCaptureDate",firstDate) %> + </span> + <% + + } else { + String anchor = results.makeCaptureQueryUrl(originalUrl); + %> + <a href="<%= anchor %>"> + <%= urlKey %> + </a> + <span class="mainSearchText"> + <%= fmt.format("PathPrefixQuery.versionCount",numVersions) %> + </span> + <br/> + <span class="mainSearchText"> + <%= fmt.format("PathPrefixQuery.multiCaptureDate",numCaptures,firstDate,lastDate) %> + </span> + <% + } + %> + <br/> + <br/> + <% +} + +// show page indicators: +int curPage = uResults.getCurPageNum(); +if(curPage > uResults.getNumPages()) { + %> + <hr></hr> + <a href="<%= results.urlForPage(1) %>">First results</a> + <% +} else if(uResults.getNumPages() > 1) { + %> + <hr></hr> + <% + for(int i = 1; i <= uResults.getNumPages(); i++) { + if(i == curPage) { + %> + <b><%= i %></b> + <% + } else { + %> + <a href="<%= results.urlForPage(i) %>"><%= i %></a> + <% + } + } +} +%> + +<jsp:include page="/template/UI-footer.jsp" flush="true" /> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/XMLCaptureResults.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/query/XMLCaptureResults.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/XMLCaptureResults.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/XMLCaptureResults.jsp 2008-07-21 23:19:17 UTC (rev 2463) @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<%@ page language="java" pageEncoding="utf-8" contentType="text/xml;charset=utf-8"%> +<%@ page import="java.util.Iterator" %> +<%@ page import="java.util.ArrayList" %> +<%@ page import="java.util.Map" %> +<%@ page import="java.util.Enumeration" %> +<%@ page import="org.archive.wayback.core.CaptureSearchResult" %> +<%@ page import="org.archive.wayback.core.CaptureSearchResults" %> +<%@ page import="org.archive.wayback.core.SearchResults" %> +<%@ page import="org.archive.wayback.core.UIResults" %> +<% +UIResults uiResults = UIResults.extractCaptureQuery(request); + +CaptureSearchResults results = uiResults.getCaptureResults(); +Iterator<CaptureSearchResult> itr = results.iterator(); +%> +<wayback> + <request> +<% + Map<String,String> p = results.getFilters(); + Iterator<String> kitr = p.keySet().iterator(); + while(kitr.hasNext()) { + String key = kitr.next(); + String oKey = UIResults.encodeXMLEntity(key); + String oValue = UIResults.encodeXMLContent(p.get(key)); + %> + <<%= oKey %>><%= oValue %></<%= oKey %>> + <% + } +%> + <<%= SearchResults.RESULTS_TYPE %>><%= SearchResults.RESULTS_TYPE_CAPTURE %></<%= SearchResults.RESULTS_TYPE %>> + </request> + <results> +<% + while(itr.hasNext()) { + %> + <result> + <% + CaptureSearchResult result = itr.next(); + Map<String,String> p2 = result.toCanonicalStringMap(); + kitr = p2.keySet().iterator(); + + while(kitr.hasNext()) { + String key = kitr.next(); + String oKey = UIResults.encodeXMLEntity(key); + String oValue = UIResults.encodeXMLContent(p2.get(key)); + %> + <<%= oKey %>><%= oValue %></<%= oKey %>> + <% + } + %> + </result> + <% + } +%> + </results> +</wayback> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/XMLUrlResults.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/query/XMLUrlResults.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/XMLUrlResults.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/XMLUrlResults.jsp 2008-07-21 23:19:17 UTC (rev 2463) @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8"?> +<%@ page language="java" pageEncoding="utf-8" contentType="text/xml;charset=utf-8"%> +<%@ page import="java.util.Iterator" %> +<%@ page import="java.util.ArrayList" %> +<%@ page import="java.util.Map" %> +<%@ page import="java.util.Enumeration" %> +<%@ page import="org.archive.wayback.core.SearchResults" %> +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.core.UrlSearchResults" %> +<%@ page import="org.archive.wayback.core.UrlSearchResult" %> +<% +UIResults uiResults = UIResults.extractUrlQuery(request); + +UrlSearchResults results = uiResults.getUrlResults(); +Iterator<UrlSearchResult> itr = results.iterator(); +%> +<wayback> + <request> +<% + Map<String,String> p = results.getFilters(); + Iterator<String> kitr = p.keySet().iterator(); + while(kitr.hasNext()) { + String key = kitr.next(); + String oKey = UIResults.encodeXMLEntity(key); + String oValue = UIResults.encodeXMLContent(p.get(key)); + %> + <<%= oKey %>><%= oValue %></<%= oKey %>> + <% + } +%> + <<%= SearchResults.RESULTS_TYPE %>><%= SearchResults.RESULTS_TYPE_URL %></<%= SearchResults.RESULTS_TYPE %>> + </request> + <results> +<% + while(itr.hasNext()) { + %> + <result> + <% + UrlSearchResult result = itr.next(); + Map<String,String> p2 = result.toCanonicalStringMap(); + kitr = p2.keySet().iterator(); + + while(kitr.hasNext()) { + String key = kitr.next(); + String oKey = UIResults.encodeXMLEntity(key); + String oValue = UIResults.encodeXMLContent(p2.get(key)); + %> + <<%= oKey %>><%= oValue %></<%= oKey %>> + <% + } + %> + </result> + <% + } +%> + </results> +</wayback> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2008-07-21 23:20:59
|
Revision: 2465 http://archive-access.svn.sourceforge.net/archive-access/?rev=2465&view=rev Author: bradtofel Date: 2008-07-21 23:21:07 +0000 (Mon, 21 Jul 2008) Log Message: ----------- Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ArchiveComment.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ClientSideJSInsert.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Disclaimer.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/JSLessTimeline.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Redirect.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ResultMeta.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Timeline.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/client-rewrite.js trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/disclaim-element.js Removed Paths: ------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Timeline.jsp Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ArchiveComment.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/ArchiveComment.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ArchiveComment.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ArchiveComment.jsp 2008-07-21 23:21:07 UTC (rev 2465) @@ -0,0 +1,21 @@ +<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> +<%@ page import="java.util.Date" %> +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<% +UIResults results = UIResults.extractReplay(request); +StringFormatter fmt = results.getWbRequest().getFormatter(); +Date exactDate = results.getResult().getCaptureDate(); +Date now = new Date(); +String prettyDateFormat = "{0,date,H:mm:ss MMM d, yyyy}"; +String prettyArchiveString = fmt.format(prettyDateFormat,exactDate); +String prettyRequestString = fmt.format(prettyDateFormat,now); +%> +<!-- + FILE ARCHIVED ON <%= prettyArchiveString %> AND RETRIEVED FROM THE + INTERNET ARCHIVE ON <%= prettyRequestString %>. + JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. + + ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. + SECTION 108(a)(3)). +--> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ClientSideJSInsert.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/ClientSideJSInsert.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ClientSideJSInsert.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ClientSideJSInsert.jsp 2008-07-21 23:21:07 UTC (rev 2465) @@ -0,0 +1,19 @@ +<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> +<%@ page import="java.util.Date" %> +<%@ 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.util.StringFormatter" %> +<% +UIResults results = UIResults.extractReplay(request); +String requestDate = results.getResult().getCaptureTimestamp(); +String contextPath = results.getURIConverter().makeReplayURI(requestDate,""); +String contextRoot = request.getScheme() + "://" + request.getServerName() + ":" + + request.getServerPort() + request.getContextPath(); + +String jsUrl = contextRoot + "/replay/client-rewrite.js"; +%> +<script type="text/javascript"> + var sWayBackCGI = "<%= contextPath %>"; +</script> +<script type="text/javascript" src="<%= jsUrl %>" ></script> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Disclaimer.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/Disclaimer.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Disclaimer.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Disclaimer.jsp 2008-07-21 23:21:07 UTC (rev 2465) @@ -0,0 +1,42 @@ +<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> +<%@ page import="java.util.Date" %> +<%@ page import="org.archive.wayback.WaybackConstants" %> +<%@ page import="org.archive.wayback.core.CaptureSearchResult" %> +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.core.WaybackRequest" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<% +UIResults results = UIResults.extractReplay(request); + +StringFormatter fmt = results.getWbRequest().getFormatter(); +CaptureSearchResult result = results.getResult(); +String dupeMsg = ""; +if(result != null) { + if(result.isDuplicateDigest()) { + Date dupeDate = result.getDuplicateDigestStoredDate(); + String prettyDate = ""; + if(dupeDate != null) { + prettyDate = "(" + + fmt.format("MetaReplay.captureDateDisplay", + dupeDate) + ")"; + } + dupeMsg = " Note that this document was downloaded, and not saved because it was a duplicate of a previously captured version " + + prettyDate + ". HTTP headers presented here are from the original capture."; + } +} + +Date resultDate = result.getCaptureDate(); +String resultUrl = result.getOriginalUrl(); + +String wmNotice = fmt.format("ReplayView.banner", resultUrl, resultDate); +String wmHideNotice = fmt.format("ReplayView.bannerHideLink"); + +String contextRoot = request.getScheme() + "://" + request.getServerName() + ":" ++ request.getServerPort() + request.getContextPath(); +String jsUrl = contextRoot + "/replay/disclaim.js"; +%> +<script type="text/javascript"> + var wmNotice = "<%= wmNotice %><%= dupeMsg %>"; + var wmHideNotice = "<%= wmHideNotice %>"; +</script> +<script type="text/javascript" src="<%= jsUrl %>"></script> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/JSLessTimeline.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/JSLessTimeline.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/JSLessTimeline.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/JSLessTimeline.jsp 2008-07-21 23:21:07 UTC (rev 2465) @@ -0,0 +1,295 @@ +<%@ 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.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.query.resultspartitioner.ResultsTimelinePartitionsFactory" %> +<%@ page import="org.archive.wayback.query.resultspartitioner.ResultsPartition" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<% + +String contextRoot = request.getScheme() + "://" + request.getServerName() + ":" + + request.getServerPort() + request.getContextPath(); + +UIResults results = UIResults.extractReplay(request); +WaybackRequest wbRequest = results.getWbRequest(); +StringFormatter fmt = wbRequest.getFormatter(); +CaptureSearchResults cResults = results.getCaptureResults(); + +String exactDateStr = wbRequest.getReplayTimestamp(); +Date exactDate = wbRequest.getReplayDate(); +String searchUrl = wbRequest.getRequestUrl(); +String resolution = wbRequest.getTimelineResolution(); + +if(resolution == null) { + resolution = WaybackRequest.REQUEST_RESOLUTION_AUTO; +} +String metaChecked = ""; +if(wbRequest.isMetaMode()) { + metaChecked = "checked"; +} + +CaptureSearchResult first = null; +CaptureSearchResult prev = null; +CaptureSearchResult next = null; +CaptureSearchResult last = null; + +long resultCount = cResults.getReturnedCount(); +int resultIndex = 1; +Iterator<CaptureSearchResult> it = cResults.iterator(); +while(it.hasNext()) { + CaptureSearchResult res = it.next(); + Date resDate = res.getCaptureDate(); + + int compared = resDate.compareTo(exactDate); + if(compared < 0) { + resultIndex++; + prev = res; + if(first == null) { + first = res; + } + } else if(compared > 0) { + last = res; + if(next == null) { + next = res; + } + } +} +// string to indicate which select option is currently active +String yearsOptSelected = ""; +String monthsOptSelected = ""; +String daysOptSelected = ""; +String hoursOptSelected = ""; +String autoOptSelected = ""; + +String minResolution = ResultsTimelinePartitionsFactory.getMinResolution(cResults); + +String optimal = ""; +if(minResolution.equals(WaybackRequest.REQUEST_RESOLUTION_HOURS)) { + optimal = fmt.format("TimelineView.timeRange.hours"); +} else if(minResolution.equals(WaybackRequest.REQUEST_RESOLUTION_DAYS)) { + optimal = fmt.format("TimelineView.timeRange.days"); +} else if(minResolution.equals(WaybackRequest.REQUEST_RESOLUTION_MONTHS)) { + optimal = fmt.format("TimelineView.timeRange.months"); +} else if(minResolution.equals(WaybackRequest.REQUEST_RESOLUTION_TWO_MONTHS)) { + optimal = fmt.format("TimelineView.timeRange.twomonths"); +} else if(minResolution.equals(WaybackRequest.REQUEST_RESOLUTION_YEARS)) { + optimal = fmt.format("TimelineView.timeRange.years"); +} else { + optimal = fmt.format("TimelineView.timeRange.unknown"); +} +String autoOptString = fmt.format("TimelineView.timeRange.auto",optimal); + +ArrayList<ResultsPartition> partitions; +if(resolution.equals(WaybackRequest.REQUEST_RESOLUTION_HOURS)) { + hoursOptSelected = "selected"; + partitions = ResultsTimelinePartitionsFactory.getHour(cResults,wbRequest); +} else if(resolution.equals(WaybackRequest.REQUEST_RESOLUTION_DAYS)) { + daysOptSelected = "selected"; + partitions = ResultsTimelinePartitionsFactory.getDay(cResults,wbRequest); +} else if(resolution.equals(WaybackRequest.REQUEST_RESOLUTION_MONTHS)) { + monthsOptSelected = "selected"; + partitions = ResultsTimelinePartitionsFactory.getMonth(cResults,wbRequest); +} else if(resolution.equals(WaybackRequest.REQUEST_RESOLUTION_TWO_MONTHS)) { + monthsOptSelected = "selected"; + partitions = ResultsTimelinePartitionsFactory.getTwoMonth(cResults,wbRequest); +} else if(resolution.equals(WaybackRequest.REQUEST_RESOLUTION_YEARS)) { + yearsOptSelected = "selected"; + partitions = ResultsTimelinePartitionsFactory.getYear(cResults,wbRequest); +} else { + autoOptSelected = "selected"; + partitions = ResultsTimelinePartitionsFactory.getAuto(cResults,wbRequest); +} +int numPartitions = partitions.size(); +ResultsPartition firstP = (ResultsPartition) partitions.get(0); +ResultsPartition lastP = (ResultsPartition) partitions.get(numPartitions -1); + +String firstDate = firstP.getTitle(); +String lastDate = lastP.getTitle(); +String titleString = ""; +%> +<!-- + ====================================== + BEGIN Wayback INSERTED TIMELINE BANNER + + The following HTML has been inserted + by the Wayback application to enhance + the viewing experience, and was not + part of the original archived content. + ====================================== +--> +<div id="wm-ipp" style="position:relative;z-index:99999;border:1px solid;color:black;background-color:lightYellow;font-size:10px;font-family:sans-serif;padding:5px" > + +<table cellspacing="0" border="0" cellpadding="0" width="100%"> + <tr> + <td width="1" nowrap></td> + <td> + <!-- Viewing --> + <table cellspacing="0" border="0" cellpadding="0" width="100%"> + <tr> + <td> + <span><%= fmt.format("TimelineView.viewingVersion",resultIndex,resultCount) %> </span> + </td> + </tr> + <tr> + <td nowrap><span> <%= fmt.format("TimelineView.viewingVersionDate",exactDate) %> </span> </td> + </tr> + </table> + </td> + <td width="400" align="center"> + <table> + <tr> + <td width="50%"></td> + <td> + <table cellspacing="0" border="0" cellpadding="0" width="100%"> + <tr> + <td width="48%" nowrap><span><%= firstDate %></span></td> + <td align="center" valign="bottom" nowrap><img wmSpecial="1" src="<%= contextRoot %>/images/mark.jpg"></td> + <td width="48%" nowrap align="right"><span><%= lastDate %></span></td> + </tr> + </table> + </td> + <td width="50%"></td> + </tr> + <tr> + <td nowrap align="right"><% + titleString = ""; + if(first != null) { + titleString = "title=\"" + + fmt.format("TimelineView.firstVersionTitle", + first.getCaptureDate()) + "\""; + %><a wmSpecial="1" href="<%= results.resultToReplayUrl(first) %>"><% + } + %><img <%= titleString %> wmSpecial="1" border=0 width=19 height=20 src="<%= contextRoot %>/images/first.jpg"><% + if(first != null) { + %></a><% + } + titleString = ""; + if(prev != null) { + titleString = "title=\"" + + fmt.format("TimelineView.prevVersionTitle", + prev.getCaptureDate()) + "\""; + %><a wmSpecial="1" href="<%= results.resultToReplayUrl(prev) %>"><% + } + %><img <%= titleString %> wmSpecial="1" border=0 width=13 height=20 src="<%= contextRoot %>/images/prev.jpg"><% + if(first != null) { + %></a><% + } + %></td> + <td nowrap><% + + for(int i = 0; i < numPartitions; i++) { + ResultsPartition partition = (ResultsPartition) partitions.get(i); + ArrayList partitionResults = partition.getMatches(); + int numResults = partitionResults.size(); + String imageUrl = contextRoot + "/images/line.jpg"; + String replayUrl = null; + String prettyDateTime = null; + if(numResults == 1) { + imageUrl = contextRoot + "/images/mark_one.jpg"; + CaptureSearchResult result = (CaptureSearchResult) partitionResults.get(0); + replayUrl = results.resultToReplayUrl(result); + prettyDateTime = fmt.format("TimelineView.markDateTitle",result.getCaptureDate()); + + } else if (numResults > 1) { + imageUrl = contextRoot + "/images/mark_several.jpg"; + CaptureSearchResult result = (CaptureSearchResult) partitionResults.get(numResults - 1); + replayUrl = results.resultToReplayUrl(result); + prettyDateTime = fmt.format("TimelineView.markDateTitle",result.getCaptureDate()); + + } + if((i > 0) && (i < numPartitions)) { + +%><img wmSpecial="1" border=0 width=1 height=16 src="<%= contextRoot %>/images/linemark.jpg"><% + + } + + if(replayUrl == null) { + +%><img wmSpecial="1" border=0 width=7 height=16 src="<%= imageUrl %>"><% + + } else { + +%><a wmSpecial="1" href="<%= replayUrl %>"><img wmSpecial="1" border=0 width=7 height=16 title="<%= prettyDateTime %>" src="<%= imageUrl %>"></a><% + + } + } + +%></td> + <td nowrap><% + titleString = ""; + if(next != null) { + titleString = "title=\"" + + fmt.format("TimelineView.nextVersionTitle", + next.getCaptureDate()) + "\""; + %><a wmSpecial="1" href="<%= results.resultToReplayUrl(next) %>"><% + } + %><img wmSpecial="1" <%= titleString %> border=0 width=13 height=20 src="<%= contextRoot %>/images/next.jpg"><% + if(first != null) { + %></a><% + } + titleString = ""; + if(last != null) { + titleString = "title=\"" + + fmt.format("TimelineView.lastVersionTitle", + last.getCaptureDate()) + "\""; + %><a wmSpecial="1" href="<%= results.resultToReplayUrl(last) %>"><% + } + %><img wmSpecial="1" <%= titleString %> border=0 width=19 height=20 src="<%= contextRoot %>/images/last.jpg"><% + if(first != null) { + %></a><% + } + %></td> + </tr> + </table> + </td> + <td align="right" width="400"> + <!-- Resolution --> + <!-- + need to get cookie data passing set up before this can be re-enabled: + <form wmSpecial="1" name="timeline" method="GET" target="_top" action="<%= contextRoot + "/frameset" %>"> + <input type="hidden" name="url" value="<%= searchUrl %>"> + <input type="hidden" name="exactdate" value="<%= exactDateStr %>"> + <input type="hidden" name="type" value="urlclosestquery"> + <%= fmt.format("TimelineView.timeRange") %> + <select NAME="resolution" SIZE="1" onChange="changeResolution()"> + <option <%= yearsOptSelected %> value="years"> + <%= fmt.format("TimelineView.timeRange.years") %> + </option> + <option <%= monthsOptSelected %> value="months"> + <%= fmt.format("TimelineView.timeRange.months") %> + </option> + <option <%= daysOptSelected %> value="days"> + <%= fmt.format("TimelineView.timeRange.days") %> + </option> + <option <%= hoursOptSelected %> value="hours"> + <%= fmt.format("TimelineView.timeRange.hours") %> + </option> + <option <%= autoOptSelected %> value="auto"><%= autoOptString %></option> + </select> <%= + fmt.format("TimelineView.metaDataCheck") + %><input type="checkbox" name="<%= WaybackRequest.REQUEST_META_MODE%>" value="<%= WaybackRequest.REQUEST_YES %>" <%= + metaChecked + %> onClick="changeMeta()"> + </form> + --> + <a wmSpecial="1" href="<%= contextRoot %>/help.jsp" target="_top"><%= + fmt.format("UIGlobal.helpLink") + %></a> + </td> + <td> + <img wmSpecial="1" alt='' height='1' src='<%= contextRoot %>/images/1px.gif' width='5'> + </td> + </tr> +</table> +</div> +<!-- + ====================================== + END Wayback INSERTED TIMELINE BANNER + ====================================== +--> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Redirect.jsp (from rev 2454, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/Redirect.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Redirect.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Redirect.jsp 2008-07-21 23:21:07 UTC (rev 2465) @@ -0,0 +1,15 @@ +<%@ page import="org.archive.wayback.util.bdb.BDBMap" %> + +<% + String url = request.getParameter("url"); + String time = request.getParameter("time"); + + // Put time-mapping for this id, or if no id, the ip-addr. + String id = request.getHeader("Proxy-Id"); + if(id == null) id = request.getRemoteAddr(); + BDBMap.addTimestampForId(request.getContextPath(),id, time); + + // Now redirect to the page the user wanted. + response.sendRedirect(url); +%> +anchored date! Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ResultMeta.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/ResultMeta.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ResultMeta.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/ResultMeta.jsp 2008-07-21 23:21:07 UTC (rev 2465) @@ -0,0 +1,124 @@ +<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> +<%@ page import="java.util.Iterator" %> +<%@ page import="java.util.Map" %> +<%@ page import="org.archive.wayback.core.CaptureSearchResult" %> +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<% + +UIResults uiResults = UIResults.extractReplay(request); +StringFormatter fmt = uiResults.getWbRequest().getFormatter(); +CaptureSearchResult result = uiResults.getResult(); +String origUrl = result.getOriginalUrl(); +String urlKey = result.getUrlKey(); +String archiveID = result.getFile() + "/" + result.getOffset(); +String captureTS = result.getCaptureTimestamp(); +String capturePrettyDateTime = fmt.format("MetaReplay.captureDateDisplay", + result.getCaptureDate()); +String mimeType = result.getMimeType(); +String digest = result.getDigest(); +Map<String,String> headers = uiResults.getResource().getHttpHeaders(); + +%> +<html> + <head> + <title> + <%= fmt.format("MetaReplay.title") + urlKey +" / " + + capturePrettyDateTime %> + </title> + </head> + <body> + <h2> + <%= fmt.format("MetaReplay.title") %> + </h2> + <table> + <tr> + <td class="field-cell"> + <%= fmt.format("MetaReplay.originalURL") %> + </td> + <td class="value-cell"> + <b> + <%= origUrl %> + </b> + </td> + </tr> + <tr> + <td class="field-cell"> + <%= fmt.format("MetaReplay.URLKey") %> + </td> + <td class="value-cell"> + <b> + <%= urlKey %> + </b> + </td> + </tr> + <tr> + <td class="field-cell"> + <%= fmt.format("MetaReplay.captureDate") %> + </td> + <td class="value-cell"> + <b> + <%= capturePrettyDateTime %> + </b> + </td> + </tr> + <tr> + <td class="field-cell"> + <%= fmt.format("MetaReplay.archiveID") %> + </td> + <td class="value-cell"> + <b> + <%= archiveID %> + </b> + </td> + </tr> + <tr> + <td class="field-cell"> + <%= fmt.format("MetaReplay.MIMEType") %> + </td> + <td class="value-cell"> + <b> + <%= mimeType %> + </b> + </td> + </tr> + <tr> + <td class="field-cell"> + <%= fmt.format("MetaReplay.digest") %> + </td> + <td class="value-cell"> + <b> + <%= digest %> + </b> + </td> + </tr> + </table> + <p> + <h2> + <%= fmt.format("MetaReplay.HTTPHeaders") %> + </h2> + <table> + <% + Iterator<String> itr = headers.keySet().iterator(); + while(itr.hasNext()) { + String key = itr.next(); + String value = headers.get(key); + %> + <tr> + <td class="field-cell"> + <%= key %> + </td> + <td class="value-cell"> + <b> + <%= value %> + </b> + </td> + </tr> + <% + } + %> + </table> + + </body> +</html> + Deleted: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Timeline.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/Timeline.jsp 2007-10-15 21:28:33 UTC (rev 2055) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Timeline.jsp 2008-07-21 23:21:07 UTC (rev 2465) @@ -1,326 +0,0 @@ -<%@ page import="java.util.Iterator" %> -<%@ page import="java.util.ArrayList" %> -<%@ page import="java.util.Date" %> -<%@ page import="java.text.ParseException" %> -<%@ page import="org.archive.wayback.WaybackConstants" %> -<%@ page import="org.archive.wayback.core.SearchResult" %> -<%@ page import="org.archive.wayback.core.Timestamp" %> -<%@ page import="org.archive.wayback.core.UIResults" %> -<%@ page import="org.archive.wayback.core.WaybackRequest" %> -<%@ page import="org.archive.wayback.query.UIQueryResults" %> -<%@ page import="org.archive.wayback.query.resultspartitioner.ResultsTimelinePartitionsFactory" %> -<%@ page import="org.archive.wayback.query.resultspartitioner.ResultsPartition" %> -<%@ page import="org.archive.wayback.util.StringFormatter" %> -<% - -String contextRoot = request.getScheme() + "://" + request.getServerName() + ":" - + request.getServerPort() + request.getContextPath(); - -UIQueryResults results = (UIQueryResults) UIResults.getFromRequest(request); -StringFormatter fmt = results.getFormatter(); - -Timestamp searchStartTs = results.getStartTimestamp(); -Timestamp searchEndTs = results.getEndTimestamp(); -Timestamp exactTs = results.getExactRequestedTimestamp(); -String searchUrl = results.getSearchUrl(); -Date exactDate = exactTs.getDate(); - -String exactDateStr = exactTs.getDateStr(); -WaybackRequest wbRequest = results.getWbRequest(); -String resolution = wbRequest.get(WaybackConstants.REQUEST_RESOLUTION); -if(resolution == null) { - resolution = WaybackConstants.REQUEST_RESOLUTION_AUTO; -} -String metaMode = wbRequest.get(WaybackConstants.REQUEST_META_MODE); -String metaChecked = ""; -if(metaMode != null && metaMode.equals("yes")) { - metaChecked = "checked"; -} - -String searchString = results.getSearchUrl(); - -SearchResult first = null; -SearchResult prev = null; -SearchResult next = null; -SearchResult last = null; - -int resultCount = results.getResultsReturned(); -int resultIndex = 1; -Iterator<SearchResult> it = results.resultsIterator(); -while(it.hasNext()) { - SearchResult res = it.next(); - String resDateStr = res.get(WaybackConstants.RESULT_CAPTURE_DATE); - int compared = resDateStr.compareTo(exactDateStr.substring(0,resDateStr.length())); - if(compared < 0) { - resultIndex++; - prev = res; - if(first == null) { - first = res; - } - } else if(compared > 0) { - last = res; - if(next == null) { - next = res; - } - } -} -// string to indicate which select option is currently active -String yearsOptSelected = ""; -String monthsOptSelected = ""; -String daysOptSelected = ""; -String hoursOptSelected = ""; -String autoOptSelected = ""; - -String minResolution = ResultsTimelinePartitionsFactory.getMinResolution( - results.getResults()); - -String optimal = ""; -if(minResolution.equals(WaybackConstants.REQUEST_RESOLUTION_HOURS)) { - optimal = fmt.format("TimelineView.timeRange.hours"); -} else if(minResolution.equals(WaybackConstants.REQUEST_RESOLUTION_DAYS)) { - optimal = fmt.format("TimelineView.timeRange.days"); -} else if(minResolution.equals(WaybackConstants.REQUEST_RESOLUTION_MONTHS)) { - optimal = fmt.format("TimelineView.timeRange.months"); -} else if(minResolution.equals(WaybackConstants.REQUEST_RESOLUTION_YEARS)) { - optimal = fmt.format("TimelineView.timeRange.years"); -} else { - optimal = fmt.format("TimelineView.timeRange.unknown"); -} -String autoOptString = fmt.format("TimelineView.timeRange.auto",optimal); - -ArrayList<ResultsPartition> partitions; -if(resolution.equals(WaybackConstants.REQUEST_RESOLUTION_HOURS)) { - hoursOptSelected = "selected"; - partitions = ResultsTimelinePartitionsFactory.getHour(results.getResults(), - wbRequest); -} else if(resolution.equals(WaybackConstants.REQUEST_RESOLUTION_DAYS)) { - daysOptSelected = "selected"; - partitions = ResultsTimelinePartitionsFactory.getDay(results.getResults(), - wbRequest); -} else if(resolution.equals(WaybackConstants.REQUEST_RESOLUTION_MONTHS)) { - monthsOptSelected = "selected"; - partitions = ResultsTimelinePartitionsFactory.getMonth(results.getResults(), - wbRequest); -} else if(resolution.equals(WaybackConstants.REQUEST_RESOLUTION_YEARS)) { - yearsOptSelected = "selected"; - partitions = ResultsTimelinePartitionsFactory.getYear(results.getResults(), - wbRequest); -} else { - autoOptSelected = "selected"; - partitions = ResultsTimelinePartitionsFactory.getAuto(results.getResults(), - wbRequest); -} -int numPartitions = partitions.size(); -ResultsPartition firstP = (ResultsPartition) partitions.get(0); -ResultsPartition lastP = (ResultsPartition) partitions.get(numPartitions -1); - -String firstDate = firstP.getTitle(); -String lastDate = lastP.getTitle(); -String titleString = ""; -%> -<script type="text/javascript"> - function changeResolution() { - document.timeline.submit(); - } - function changeMeta() { - document.timeline.submit(); - } - -var open = true; - -function handleDragClick() { - var daDiv = document.getElementById("wm-ipp"); - var daDraggerDiv = document.getElementById("wm-dragger"); - while(daDraggerDiv.hasChildNodes()) { - daDraggerDiv.removeChild(daDraggerDiv.firstChild); - } - var newText; - if(open) { - open = false; - daDiv.style.width = "100px"; - newText = "<"; - } else { - open = true; - daDiv.style.width = "100%"; - newText = ">"; - } - daDraggerDiv.appendChild(document.createTextNode(newText)); -} - - -</script> -<!-- -overflow:hidden; border-width:1; border-style:outset; width:100%; height:80px; right:0; top:0; background-color:#dddddd; - --> -<div id="wm-ipp" style="position:relative;z-index:99999;border:1px solid;color:black;background-color:lightYellow;font-size:10px;font-family:sans-serif;padding:5px" > -<!-- -<div onclick="handleDragClick()" id="wm-dragger" style="height:25px; width:100%; border-width:1; border-style:outset; background-color:#cccccc; text-align:right;"> -< -</div> - --> -<table cellspacing="0" border="0" cellpadding="0" width="100%"> - <tr> - <td width="1" nowrap></td> - <td> - <!-- Viewing --> - <table cellspacing="0" border="0" cellpadding="0" width="100%"> - <tr> - <td> - <span><%= fmt.format("TimelineView.viewingVersion",resultIndex,resultCount) %> </span> - </td> - </tr> - <tr> - <td nowrap><span> <%= fmt.format("TimelineView.viewingVersionDate",exactDate) %> </span> </td> - </tr> - </table> - </td> - <td width="400"> - <table> - <tr> - <td width="50%"></td> - <td> - <table cellspacing="0" border="0" cellpadding="0" width="100%"> - <tr> - <td width="48%" nowrap><span><%= firstDate %></span></td> - <td align="center" valign="bottom" nowrap><img wmSpecial="1" src="<%= contextRoot %>/images/mark.jpg"></td> - <td width="48%" nowrap align="right"><span><%= lastDate %></span></td> - </tr> - </table> - </td> - <td width="50%"></td> - </tr> - <tr> - <td nowrap align="right"><% - titleString = ""; - if(first != null) { - titleString = "title=\"" + - fmt.format("TimelineView.firstVersionTitle", - results.resultToDate(first)) + "\""; - %><a wmSpecial="1" href="<%= results.resultToReplayUrl(first) %>"><% - } - %><img <%= titleString %> wmSpecial="1" border=0 width=19 height=20 src="<%= contextRoot %>/images/first.jpg"><% - if(first != null) { - %></a><% - } - titleString = ""; - if(prev != null) { - titleString = "title=\"" + - fmt.format("TimelineView.prevVersionTitle", - results.resultToDate(prev)) + "\""; - %><a wmSpecial="1" href="<%= results.resultToReplayUrl(prev) %>"><% - } - %><img <%= titleString %> wmSpecial="1" border=0 width=13 height=20 src="<%= contextRoot %>/images/prev.jpg"><% - if(first != null) { - %></a><% - } - %></td> - <td nowrap><% - - for(int i = 0; i < numPartitions; i++) { - ResultsPartition partition = (ResultsPartition) partitions.get(i); - ArrayList partitionResults = partition.getMatches(); - int numResults = partitionResults.size(); - String imageUrl = contextRoot + "/images/line.jpg"; - String replayUrl = null; - String prettyDateTime = null; - if(numResults == 1) { - imageUrl = contextRoot + "/images/mark_one.jpg"; - SearchResult result = (SearchResult) partitionResults.get(0); - replayUrl = results.resultToReplayUrl(result); - prettyDateTime = fmt.format("TimelineView.markDateTitle",results.resultToDate(result)); - - } else if (numResults > 1) { - imageUrl = contextRoot + "/images/mark_several.jpg"; - SearchResult result = (SearchResult) partitionResults.get(numResults - 1); - replayUrl = results.resultToReplayUrl(result); - prettyDateTime = fmt.format("TimelineView.markDateTitle",results.resultToDate(result)); - - } - if((i > 0) && (i < numPartitions)) { - -%><img wmSpecial="1" border=0 width=1 height=16 src="<%= contextRoot %>/images/linemark.jpg"><% - - } - - if(replayUrl == null) { - -%><img wmSpecial="1" border=0 width=7 height=16 src="<%= imageUrl %>"><% - - } else { - -%><a wmSpecial="1" href="<%= replayUrl %>"><img wmSpecial="1" border=0 width=7 height=16 title="<%= prettyDateTime %>" src="<%= imageUrl %>"></a><% - - } - } - -%></td> - <td nowrap><% - titleString = ""; - if(next != null) { - titleString = "title=\"" + - fmt.format("TimelineView.nextVersionTitle", - results.resultToDate(next)) + "\""; - %><a wmSpecial="1" href="<%= results.resultToReplayUrl(next) %>"><% - } - %><img wmSpecial="1" <%= titleString %> border=0 width=13 height=20 src="<%= contextRoot %>/images/next.jpg"><% - if(first != null) { - %></a><% - } - titleString = ""; - if(last != null) { - titleString = "title=\"" + - fmt.format("TimelineView.lastVersionTitle", - results.resultToDate(last)) + "\""; - %><a wmSpecial="1" href="<%= results.resultToReplayUrl(last) %>"><% - } - %><img wmSpecial="1" <%= titleString %> border=0 width=19 height=20 src="<%= contextRoot %>/images/last.jpg"><% - if(first != null) { - %></a><% - } - %></td> - </tr> - </table> - </td> - <td align="right"> - <!-- Resolution --> - <form wmSpecial="1" name="timeline" method="GET" target="_top" action="<%= contextRoot + "/frameset" %>"> - <input type="hidden" name="url" value="<%= searchUrl %>"> - <input type="hidden" name="exactdate" value="<%= exactDateStr %>"> - <input type="hidden" name="type" value="urlclosestquery"> - <%= fmt.format("TimelineView.timeRange") %> - <select NAME="resolution" SIZE="1" onChange="changeResolution()"> - <option <%= yearsOptSelected %> value="years"> - <%= fmt.format("TimelineView.timeRange.years") %> - </option> - <option <%= monthsOptSelected %> value="months"> - <%= fmt.format("TimelineView.timeRange.months") %> - </option> - <option <%= daysOptSelected %> value="days"> - <%= fmt.format("TimelineView.timeRange.days") %> - </option> - <option <%= hoursOptSelected %> value="hours"> - <%= fmt.format("TimelineView.timeRange.hours") %> - </option> - <option <%= autoOptSelected %> value="auto"><%= autoOptString %></option> - </select> <%= - fmt.format("TimelineView.metaDataCheck") - %><input type="checkbox" name="metamode" value="yes" <%= - metaChecked - %> onClick="changeMeta()"> <a href="help.php" target="_top"><%= - fmt.format("UIGlobal.helpLink") - %></a> - </form> - </td> - <td> - <img wmSpecial="1" alt='' height='1' src='<%= contextRoot %>/images/1px.gif' width='5'> - </td> - </tr> -</table> -</div> -<script type="text/javascript"> - var daDiv = document.getElementById("wm-ipp"); - var daParentNode = daDiv.parentNode; - var daBody = document.body; - daParentNode.removeChild(daDiv); - daBody.insertBefore(daDiv,daBody.firstChild); -</script> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Timeline.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/Timeline.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Timeline.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/Timeline.jsp 2008-07-21 23:21:07 UTC (rev 2465) @@ -0,0 +1,319 @@ +<%@ 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.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.query.resultspartitioner.ResultsTimelinePartitionsFactory" %> +<%@ page import="org.archive.wayback.query.resultspartitioner.ResultsPartition" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<% + +String contextRoot = request.getScheme() + "://" + request.getServerName() + ":" + + request.getServerPort() + request.getContextPath(); + +UIResults results = UIResults.extractReplay(request); +WaybackRequest wbRequest = results.getWbRequest(); +StringFormatter fmt = wbRequest.getFormatter(); +CaptureSearchResults cResults = results.getCaptureResults(); + +String exactDateStr = wbRequest.getReplayTimestamp(); +Date exactDate = wbRequest.getReplayDate(); +String searchUrl = wbRequest.getRequestUrl(); +String resolution = wbRequest.getTimelineResolution(); + + +if(resolution == null) { + resolution = WaybackRequest.REQUEST_RESOLUTION_AUTO; +} +String metaChecked = ""; +if(wbRequest.isMetaMode()) { + metaChecked = "checked"; +} + +CaptureSearchResult first = null; +CaptureSearchResult prev = null; +CaptureSearchResult next = null; +CaptureSearchResult last = null; + +long resultCount = cResults.getReturnedCount(); +int resultIndex = 1; +Iterator<CaptureSearchResult> it = cResults.iterator(); +while(it.hasNext()) { + CaptureSearchResult res = it.next(); + String resDateStr = res.getCaptureTimestamp(); + int compared = resDateStr.compareTo(exactDateStr.substring(0,resDateStr.length())); + if(compared < 0) { + resultIndex++; + prev = res; + if(first == null) { + first = res; + } + } else if(compared > 0) { + last = res; + if(next == null) { + next = res; + } + } +} +// string to indicate which select option is currently active +String yearsOptSelected = ""; +String monthsOptSelected = ""; +String daysOptSelected = ""; +String hoursOptSelected = ""; +String autoOptSelected = ""; + +String minResolution = ResultsTimelinePartitionsFactory.getMinResolution(cResults); + +String optimal = ""; +if(minResolution.equals(WaybackRequest.REQUEST_RESOLUTION_HOURS)) { + optimal = fmt.format("TimelineView.timeRange.hours"); +} else if(minResolution.equals(WaybackRequest.REQUEST_RESOLUTION_DAYS)) { + optimal = fmt.format("TimelineView.timeRange.days"); +} else if(minResolution.equals(WaybackRequest.REQUEST_RESOLUTION_MONTHS)) { + optimal = fmt.format("TimelineView.timeRange.months"); +} else if(minResolution.equals(WaybackRequest.REQUEST_RESOLUTION_TWO_MONTHS)) { + optimal = fmt.format("TimelineView.timeRange.twomonths"); +} else if(minResolution.equals(WaybackRequest.REQUEST_RESOLUTION_YEARS)) { + optimal = fmt.format("TimelineView.timeRange.years"); +} else { + optimal = fmt.format("TimelineView.timeRange.unknown"); +} +String autoOptString = fmt.format("TimelineView.timeRange.auto",optimal); + +ArrayList<ResultsPartition> partitions; +if(resolution.equals(WaybackRequest.REQUEST_RESOLUTION_HOURS)) { + hoursOptSelected = "selected"; + partitions = ResultsTimelinePartitionsFactory.getHour(cResults,wbRequest); +} else if(resolution.equals(WaybackRequest.REQUEST_RESOLUTION_DAYS)) { + daysOptSelected = "selected"; + partitions = ResultsTimelinePartitionsFactory.getDay(cResults,wbRequest); +} else if(resolution.equals(WaybackRequest.REQUEST_RESOLUTION_MONTHS)) { + monthsOptSelected = "selected"; + partitions = ResultsTimelinePartitionsFactory.getMonth(cResults,wbRequest); +} else if(resolution.equals(WaybackRequest.REQUEST_RESOLUTION_TWO_MONTHS)) { + monthsOptSelected = "selected"; + partitions = ResultsTimelinePartitionsFactory.getTwoMonth(cResults,wbRequest); +} else if(resolution.equals(WaybackRequest.REQUEST_RESOLUTION_YEARS)) { + yearsOptSelected = "selected"; + partitions = ResultsTimelinePartitionsFactory.getYear(cResults,wbRequest); +} else { + autoOptSelected = "selected"; + partitions = ResultsTimelinePartitionsFactory.getAuto(cResults,wbRequest); +} +int numPartitions = partitions.size(); +ResultsPartition firstP = (ResultsPartition) partitions.get(0); +ResultsPartition lastP = (ResultsPartition) partitions.get(numPartitions -1); + +String firstDate = firstP.getTitle(); +String lastDate = lastP.getTitle(); +String titleString = ""; +%> +<script type="text/javascript"> + function changeResolution() { + document.timeline.submit(); + } + function changeMeta() { + document.timeline.submit(); + } + +var open = true; + +function handleDragClick() { + var daDiv = document.getElementById("wm-ipp"); + var daDraggerDiv = document.getElementById("wm-dragger"); + while(daDraggerDiv.hasChildNodes()) { + daDraggerDiv.removeChild(daDraggerDiv.firstChild); + } + var newText; + if(open) { + open = false; + daDiv.style.width = "100px"; + newText = "<"; + } else { + open = true; + daDiv.style.width = "100%"; + newText = ">"; + } + daDraggerDiv.appendChild(document.createTextNode(newText)); +} + + +</script> + +<div id="wm-ipp" style="position:relative;z-index:99999;border:1px solid;color:black;background-color:lightYellow;font-size:10px;font-family:sans-serif;padding:5px" > + +<table cellspacing="0" border="0" cellpadding="0" width="100%"> + <tr> + <td width="1" nowrap></td> + <td> + <!-- Viewing --> + <table cellspacing="0" border="0" cellpadding="0" width="100%"> + <tr> + <td> + <span><%= fmt.format("TimelineView.viewingVersion",resultIndex,resultCount) %> </span> + </td> + </tr> + <tr> + <td nowrap><span> <%= fmt.format("TimelineView.viewingVersionDate",exactDate) %> </span> </td> + </tr> + </table> + </td> + <td width="400" align="center"> + <table> + <tr> + <td width="50%"></td> + <td> + <table cellspacing="0" border="0" cellpadding="0" width="100%"> + <tr> + <td width="48%" nowrap><span><%= firstDate %></span></td> + <td align="center" valign="bottom" nowrap><img wmSpecial="1" src="<%= contextRoot %>/images/mark.jpg"></td> + <td width="48%" nowrap align="right"><span><%= lastDate %></span></td> + </tr> + </table> + </td> + <td width="50%"></td> + </tr> + <tr> + <td nowrap align="right"><% + titleString = ""; + if(first != null) { + titleString = "title=\"" + + fmt.format("TimelineView.firstVersionTitle", + first.getCaptureDate()) + "\""; + %><a wmSpecial="1" href="<%= results.resultToReplayUrl(first) %>"><% + } + %><img <%= titleString %> wmSpecial="1" border=0 width=19 height=20 src="<%= contextRoot %>/images/first.jpg"><% + if(first != null) { + %></a><% + } + titleString = ""; + if(prev != null) { + titleString = "title=\"" + + fmt.format("TimelineView.prevVersionTitle", + prev.getCaptureDate()) + "\""; + %><a wmSpecial="1" href="<%= results.resultToReplayUrl(prev) %>"><% + } + %><img <%= titleString %> wmSpecial="1" border=0 width=13 height=20 src="<%= contextRoot %>/images/prev.jpg"><% + if(first != null) { + %></a><% + } + %></td> + <td nowrap><% + + for(int i = 0; i < numPartitions; i++) { + ResultsPartition partition = (ResultsPartition) partitions.get(i); + ArrayList partitionResults = partition.getMatches(); + int numResults = partitionResults.size(); + String imageUrl = contextRoot + "/images/line.jpg"; + String replayUrl = null; + String prettyDateTime = null; + if(numResults == 1) { + imageUrl = contextRoot + "/images/mark_one.jpg"; + CaptureSearchResult result = (CaptureSearchResult) partitionResults.get(0); + replayUrl = results.resultToReplayUrl(result); + prettyDateTime = fmt.format("TimelineView.markDateTitle",result.getCaptureDate()); + + } else if (numResults > 1) { + imageUrl = contextRoot + "/images/mark_several.jpg"; + CaptureSearchResult result = (CaptureSearchResult) partitionResults.get(numResults - 1); + replayUrl = results.resultToReplayUrl(result); + prettyDateTime = fmt.format("TimelineView.markDateTitle",result.getCaptureDate()); + + } + if((i > 0) && (i < numPartitions)) { + +%><img wmSpecial="1" border=0 width=1 height=16 src="<%= contextRoot %>/images/linemark.jpg"><% + + } + + if(replayUrl == null) { + +%><img wmSpecial="1" border=0 width=7 height=16 src="<%= imageUrl %>"><% + + } else { + +%><a wmSpecial="1" href="<%= replayUrl %>"><img wmSpecial="1" border=0 width=7 height=16 title="<%= prettyDateTime %>" src="<%= imageUrl %>"></a><% + + } + } + +%></td> + <td nowrap><% + titleString = ""; + if(next != null) { + titleString = "title=\"" + + fmt.format("TimelineView.nextVersionTitle", + next.getCaptureDate()) + "\""; + %><a wmSpecial="1" href="<%= results.resultToReplayUrl(next) %>"><% + } + %><img wmSpecial="1" <%= titleString %> border=0 width=13 height=20 src="<%= contextRoot %>/images/next.jpg"><% + if(first != null) { + %></a><% + } + titleString = ""; + if(last != null) { + titleString = "title=\"" + + fmt.format("TimelineView.lastVersionTitle", + last.getCaptureDate()) + "\""; + %><a wmSpecial="1" href="<%= results.resultToReplayUrl(last) %>"><% + } + %><img wmSpecial="1" <%= titleString %> border=0 width=19 height=20 src="<%= contextRoot %>/images/last.jpg"><% + if(first != null) { + %></a><% + } + %></td> + </tr> + </table> + </td> + <td align="right" width="400"> + <!-- Resolution --> + <!-- + need to get cookie data passing set up before this can be re-enabled: + <form wmSpecial="1" name="timeline" method="GET" target="_top" action="<%= contextRoot + "/frameset" %>"> + <input type="hidden" name="url" value="<%= searchUrl %>"> + <input type="hidden" name="exactdate" value="<%= exactDateStr %>"> + <input type="hidden" name="type" value="urlclosestquery"> + <%= fmt.format("TimelineView.timeRange") %> + <select NAME="resolution" SIZE="1" onChange="changeResolution()"> + <option <%= yearsOptSelected %> value="years"> + <%= fmt.format("TimelineView.timeRange.years") %> + </option> + <option <%= monthsOptSelected %> value="months"> + <%= fmt.format("TimelineView.timeRange.months") %> + </option> + <option <%= daysOptSelected %> value="days"> + <%= fmt.format("TimelineView.timeRange.days") %> + </option> + <option <%= hoursOptSelected %> value="hours"> + <%= fmt.format("TimelineView.timeRange.hours") %> + </option> + <option <%= autoOptSelected %> value="auto"><%= autoOptString %></option> + </select> <%= + fmt.format("TimelineView.metaDataCheck") + %><input type="checkbox" name="<%= WaybackRequest.REQUEST_META_MODE %>" value="<%= WaybackRequest.REQUEST_YES %>" <%= + metaChecked + %> onClick="changeMeta()">  + </form> + --> + <a wmSpecial="1" href="<%= contextRoot %>/help.jsp" target="_top"><%= + fmt.format("UIGlobal.helpLink") + %></a> + </td> + <td> + <img wmSpecial="1" alt='' height='1' src='<%= contextRoot %>/images/1px.gif' width='5'> + </td> + </tr> +</table> +</div> +<script type="text/javascript"> + var daDiv = document.getElementById("wm-ipp"); + var daParentNode = daDiv.parentNode; + var daBody = document.body; + daParentNode.removeChild(daDiv); + daBody.insertBefore(daDiv,daBody.firstChild); +</script> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/client-rewrite.js (from rev 2161, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/client-rewrite.js) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/client-rewrite.js (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/client-rewrite.js 2008-07-21 23:21:07 UTC (rev 2465) @@ -0,0 +1,65 @@ + +function xResolveUrl(url) { + var image = new Image(); + image.src = url; + return image.src; +} +function xLateUrl(aCollection, sProp) { + var i = 0; + for(i = 0; i < aCollection.length; i++) { + if(aCollection[i].getAttribute(sProp) && + (aCollection[i].getAttribute(sProp).length > 0) && + (typeof(aCollection[i][sProp]) == "string")) { + + if(aCollection[i][sProp].indexOf("mailto:") == -1 && + aCollection[i][sProp].indexOf("javascript:") == -1) { + + var wmSpecial = aCollection[i].getAttribute("wmSpecial"); + if(wmSpecial && wmSpecial.length > 0) { + } else { + if(aCollection[i][sProp].indexOf(sWayBackCGI) == -1) { + if(aCollection[i][sProp].indexOf("http") == 0) { + aCollection[i][sProp] = sWayBackCGI + aCollection[i][sProp]; + } else { + aCollection[i][sProp] = sWayBackCGI + xResolveUrl(aCollection[i][sProp]); + } + } + } + } + } + } +} + +xLateUrl(document.getElementsByTagName("IMG"),"src"); +xLateUrl(document.getElementsByTagName("A"),"href"); +xLateUrl(document.getElementsByTagName("AREA"),"href"); +xLateUrl(document.getElementsByTagName("OBJECT"),"codebase"); +xLateUrl(document.getElementsByTagName("OBJECT"),"data"); +xLateUrl(document.getElementsByTagName("APPLET"),"codebase"); +xLateUrl(document.getElementsByTagName("APPLET"),"archive"); +xLateUrl(document.getElementsByTagName("EMBED"),"src"); +xLateUrl(document.getElementsByTagName("IFRAME"),"src"); +xLateUrl(document.getElementsByTagName("INPUT"),"src"); +xLateUrl(document.getElementsByTagName("BODY"),"background"); +var forms = document.getElementsByTagName("FORM"); +if (forms) { + var j = 0; + for (j = 0; j < forms.length; j++) { + f = forms[j]; + if (typeof(f.action) == "string") { + if(typeof(f.method) == "string") { + if(typeof(f.method) != "post") { + var resolved = ""; + var orig = f.action; + if(f.action.indexOf("http") == 0) { + resolved = f.action; + } else { + resolved = xResolveUrl(f.action); + } + // this does not work on firefox... + f.action = sWayBackCGI + resolved; + } + } + } + } +} Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/disclaim-element.js (from rev 2150, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/replay/disclaim-element.js) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/disclaim-element.js (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/disclaim-element.js 2008-07-21 23:21:07 UTC (rev 2465) @@ -0,0 +1,29 @@ +function getFrameArea(frame) { + if(frame.innerWidth) return frame.innerWidth * frame.innerHeight; + if(frame.document.documentElement && frame.document.documentElement.clientHeight) return frame.document.documentElement.clientWidth * frame.document.documentElement.clientHeight; + if(frame.document.body) return frame.document.body.clientWidth * frame.document.body.clientHeight; + return 0; +} + +function disclaimElement(element) { + if(top!=self) { + if(top.document.body.tagName == "BODY") { + return; + } + largestArea = 0; + largestFrame = null; + for(i=0;i<top.frames.length;i++) { + frame = top.frames[i]; + area = getFrameArea(frame); + if(area > largestArea) { + largestFrame = frame; + largestArea = area; + } + } + if(self!=largestFrame) { + return; + } + } + element.style.display="block"; + document.body.insertBefore(element,document.body.firstChild); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2008-07-21 23:22:34
|
Revision: 2467 http://archive-access.svn.sourceforge.net/archive-access/?rev=2467&view=rev Author: bradtofel Date: 2008-07-21 23:22:43 +0000 (Mon, 21 Jul 2008) Log Message: ----------- MOVE: webapp/template -> webapp/WEB-INF/template Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/CookieJS.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-footer.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-header.jsp Removed Paths: ------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-footer.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-header.jsp Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/CookieJS.jsp (from rev 2455, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/template/CookieJS.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/CookieJS.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/CookieJS.jsp 2008-07-21 23:22:43 UTC (rev 2467) @@ -0,0 +1,18 @@ +<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> +<%@ page import="org.archive.wayback.core.WaybackRequest" %> +<script type="text/javascript"> +function SetCookie(cookieName,cookieValue,nDays) { + var today = new Date(); + var expire = new Date(); + if (nDays==null || nDays==0) nDays=1; + expire.setTime(today.getTime() + 86400000*nDays); + document.cookie = cookieName+"="+escape(cookieValue) + + ";expires="+expire.toGMTString() + ";path=/"; +} +function SetAnchorDate(date) { + SetCookie("<%= WaybackRequest.REQUEST_ANCHOR_DATE %>",date,365); +} +function SetAnchorWindow(maxSeconds) { + SetCookie("<%= WaybackRequest.REQUEST_ANCHOR_WINDOW %>",maxSeconds,365); +} +</script> \ No newline at end of file Deleted: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-footer.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/template/UI-footer.jsp 2008-04-11 03:51:10 UTC (rev 2227) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-footer.jsp 2008-07-21 23:22:43 UTC (rev 2467) @@ -1,24 +0,0 @@ -<%@ page import="org.archive.wayback.core.UIResults" %> -<%@ page import="org.archive.wayback.util.StringFormatter" %> -<% -UIResults results = UIResults.getFromRequest(request); -StringFormatter fmt = results.getFormatter(); -String contextRoot = results.getContextPrefix(); -String serverRoot = results.getServerPrefix(); -%> -<!-- FOOTER --> - <div align="center"> - <hr noshade size="1" align="center"> - - <p> - <a href="<%= contextRoot %>"> - <%= fmt.format("UIGlobal.homeLink") %> - </a> | - <a href="<%= contextRoot %>help.jsp"> - <%= fmt.format("UIGlobal.helpLink") %> - </a> - </p> - </div> - </body> -</html> -<!-- /FOOTER --> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-footer.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/template/UI-footer.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-footer.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-footer.jsp 2008-07-21 23:22:43 UTC (rev 2467) @@ -0,0 +1,25 @@ +<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> +<%@ page import="org.archive.wayback.core.UIResults" %> +<%@ page import="org.archive.wayback.util.StringFormatter" %> +<% +UIResults results = UIResults.getGeneric(request); +StringFormatter fmt = results.getWbRequest().getFormatter(); +String contextRoot = results.getWbRequest().getContextPrefix(); +String serverRoot = results.getWbRequest().getServerPrefix(); +%> +<!-- FOOTER --> + <div align="center"> + <hr noshade size="1" align="center"> + + <p> + <a href="<%= contextRoot %>"> + <%= fmt.format("UIGlobal.homeLink") %> + </a> | + <a href="<%= contextRoot %>help.jsp"> + <%= fmt.format("UIGlobal.helpLink") %> + </a> + </p> + </div> + </body> +</html> +<!-- /FOOTER --> Deleted: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-header.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/template/UI-header.jsp 2008-04-11 03:51:10 UTC (rev 2227) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-header.jsp 2008-07-21 23:22:43 UTC (rev 2467) @@ -1,108 +0,0 @@ -<!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.UIResults" %> -<%@ page import="org.archive.wayback.util.StringFormatter" %> -<%@ page language="java" pageEncoding="utf-8" contentType="text/html;charset=utf-8"%> -<% -UIResults results = UIResults.getFromRequest(request); -StringFormatter fmt = results.getFormatter(); -String contextRoot = results.getContextPrefix(); -String serverRoot = results.getServerPrefix(); -%> -<!-- HEADER --> -<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="<%= contextRoot %>css/styles.css" - src="<%= contextRoot %>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="<%= contextRoot %>"><img src="<%= contextRoot %>images/wayback_logo_sm.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="<%= contextRoot %>query" method="get"> - - - <tr> - <td nowrap align="center"><img src="<%= contextRoot %>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="type" value="urlquery"> - <input type="text" name="url" value="http://" size="24" maxlength="256"> - - </b> - <select name="date" size="1"> - <option value="" selected><%= fmt.format("UIGlobal.selectYearAll") %></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="<%= contextRoot %>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> -<!-- /HEADER --> Copied: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-header.jsp (from rev 2447, trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/template/UI-header.jsp) =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-header.jsp (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/template/UI-header.jsp 2008-07-21 23:22:43 UTC (rev 2467) @@ -0,0 +1,111 @@ +<!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 contextRoot = wbRequest.getContextPrefix(); +String serverRoot = wbRequest.getServerPrefix(); +%> +<!-- HEADER --> +<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="<%= contextRoot %>css/styles.css" + src="<%= contextRoot %>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="<%= contextRoot %>"><img src="<%= contextRoot %>images/wayback_logo_sm.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="<%= contextRoot %>query" method="get"> + + + <tr> + <td nowrap align="center"><img src="<%= contextRoot %>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="<%= contextRoot %>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> +<!-- /HEADER --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2008-07-22 02:48:06
|
Revision: 2481 http://archive-access.svn.sourceforge.net/archive-access/?rev=2481&view=rev Author: bradtofel Date: 2008-07-22 02:48:14 +0000 (Tue, 22 Jul 2008) Log Message: ----------- REFACTOR: moved all the cumbersome wiring Spring code for the various Replay modes into separate files, which are now imported into the main wayback.xml file. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/DomainPrefixReplay.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ProxyReplay.xml Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml 2008-07-22 02:48:14 UTC (rev 2481) @@ -0,0 +1,105 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + + <bean id="archivalurlhttpheaderprocessor" class="org.archive.wayback.replay.RedirectRewritingHttpHeaderProcessor" /> + + <bean id="archivaldateredirectingreplayrenderer" class="org.archive.wayback.replay.DateRedirectReplayRenderer" /> + <bean id="archivalcssreplayrenderer" class="org.archive.wayback.archivalurl.ArchivalUrlCSSReplayRenderer"> + <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> + </bean> + <bean id="archivalasxreplayrenderer" class="org.archive.wayback.archivalurl.ArchivalUrlASXReplayRenderer"> + <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> + </bean> + <bean id="archivaltransparentreplayrenderer" class="org.archive.wayback.replay.TransparentReplayRenderer"> + <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> + </bean> + + <bean id="archivalserversidehtmlreplayrenderer" class="org.archive.wayback.archivalurl.ServerSideHTMLReplayRenderer"> + <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> + <property name="jspInserts"> + <list> + <value>/WEB-INF/replay/ArchiveComment.jsp</value> +<!-- + <value>/WEB-INF/replay/JSLessTimeline.jsp</value> +--> + </list> + </property> + </bean> + + <bean id="archivalclientsidehtmlreplayrenderer" class="org.archive.wayback.archivalurl.ClientSideHTMLReplayRenderer"> + <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> + <property name="jspInserts"> + <list> + <value>/WEB-INF/replay/ArchiveComment.jsp</value> + <value>/WEB-INF/replay/ClientSideJSInsert.jsp</value> + <value>/WEB-INF/replay/DebugBanner.jsp</value> +<!-- + <value>/WEB-INF/replay/Disclaimer.jsp</value> + <value>/WEB-INF/replay/Timeline.jsp</value> +--> + </list> + </property> + </bean> + + <bean id="archivalurlreplay" class="org.archive.wayback.replay.SelectorReplayDispatcher"> + <property name="selectors"> + <list> + + <!-- REDIRECT IF NOT EXACT DATE --> + <bean class="org.archive.wayback.replay.selector.DateMismatchSelector"> + <property name="renderer" ref="archivaldateredirectingreplayrenderer"/> + </bean> + + <!-- HTML REPLAY --> + <bean class="org.archive.wayback.replay.selector.MimeTypeSelector"> + <property name="mimeContains"> + <list> + <value>text/html</value> + <value>application/xhtml</value> + </list> + </property> + <property name="renderer" ref="archivalclientsidehtmlreplayrenderer"/> + </bean> + + <!-- CSS REPLAY --> + <bean class="org.archive.wayback.replay.selector.MimeTypeSelector"> + <property name="mimeContains"> + <list> + <value>text/css</value> + </list> + </property> + <property name="renderer" ref="archivalcssreplayrenderer"/> + </bean> + + <!-- ASX-MIME REPLAY --> + <bean class="org.archive.wayback.replay.selector.MimeTypeSelector"> + <property name="mimeContains"> + <list> + <value>video/x-ms-asf</value> + </list> + </property> + <property name="renderer" ref="archivalasxreplayrenderer"/> + </bean> + + <!-- ASX-PATH REPLAY --> + <bean class="org.archive.wayback.replay.selector.PathMatchSelector"> + <property name="pathContains"> + <list> + <value>.asx</value> + </list> + </property> + <property name="renderer" ref="archivalasxreplayrenderer"/> + </bean> + + <!-- DEFAULT-TRANSPARENT REPLAY --> + <bean class="org.archive.wayback.replay.selector.AlwaysMatchSelector"> + <property name="renderer" ref="archivaltransparentreplayrenderer"/> + </bean> + + </list> + </property> + </bean> +</beans> \ No newline at end of file Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/DomainPrefixReplay.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/DomainPrefixReplay.xml (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/DomainPrefixReplay.xml 2008-07-22 02:48:14 UTC (rev 2481) @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + + <bean id="domainprefixhttpheaderprocessor" class="org.archive.wayback.replay.RedirectRewritingHttpHeaderProcessor" /> + + <bean id="domainprefixdateredirectingreplayrenderer" class="org.archive.wayback.replay.DateRedirectReplayRenderer" /> + <bean id="domainprefixtransparentreplayrenderer" class="org.archive.wayback.replay.TransparentReplayRenderer"> + <constructor-arg><ref bean="domainprefixhttpheaderprocessor"/></constructor-arg> + </bean> + + <bean id="domainprefixtextreplayrenderer" class="org.archive.wayback.domainprefix.DomainPrefixTextReplayRenderer"> + <constructor-arg><ref bean="domainprefixhttpheaderprocessor"/></constructor-arg> + <property name="jspInserts"> + <list> + <value>/WEB-INF/replay/ArchiveComment.jsp</value> + <value>/WEB-INF/replay/DebugBanner.jsp</value> +<!-- + <value>/WEB-INF/replay/JSLessTimeline.jsp</value> +--> + </list> + </property> + </bean> + + <bean id="domainprefixreplay" class="org.archive.wayback.replay.SelectorReplayDispatcher"> + <property name="selectors"> + <list> + + <!-- REDIRECT IF NOT EXACT DATE --> + <bean class="org.archive.wayback.replay.selector.DateMismatchSelector"> + <property name="renderer" ref="domainprefixdateredirectingreplayrenderer"/> + </bean> + + <!-- HTML REPLAY --> + <bean class="org.archive.wayback.replay.selector.MimeTypeSelector"> + <property name="mimeContains"> + <list> + <value>text/html</value> + <value>application/xhtml</value> + </list> + </property> + <property name="renderer" ref="domainprefixtextreplayrenderer"/> + </bean> + <!-- DEFAULT-TRANSPARENT REPLAY --> + <bean class="org.archive.wayback.replay.selector.AlwaysMatchSelector"> + <property name="renderer" ref="domainprefixtransparentreplayrenderer"/> + </bean> + + </list> + </property> + </bean> +</beans> \ No newline at end of file Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ProxyReplay.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ProxyReplay.xml (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ProxyReplay.xml 2008-07-22 02:48:14 UTC (rev 2481) @@ -0,0 +1,48 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + + <bean id="identityhttpheaderprocessor" class="org.archive.wayback.replay.IdentityHttpHeaderProcessor" /> + + <bean id="proxytransparentreplayrenderer" class="org.archive.wayback.replay.TransparentReplayRenderer"> + <constructor-arg><ref bean="identityhttpheaderprocessor"/></constructor-arg> + </bean> + <bean id="proxymarkupreplayrenderer" class="org.archive.wayback.proxy.ProxyHTMLMarkupReplayRenderer"> + <constructor-arg><ref bean="identityhttpheaderprocessor"/></constructor-arg> + <property name="jspInserts"> + <list> + <value>/WEB-INF/replay/ArchiveComment.jsp</value> + <value>/WEB-INF/replay/Disclaimer.jsp</value> +<!-- + <value>/replay/JSLessTimeline.jsp</value> +--> + </list> + </property> + </bean> + + <bean id="proxyreplay" class="org.archive.wayback.replay.SelectorReplayDispatcher"> + <property name="selectors"> + <list> + + <!-- HTML REPLAY --> + <bean class="org.archive.wayback.replay.selector.MimeTypeSelector"> + <property name="mimeContains"> + <list> + <value>text/html</value> + <value>application/xhtml</value> + </list> + </property> + <property name="renderer" ref="proxymarkupreplayrenderer"/> + </bean> + + <!-- DEFAULT-TRANSPARENT REPLAY --> + <bean class="org.archive.wayback.replay.selector.AlwaysMatchSelector"> + <property name="renderer" ref="proxytransparentreplayrenderer"/> + </bean> + + </list> + </property> + </bean> +</beans> \ No newline at end of file Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml 2008-07-22 02:45:34 UTC (rev 2480) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml 2008-07-22 02:48:14 UTC (rev 2481) @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> -<beans> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> <!-- The following 3 beans are required when using the ArcProxy for providing @@ -8,19 +10,6 @@ or directories. --> <!-- - <bean id="filelocationdb" class="org.archive.wayback.resourcestore.http.FileLocationDB" - init-method="init"> - <property name="bdbPath" value="/tmp/wayback/arc-db" /> - <property name="bdbName" value="DB1" /> - <property name="logPath" value="/tmp/wayback/arc-db.log" /> - </bean> - - <bean name="8080:arcproxy" class="org.archive.wayback.resourcestore.http.ArcProxyServlet"> - <property name="locationDB" ref="filelocationdb" /> - </bean> - <bean name="8080:locationdb" class="org.archive.wayback.resourcestore.http.FileLocationDBServlet"> - <property name="locationDB" ref="filelocationdb" /> - </bean> --> @@ -34,7 +23,6 @@ <property name="arcCacheDir"> <bean class="org.archive.wayback.liveweb.ARCCacheDirectory" init-method="init"> - <property name="arcDir" value="/tmp/wayback/liveweb/arcs/" /> <property name="arcPrefix" value="live" /> </bean> @@ -67,19 +55,21 @@ <property name="webCache" ref="livewebcache" /> </bean> --> + <!-- - The following bean is an example using the Access Control Oracle, thanks Alex Osborne. - Currently this is pretty undocumented, but here is a place to get started: + The following bean is an example using the Access Control Oracle, thanks + Alex Osborne and NLA. Currently this is pretty undocumented, but here is a + place to get started: http://webteam.archive.org/confluence/display/wayback/Exclusions+API --> -<!-- + <bean id="excluder-factory-oracle" class="org.archive.wayback.accesscontrol.oracleclient.OracleExclusionFilterFactory"> - <property name="oracleUrl" value="http://192.168.1.11:8080/oracle-0.0.1-SNAPSHOT/" /> + <property name="oracleUrl" value="http://localhost:8180/oracle/" /> <property name="accessGroup" value="ia_archiver" /> </bean> ---> +<!-- <bean id="localbdbcollection" class="org.archive.wayback.webapp.WaybackCollection"> <property name="resourceStore"> @@ -125,8 +115,123 @@ </bean> </property> </bean> +--> + + + <!-- + <property name="annotater"> + <bean class="org.archive.wayback.resourceindex.filters.OracleAnnotationFilter"> + <property name="oracleUrl" value="http://localhost:8180/oracle/" /> + <property name="who" value="annotation" /> + </bean> + </property> +--> + + <bean id="resourcefilelocationdb" class="org.archive.wayback.resourcestore.locationdb.BDBResourceFileLocationDB" + init-method="init"> + <property name="bdbPath" value="/tmp/wayback/file-db" /> + <property name="bdbName" value="DB1" /> + <property name="logPath" value="/tmp/wayback/file-db.log" /> + </bean> + <bean name="8080:locationdb" class="org.archive.wayback.resourcestore.locationdb.ResourceFileLocationDBServlet"> + <property name="locationDB" ref="resourcefilelocationdb" /> + </bean> + <bean name="8080:fileproxy" class="org.archive.wayback.resourcestore.locationdb.FileProxyServlet"> + <property name="locationDB" ref="resourcefilelocationdb" /> + </bean> + <bean id="indexqueue" class="org.archive.wayback.resourcestore.indexer.DirectoryIndexQueue"> + <property name="path" value="/tmp/wayback/indexer-queue" /> + </bean> + + <bean id="localbdbresourceindex" class="org.archive.wayback.resourceindex.LocalResourceIndex"> + <property name="source"> + <bean class="org.archive.wayback.resourceindex.bdb.BDBIndex" + init-method="init"> + <property name="bdbName" value="DB1" /> + <property name="bdbPath" value="/tmp/wayback/index/" /> + </bean> + </property> + <property name="maxRecords" value="10000" /> + </bean> + + <bean id="localbdbcollection" class="org.archive.wayback.webapp.WaybackCollection"> + + <property name="resourceStore"> + <bean id="localresourcestore" class="org.archive.wayback.resourcestore.LocalResourceFileResourceStore"> + <property name="db" ref="resourcefilelocationdb" /> + </bean> + </property> + + <property name="resourceIndex" ref="localbdbresourceindex"/> + + <property name="shutdownables"> + <list> + <!-- This thread notices new files appearing in your resourcefilesources --> + <bean id="resourcefilesourceupdater" class="org.archive.wayback.resourcestore.resourcefile.ResourceFileSourceUpdater" + init-method="init"> + <property name="target" value="/tmp/wayback/file-db-incoming" /> + <property name="interval" value="100000" /> + <property name="sources"> + <list> + <bean id="resourcefilesource" class="org.archive.wayback.resourcestore.resourcefile.DirectoryResourceFileSource"> + <property name="name" value="braddir1" /> + <property name="prefix" value="/tmp/wayback/files1/" /> + </bean> + </list> + </property> + </bean> + + <!-- This thread updates the location db with updates from resourcefilesourceupdater --> + <bean id="resourcefilelocationdbupdater" class="org.archive.wayback.resourcestore.locationdb.ResourceFileLocationDBUpdater" + init-method="init"> + <property name="interval" value="100000" /> + <property name="db" ref="resourcefilelocationdb" /> + <property name="incomingDir" value="/tmp/wayback/file-db-incoming" /> + <property name="stateDir" value="/tmp/wayback/file-db-state" /> + </bean> + + <!-- This thread notices new files arriving in the filelocationdb, and queues them for indexing --> + <bean id="indexqueueupdater" class="org.archive.wayback.resourcestore.indexer.IndexQueueUpdater" + init-method="init"> + <property name="db" ref="resourcefilelocationdb" /> + <property name="queue" ref="indexqueue" /> + <property name="interval" value="1000" /> + <property name="lastMark" value="/tmp/wayback/index-queue.mark" /> + </bean> + + <!-- This thread checks the to-be-indexed queue for files needing indexing, indexes them, and hands off the results for merging with the ResourceIndex --> + <bean id="indexworker" class="org.archive.wayback.resourcestore.indexer.IndexWorker" + init-method="init"> + <property name="db" ref="resourcefilelocationdb" /> + <property name="queue" ref="indexqueue" /> + <property name="interval" value="1000" /> + <property name="target"> + <bean class="org.archive.wayback.resourceindex.updater.IndexClient"> + <property name="tmpDir" value="/tmp/wayback/index-data/tmp/" /> + <property name="target" value="/tmp/wayback/index-data/incoming/" /> + </bean> + </property> + </bean> + + <!-- This thread merges updates from the indexworker into the ResourceIndex --> + <bean class="org.archive.wayback.resourceindex.updater.LocalResourceIndexUpdater" + init-method="init"> + + <property name="index" ref="localbdbresourceindex" /> + <property name="incoming" value="/tmp/wayback/index-data/incoming/" /> + <property name="failed" value="/tmp/wayback/index-data/failed/" /> + <property name="merged" value="/tmp/wayback/index-data/merged/" /> + <property name="runInterval" value="10000" /> + </bean> + </list> + </property> + </bean> + + + +<!-- The following WaybackCollection bean template is required when using a manually built local CDX index. --> @@ -157,8 +262,8 @@ <!-- The following WaybackCollection bean template is required when using a remote ResourceIndex and ResourceStore implementation. This will also - required setting up an arcproxy and locationdb on the host specified by - the resourceStore:urlPrefix configuration, and an addition AccessPoint + require setting up an arcproxy and locationdb on the host specified by + the resourceStore:urlPrefix configuration, and an additional AccessPoint on the host specified by the resourceIndex:searchUrlBase configuration. --> <!-- @@ -176,8 +281,6 @@ <property name="searchUrlBase" value="http://indexhost:8080/index/xmlquery" /> </bean> </property> - - </bean> --> @@ -188,23 +291,28 @@ installation. You may also need to ensure that the maxRecords on your RequestParser is not greater than the maxRecords configured on the RemoteNutchResourceIndex. --> -<!-- + <bean id="remotenutchcollection" class="org.archive.wayback.webapp.WaybackCollection"> <property name="resourceStore"> <bean class="org.archive.wayback.resourcestore.Http11ResourceStore"> - <property name="urlPrefix" value="http://localhost:8080/arcproxy/" /> +<!-- + <property name="urlPrefix" value="http://crawling11.us.archive.org/arcproxy/" /> +--> + <property name="urlPrefix" value="http://webapp100.us.archive.org/arcproxy/" /> </bean> </property> <property name="resourceIndex"> <bean class="org.archive.wayback.resourceindex.NutchResourceIndex" init-method="init"> +<!-- <property name="searchUrlBase" value="http://webteam-ws.us.archive.org:8080/katrina/opensearch" /> + --> + <property name="searchUrlBase" value="http://192.168.1.208:9090/nutch-1.0-dev/opensearch" /> <property name="maxRecords" value="100" /> </bean> </property> </bean> ---> <!-- This is the only AccessPoint defined by default within this wayback.xml @@ -216,51 +324,32 @@ running Tomcat. To provide external access, replace "localhost" with your fully qualified hostname of the computer running Tomcat. --> + <import resource="ArchivalUrlReplay.xml"/> <bean name="8080:wayback" class="org.archive.wayback.webapp.AccessPoint"> - + <!-- + <property name="exclusionFactory" ref="excluder-factory-oracle" /> + --> <property name="collection" ref="localbdbcollection" /> + <property name="configs"> + <props> + <prop key="inst">foo</prop> + <prop key="coll">supreme court</prop> + </props> + </property> <property name="uriConverter"> <bean class="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter"> - <property name="replayURIPrefix" value="http://localhost:8080/wayback/" /> + <property name="replayURIPrefix" value="http://localhost:8080/wayback/"/> </bean> </property> <property name="query"> <bean class="org.archive.wayback.query.Renderer"> - <property name="captureJsp" value="/jsp/HTMLResults.jsp" /> + <property name="captureJsp" value="/WEB-INF/query/CalendarResults.jsp" /> </bean> </property> - <property name="replay"> - <bean class="org.archive.wayback.archivalurl.ArchivalUrlReplayDispatcher"> - <property name="serverSideRendering" value="false" /> - <property name="jspInserts"> - <list> - <value>/replay/ArchiveComment.jsp</value> - <value>/replay/ClientSideJSInsert.jsp</value> -<!-- - The following 2 .jsp include values will produce in-page elements within - replayed HTML pages. Both require client-side Javascript. ---> -<!-- - <value>/replay/Disclaimer.jsp</value> - <value>/replay/Timeline.jsp</value> ---> -<!-- - The following .jsp include value will produce a timeline within *all* replayed - pages, including all subframes within a frameset, but requires no client side - Javascript. It is intended for use in deployments which use: - - serverSideRendering=true ---> -<!-- - <value>/replay/JSLessTimeline.jsp</value> ---> - </list> - </property> - </bean> - </property> + <property name="replay" ref="archivalurlreplay" /> <property name="parser"> <bean class="org.archive.wayback.archivalurl.ArchivalUrlRequestParser" @@ -271,20 +360,68 @@ </property> </bean> + <bean name="8080:rwayback" parent="8080:wayback"> + <property name="parser"> + <bean class="org.archive.wayback.archivalurl.ArchivalUrlRequestParser" + init-method="init"> + <property name="maxRecords" value="100" /> + <property name="earliestTimestamp" value="1996" /> + </bean> + </property> + <property name="exception"> + <bean class="org.archive.wayback.exception.CustomNotInArchiveExceptionRenderer"> + <property name="hosts"> + <list> + <value>www.aladems.org</value> + </list> + </property> + <property name="jspHandler" value="/exception/GrayBlank.jsp"/> + </bean> + </property> + <property name="uriConverter"> + <bean class="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter"> + <property name="replayURIPrefix" value="http://localhost:8080/rwayback/" /> + </bean> + </property> + <property name="collection" ref="remotenutchcollection"> + <!-- + <bean class="org.archive.wayback.webapp.WaybackCollection"> + <property name="resourceStore" ref="fancyresourcestore" /> + <property name="resourceIndex"> + <bean class="org.archive.wayback.resourceindex.RemoteResourceIndex" + init-method="init"> + <property name="searchUrlBase" value="http://localhost:8080/wayback/xmlquery" /> + </bean> + </property> + </bean> + --> + </property> + </bean> + <!-- The following AccessPoint inherits all configuration from the 8080:wayback AccessPoint, but only allows access from the specified IP network. --> <!-- <bean name="8080:netsecure" parent="8080:wayback"> + <property name="authentication"> - <bean class="org.archive.wayback.authenticationcontrol.IPMatchesBooleanOperator"> - <property name="allowedRanges"> - <list> - <value>192.168.1.16/24</value> - </list> - </property> - </bean> + <bean class="org.archive.wayback.authenticationcontrol.AccessControlSettingOperation"> + <property name="operator"> + <bean class="org.archive.wayback.util.operator.NotBooleanOperator"> + <property name="operand"> + <bean class="org.archive.wayback.authenticationcontrol.IPMatchesBooleanOperator"> + <property name="allowedRanges"> + <list> + <value>192.168.1.16/24</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + <property name="factory" ref="excluder-factory-robot"/> + </bean> </property> <property name="uriConverter"> <bean class="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter"> @@ -293,7 +430,6 @@ </property> </bean> --> - <!-- The following AccessPoint inherits all configuration from the 8080:wayback AccessPoint, but checks live web robots.txt documents to determine if @@ -313,7 +449,24 @@ </bean> --> +<import resource="DomainPrefixReplay.xml"/> +<bean name="8081" parent="8080:wayback"> + <property name="useServerName" value="true" /> + <property name="replay" ref="domainprefixreplay" /> + <property name="uriConverter"> + <bean class="org.archive.wayback.domainprefix.DomainPrefixResultURIConverter"> + <property name="hostPort" value="localhost.archive.org:8081" /> + </bean> + </property> + <property name="parser"> + <bean class="org.archive.wayback.domainprefix.DomainPrefixCompositeRequestParser" init-method="init"> + <property name="hostPort" value="localhost.archive.org:8081" /> + <property name="maxRecords" value="1000" /> + </bean> + </property> +</bean> + <!-- The following AccessPoint inherits all configuration from the 8080:wayback AccessPoint, but provides a Proxy Replay UI to the same collection. These @@ -323,27 +476,24 @@ Note: using this AccessPoint requires adding a "Connector" on port 8090 in your Tomcat's server.xml file. --> -<!-- + <import resource="ProxyReplay.xml"/> <bean name="8090" parent="8080:wayback"> <property name="useServerName" value="true" /> - <property name="replay"> - <bean class="org.archive.wayback.proxy.ProxyReplayDispatcher" /> - </property> + <property name="replay" ref="proxyreplay" /> <property name="uriConverter"> <bean class="org.archive.wayback.proxy.RedirectResultURIConverter"> - <property name="redirectURI" value="http://foo.archive.org:8090/jsp/Redirect.jsp" /> + <property name="redirectURI" value="http://brad.archive.org/jsp/Redirect.jsp" /> </bean> </property> <property name="parser"> <bean class="org.archive.wayback.proxy.ProxyRequestParser" init-method="init"> <property name="localhostNames"> <list> - <value>foo.archive.org</value> + <value>brad.archive.org</value> </list> </property> <property name="maxRecords" value="1000" /> </bean> </property> </bean> ---> </beans> \ 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...> - 2008-08-09 02:37:44
|
Revision: 2533 http://archive-access.svn.sourceforge.net/archive-access/?rev=2533&view=rev Author: bradtofel Date: 2008-08-09 02:37:52 +0000 (Sat, 09 Aug 2008) Log Message: ----------- TWEAK: interim checkin of current configs -- not suitable for deployment, but a baseline for several alternate configurations. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/DomainPrefixReplay.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback-templates.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml 2008-08-09 02:36:45 UTC (rev 2532) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml 2008-08-09 02:37:52 UTC (rev 2533) @@ -35,7 +35,7 @@ <list> <value>/WEB-INF/replay/ArchiveComment.jsp</value> <value>/WEB-INF/replay/ClientSideJSInsert.jsp</value> - <value>/WEB-INF/replay/DebugBanner.jsp</value> + <value>/WEB-INF/replay/DebugBanner.jsp</value> <!-- <value>/WEB-INF/replay/Disclaimer.jsp</value> <value>/WEB-INF/replay/Timeline.jsp</value> Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/DomainPrefixReplay.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/DomainPrefixReplay.xml 2008-08-09 02:36:45 UTC (rev 2532) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/DomainPrefixReplay.xml 2008-08-09 02:37:52 UTC (rev 2533) @@ -16,8 +16,8 @@ <property name="jspInserts"> <list> <value>/WEB-INF/replay/ArchiveComment.jsp</value> +<!-- <value>/WEB-INF/replay/DebugBanner.jsp</value> -<!-- <value>/WEB-INF/replay/JSLessTimeline.jsp</value> --> </list> Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback-templates.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback-templates.xml 2008-08-09 02:36:45 UTC (rev 2532) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback-templates.xml 2008-08-09 02:37:52 UTC (rev 2533) @@ -23,6 +23,17 @@ </property> </bean> + +<!-- + <property name="annotater"> + <bean class="org.archive.wayback.resourceindex.filters.OracleAnnotationFilter"> + <property name="oracleUrl" value="http://localhost:8180/oracle/" /> + <property name="who" value="annotation" /> + </bean> + </property> +--> + + <!-- ResourceIndex templates --> <bean id="remoteindex" class="org.archive.wayback.resourceindex.RemoteResourceIndex" init-method="init"> Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml 2008-08-09 02:36:45 UTC (rev 2532) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml 2008-08-09 02:37:52 UTC (rev 2533) @@ -9,131 +9,12 @@ HTTP 1.1 remote access to ARC files distributed across multiple computers or directories. --> -<!-- ---> - - -<!-- - The following 2 beans are required when using exclusions based on live - robots.txt documents. ---> -<!-- - <bean id="livewebcache" class="org.archive.wayback.liveweb.LiveWebCache"> - - <property name="arcCacheDir"> - <bean class="org.archive.wayback.liveweb.ARCCacheDirectory" - init-method="init"> - <property name="arcDir" value="/tmp/wayback/liveweb/arcs/" /> - <property name="arcPrefix" value="live" /> - </bean> - </property> - - <property name="cacher"> - <bean class="org.archive.wayback.liveweb.URLCacher"> - <property name="tmpDir" value="/tmp/wayback/liveweb/tmp/" /> - </bean> - </property> - - <property name="index"> - <bean class="org.archive.wayback.liveweb.LiveWebLocalResourceIndex"> - - <property name="source"> - <bean class="org.archive.wayback.resourceindex.bdb.BDBIndex" - init-method="init"> - - <property name="bdbName" value="DB1" /> - <property name="bdbPath" value="/tmp/wayback/liveweb/db/" /> - </bean> - </property> - </bean> - </property> - </bean> - - <bean id="excluder-factory-robot" class="org.archive.wayback.accesscontrol.robotstxt.RobotExclusionFilterFactory"> - <property name="maxCacheMS" value="86400000" /> - <property name="userAgent" value="ia_archiver" /> - <property name="webCache" ref="livewebcache" /> - </bean> ---> - -<!-- - The following bean is an example using the Access Control Oracle, thanks - Alex Osborne and NLA. Currently this is pretty undocumented, but here is a - place to get started: - - http://webteam.archive.org/confluence/display/wayback/Exclusions+API ---> - - <bean id="excluder-factory-oracle" class="org.archive.wayback.accesscontrol.oracleclient.OracleExclusionFilterFactory"> - <property name="oracleUrl" value="http://localhost:8180/oracle/" /> - <property name="accessGroup" value="ia_archiver" /> - </bean> - -<!-- - <bean id="localbdbcollection" class="org.archive.wayback.webapp.WaybackCollection"> - - <property name="resourceStore"> - <bean class="org.archive.wayback.resourcestore.LocalResourceStore" - init-method="init"> - - <property name="dataDir" value="/tmp/wayback/arcs/" /> - - <property name="indexThread"> - <bean class="org.archive.wayback.resourcestore.AutoIndexThread"> - <property name="queuedDir" value="/tmp/wayback/arc-indexer/queued" /> - <property name="workDir" value="/tmp/wayback/arc-indexer/work" /> - <property name="runInterval" value="10000" /> - <property name="indexClient"> - <bean class="org.archive.wayback.resourceindex.indexer.IndexClient"> - <property name="tmpDir" value="/tmp/wayback/arc-indexer/tmp" /> - <property name="target" value="/tmp/wayback/index-data/incoming" /> - </bean> - </property> - </bean> - </property> - </bean> - </property> - - <property name="resourceIndex"> - <bean class="org.archive.wayback.resourceindex.LocalResourceIndex"> - <property name="source"> - <bean class="org.archive.wayback.resourceindex.bdb.BDBIndex" - init-method="init"> - <property name="bdbName" value="DB1" /> - <property name="bdbPath" value="/tmp/wayback/index/" /> - <property name="updater"> - <bean class="org.archive.wayback.resourceindex.bdb.BDBIndexUpdater"> - <property name="incoming" value="/tmp/wayback/index-data/incoming/" /> - <property name="failed" value="/tmp/wayback/index-data/failed/" /> - <property name="merged" value="/tmp/wayback/index-data/merged/" /> - <property name="runInterval" value="10000" /> - </bean> - </property> - </bean> - </property> - <property name="maxRecords" value="10000" /> - </bean> - </property> - </bean> ---> - - - -<!-- - <property name="annotater"> - <bean class="org.archive.wayback.resourceindex.filters.OracleAnnotationFilter"> - <property name="oracleUrl" value="http://localhost:8180/oracle/" /> - <property name="who" value="annotation" /> - </bean> - </property> ---> - <bean id="resourcefilelocationdb" class="org.archive.wayback.resourcestore.locationdb.BDBResourceFileLocationDB" init-method="init"> - <property name="bdbPath" value="/tmp/wayback/file-db" /> + <property name="bdbPath" value="/tmp/wayback/file-db/db/" /> <property name="bdbName" value="DB1" /> - <property name="logPath" value="/tmp/wayback/file-db.log" /> + <property name="logPath" value="/tmp/wayback/file-db/db.log" /> </bean> <bean name="8080:locationdb" class="org.archive.wayback.resourcestore.locationdb.ResourceFileLocationDBServlet"> <property name="locationDB" ref="resourcefilelocationdb" /> @@ -141,27 +22,27 @@ <bean name="8080:fileproxy" class="org.archive.wayback.resourcestore.locationdb.FileProxyServlet"> <property name="locationDB" ref="resourcefilelocationdb" /> </bean> + + <bean id="localbdbresourceindex" class="org.archive.wayback.resourceindex.LocalResourceIndex"> + <property name="source"> + <bean class="org.archive.wayback.resourceindex.bdb.BDBIndex" + init-method="init"> + <property name="bdbName" value="DB1" /> + <property name="bdbPath" value="/tmp/wayback/index/" /> + </bean> + </property> + <property name="maxRecords" value="10000" /> + </bean> <bean id="indexqueue" class="org.archive.wayback.resourcestore.indexer.DirectoryIndexQueue"> - <property name="path" value="/tmp/wayback/indexer-queue" /> + <property name="path" value="/tmp/wayback/index-data/queue" /> </bean> - <bean id="localbdbresourceindex" class="org.archive.wayback.resourceindex.LocalResourceIndex"> - <property name="source"> - <bean class="org.archive.wayback.resourceindex.bdb.BDBIndex" - init-method="init"> - <property name="bdbName" value="DB1" /> - <property name="bdbPath" value="/tmp/wayback/index/" /> - </bean> - </property> - <property name="maxRecords" value="10000" /> - </bean> - <bean id="localbdbcollection" class="org.archive.wayback.webapp.WaybackCollection"> <property name="resourceStore"> - <bean id="localresourcestore" class="org.archive.wayback.resourcestore.LocalResourceFileResourceStore"> - <property name="db" ref="resourcefilelocationdb" /> - </bean> + <bean id="localresourcestore" class="org.archive.wayback.resourcestore.LocalResourceFileResourceStore"> + <property name="db" ref="resourcefilelocationdb" /> + </bean> </property> <property name="resourceIndex" ref="localbdbresourceindex"/> @@ -171,14 +52,18 @@ <!-- This thread notices new files appearing in your resourcefilesources --> <bean id="resourcefilesourceupdater" class="org.archive.wayback.resourcestore.resourcefile.ResourceFileSourceUpdater" init-method="init"> - <property name="target" value="/tmp/wayback/file-db-incoming" /> + <property name="target" value="/tmp/wayback/file-db/incoming" /> <property name="interval" value="100000" /> <property name="sources"> <list> - <bean id="resourcefilesource" class="org.archive.wayback.resourcestore.resourcefile.DirectoryResourceFileSource"> - <property name="name" value="braddir1" /> + <bean class="org.archive.wayback.resourcestore.resourcefile.DirectoryResourceFileSource"> + <property name="name" value="files1" /> <property name="prefix" value="/tmp/wayback/files1/" /> </bean> + <bean class="org.archive.wayback.resourcestore.resourcefile.DirectoryResourceFileSource"> + <property name="name" value="files2" /> + <property name="prefix" value="/tmp/wayback/files2/" /> + </bean> </list> </property> </bean> @@ -188,8 +73,8 @@ init-method="init"> <property name="interval" value="100000" /> <property name="db" ref="resourcefilelocationdb" /> - <property name="incomingDir" value="/tmp/wayback/file-db-incoming" /> - <property name="stateDir" value="/tmp/wayback/file-db-state" /> + <property name="incomingDir" value="/tmp/wayback/file-db/incoming" /> + <property name="stateDir" value="/tmp/wayback/file-db/state" /> </bean> <!-- This thread notices new files arriving in the filelocationdb, and queues them for indexing --> @@ -198,7 +83,7 @@ <property name="db" ref="resourcefilelocationdb" /> <property name="queue" ref="indexqueue" /> <property name="interval" value="1000" /> - <property name="lastMark" value="/tmp/wayback/index-queue.mark" /> + <property name="lastMark" value="/tmp/wayback/index-data/queue.mark" /> </bean> <!-- This thread checks the to-be-indexed queue for files needing indexing, indexes them, and hands off the results for merging with the ResourceIndex --> @@ -217,14 +102,14 @@ <!-- This thread merges updates from the indexworker into the ResourceIndex --> <bean class="org.archive.wayback.resourceindex.updater.LocalResourceIndexUpdater" - init-method="init"> - - <property name="index" ref="localbdbresourceindex" /> - <property name="incoming" value="/tmp/wayback/index-data/incoming/" /> - <property name="failed" value="/tmp/wayback/index-data/failed/" /> - <property name="merged" value="/tmp/wayback/index-data/merged/" /> - <property name="runInterval" value="10000" /> - </bean> + init-method="init"> + + <property name="index" ref="localbdbresourceindex" /> + <property name="incoming" value="/tmp/wayback/index-data/incoming/" /> + <property name="failed" value="/tmp/wayback/index-data/failed/" /> + <property name="merged" value="/tmp/wayback/index-data/merged/" /> + <property name="runInterval" value="10000" /> + </bean> </list> </property> </bean> @@ -248,9 +133,9 @@ <property name="resourceIndex"> <bean class="org.archive.wayback.resourceindex.LocalResourceIndex"> <property name="source"> - <bean id="cdxsearchresultsource" class="org.archive.wayback.resourceindex.cdx.CDXIndex"> - <property name="path" value="/tmp/wayback/cdx-index/index.cdx" /> - </bean> + <bean id="cdxsearchresultsource" class="org.archive.wayback.resourceindex.cdx.CDXIndex"> + <property name="path" value="/tmp/wayback/cdx-index/index.cdx" /> + </bean> </property> <property name="maxRecords" value="10000" /> </bean> @@ -258,7 +143,30 @@ </bean> --> + <bean id="localcdxcollection2" class="org.archive.wayback.webapp.WaybackCollection"> + <property name="resourceStore"> + <bean class="org.archive.wayback.resourcestore.LocalResourceFileResourceStore"> + <property name="db"> + <bean class="org.archive.wayback.resourcestore.locationdb.FlatFileResourceFileLocationDB"> + <property name="path" value="/tmp/wayback/path-index.txt" /> + </bean> + </property> + </bean> + </property> + + <property name="resourceIndex"> + <bean class="org.archive.wayback.resourceindex.LocalResourceIndex"> + <property name="source"> + <bean id="cdxsearchresultsource" class="org.archive.wayback.resourceindex.cdx.CDXIndex"> + <property name="path" value="/tmp/wayback/cdx-index/index.1" /> + </bean> + </property> + <property name="maxRecords" value="10000" /> + </bean> + </property> + </bean> + <!-- The following WaybackCollection bean template is required when using a remote ResourceIndex and ResourceStore implementation. This will also @@ -266,20 +174,21 @@ the resourceStore:urlPrefix configuration, and an additional AccessPoint on the host specified by the resourceIndex:searchUrlBase configuration. --> + <!-- <bean id="remotecollection" class="org.archive.wayback.webapp.WaybackCollection"> <property name="resourceStore"> <bean class="org.archive.wayback.resourcestore.Http11ResourceStore"> - <property name="urlPrefix" value="http://localhost:8080/arcproxy/" /> + <property name="urlPrefix" value="http://wayback.archive-it.org/fileproxy/" /> </bean> </property> <property name="resourceIndex"> - <bean class="org.archive.wayback.resourceindex.RemoteResourceIndex" - init-method="init"> - <property name="searchUrlBase" value="http://indexhost:8080/index/xmlquery" /> - </bean> + <bean class="org.archive.wayback.resourceindex.RemoteResourceIndex" + init-method="init"> + <property name="searchUrlBase" value="http://wayback.archive-it.org/1055/xmlquery" /> + </bean> </property> </bean> --> @@ -291,30 +200,39 @@ installation. You may also need to ensure that the maxRecords on your RequestParser is not greater than the maxRecords configured on the RemoteNutchResourceIndex. --> - +<!-- <bean id="remotenutchcollection" class="org.archive.wayback.webapp.WaybackCollection"> <property name="resourceStore"> <bean class="org.archive.wayback.resourcestore.Http11ResourceStore"> -<!-- - <property name="urlPrefix" value="http://crawling11.us.archive.org/arcproxy/" /> ---> - <property name="urlPrefix" value="http://webapp100.us.archive.org/arcproxy/" /> + <property name="urlPrefix" value="http://webapp101.us.archive.org/arcproxy/" /> </bean> </property> <property name="resourceIndex"> <bean class="org.archive.wayback.resourceindex.NutchResourceIndex" init-method="init"> -<!-- - <property name="searchUrlBase" value="http://webteam-ws.us.archive.org:8080/katrina/opensearch" /> - --> - <property name="searchUrlBase" value="http://192.168.1.208:9090/nutch-1.0-dev/opensearch" /> + <property name="searchUrlBase" value="http://webapp101.us.archive.org/e04/xmlquery" /> <property name="maxRecords" value="100" /> </bean> </property> </bean> +--> <!-- + The following bean is an example using the Access Control Oracle, thanks + Alex Osborne and NLA. Currently this is pretty undocumented, but here is a + place to get started: + + http://webteam.archive.org/confluence/display/wayback/Exclusions+API +--> +<!-- + <bean id="excluder-factory-oracle" class="org.archive.wayback.accesscontrol.oracleclient.OracleExclusionFilterFactory"> + <property name="oracleUrl" value="http://localhost:8180/oracle/" /> + <property name="accessGroup" value="ia_archiver" /> + </bean> +--> + +<!-- This is the only AccessPoint defined by default within this wayback.xml Spring configuration file, providing an ArchivalURL Replay UI to the "localbdbcollection" by providing ArchivalURL-specific implementations @@ -325,17 +243,17 @@ fully qualified hostname of the computer running Tomcat. --> <import resource="ArchivalUrlReplay.xml"/> - <bean name="8080:wayback" class="org.archive.wayback.webapp.AccessPoint"> - <!-- + <bean name="8080:wayback" class="org.archive.wayback.webapp.AccessPoint"> + <!-- <property name="exclusionFactory" ref="excluder-factory-oracle" /> --> - <property name="collection" ref="localbdbcollection" /> - <property name="configs"> - <props> - <prop key="inst">foo</prop> - <prop key="coll">supreme court</prop> - </props> - </property> + <property name="collection" ref="localbdbcollection" /> + <property name="configs"> + <props> + <prop key="inst">foo</prop> + <prop key="coll">supreme court</prop> + </props> + </property> <property name="uriConverter"> <bean class="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter"> @@ -343,24 +261,25 @@ </bean> </property> - <property name="query"> - <bean class="org.archive.wayback.query.Renderer"> - <property name="captureJsp" value="/WEB-INF/query/CalendarResults.jsp" /> - </bean> - </property> + <property name="query"> + <bean class="org.archive.wayback.query.Renderer"> + <property name="captureJsp" value="/WEB-INF/query/CalendarResults.jsp" /> + </bean> + </property> <property name="replay" ref="archivalurlreplay" /> - <property name="parser"> - <bean class="org.archive.wayback.archivalurl.ArchivalUrlRequestParser" - init-method="init"> - <property name="maxRecords" value="1000" /> - <property name="earliestTimestamp" value="1996" /> - </bean> - </property> - </bean> + <property name="parser"> + <bean class="org.archive.wayback.archivalurl.ArchivalUrlRequestParser" + init-method="init"> + <property name="maxRecords" value="1000" /> + <property name="earliestTimestamp" value="1996" /> + </bean> + </property> + </bean> <bean name="8080:rwayback" parent="8080:wayback"> + <property name="collection" ref="localcdxcollection2" /> <property name="parser"> <bean class="org.archive.wayback.archivalurl.ArchivalUrlRequestParser" init-method="init"> @@ -383,19 +302,19 @@ <property name="replayURIPrefix" value="http://localhost:8080/rwayback/" /> </bean> </property> - <property name="collection" ref="remotenutchcollection"> <!-- - <bean class="org.archive.wayback.webapp.WaybackCollection"> - <property name="resourceStore" ref="fancyresourcestore" /> - <property name="resourceIndex"> - <bean class="org.archive.wayback.resourceindex.RemoteResourceIndex" - init-method="init"> - <property name="searchUrlBase" value="http://localhost:8080/wayback/xmlquery" /> - </bean> - </property> - </bean> - --> + <property name="collection"> + <bean class="org.archive.wayback.webapp.WaybackCollection"> + <property name="resourceStore" ref="fancyresourcestore" /> + <property name="resourceIndex"> + <bean class="org.archive.wayback.resourceindex.RemoteResourceIndex" + init-method="init"> + <property name="searchUrlBase" value="http://localhost:8080/wayback/xmlquery" /> + </bean> + </property> + </bean> </property> + --> </bean> <!-- @@ -403,32 +322,32 @@ AccessPoint, but only allows access from the specified IP network. --> <!-- - <bean name="8080:netsecure" parent="8080:wayback"> - - <property name="authentication"> + <bean name="8080:netsecure" parent="8080:wayback"> + + <property name="authentication"> <bean class="org.archive.wayback.authenticationcontrol.AccessControlSettingOperation"> <property name="operator"> <bean class="org.archive.wayback.util.operator.NotBooleanOperator"> <property name="operand"> - <bean class="org.archive.wayback.authenticationcontrol.IPMatchesBooleanOperator"> - <property name="allowedRanges"> - <list> - <value>192.168.1.16/24</value> - </list> - </property> - </bean> - </property> - </bean> - </property> - <property name="factory" ref="excluder-factory-robot"/> + <bean class="org.archive.wayback.authenticationcontrol.IPMatchesBooleanOperator"> + <property name="allowedRanges"> + <list> + <value>192.168.1.16/24</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + <property name="factory" ref="excluder-factory-robot"/> </bean> - </property> + </property> <property name="uriConverter"> <bean class="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter"> <property name="replayURIPrefix" value="http://192.168.1.16:8080/netsecure/" /> </bean> </property> - </bean> + </bean> --> <!-- The following AccessPoint inherits all configuration from the 8080:wayback @@ -449,22 +368,22 @@ </bean> --> -<import resource="DomainPrefixReplay.xml"/> -<bean name="8081" parent="8080:wayback"> - <property name="useServerName" value="true" /> - <property name="replay" ref="domainprefixreplay" /> - <property name="uriConverter"> - <bean class="org.archive.wayback.domainprefix.DomainPrefixResultURIConverter"> - <property name="hostPort" value="localhost.archive.org:8081" /> - </bean> - </property> - <property name="parser"> - <bean class="org.archive.wayback.domainprefix.DomainPrefixCompositeRequestParser" init-method="init"> - <property name="hostPort" value="localhost.archive.org:8081" /> - <property name="maxRecords" value="1000" /> - </bean> - </property> -</bean> + <import resource="DomainPrefixReplay.xml"/> + <bean name="8081" parent="8080:wayback"> + <property name="useServerName" value="true" /> + <property name="replay" ref="domainprefixreplay" /> + <property name="uriConverter"> + <bean class="org.archive.wayback.domainprefix.DomainPrefixResultURIConverter"> + <property name="hostPort" value="localhost.archive.org:8081" /> + </bean> + </property> + <property name="parser"> + <bean class="org.archive.wayback.domainprefix.DomainPrefixCompositeRequestParser" init-method="init"> + <property name="hostPort" value="localhost.archive.org:8081" /> + <property name="maxRecords" value="1000" /> + </bean> + </property> + </bean> <!-- @@ -477,23 +396,23 @@ in your Tomcat's server.xml file. --> <import resource="ProxyReplay.xml"/> -<bean name="8090" parent="8080:wayback"> - <property name="useServerName" value="true" /> - <property name="replay" ref="proxyreplay" /> - <property name="uriConverter"> - <bean class="org.archive.wayback.proxy.RedirectResultURIConverter"> - <property name="redirectURI" value="http://brad.archive.org/jsp/Redirect.jsp" /> - </bean> - </property> - <property name="parser"> - <bean class="org.archive.wayback.proxy.ProxyRequestParser" init-method="init"> - <property name="localhostNames"> - <list> - <value>brad.archive.org</value> - </list> - </property> - <property name="maxRecords" value="1000" /> - </bean> - </property> -</bean> + <bean name="8090" parent="8080:wayback"> + <property name="useServerName" value="true" /> + <property name="replay" ref="proxyreplay" /> + <property name="uriConverter"> + <bean class="org.archive.wayback.proxy.RedirectResultURIConverter"> + <property name="redirectURI" value="http://brad.archive.org/jsp/Redirect.jsp" /> + </bean> + </property> + <property name="parser"> + <bean class="org.archive.wayback.proxy.ProxyRequestParser" init-method="init"> + <property name="localhostNames"> + <list> + <value>brad.archive.org</value> + </list> + </property> + <property name="maxRecords" value="1000" /> + </bean> + </property> + </bean> </beans> \ 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...> - 2008-08-13 00:05:56
|
Revision: 2541 http://archive-access.svn.sourceforge.net/archive-access/?rev=2541&view=rev Author: bradtofel Date: 2008-08-13 00:06:02 +0000 (Wed, 13 Aug 2008) Log Message: ----------- TWEAK: unset DebugBanner, added Discalimer.jsp as default Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/DomainPrefixReplay.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml 2008-08-12 23:03:30 UTC (rev 2540) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml 2008-08-13 00:06:02 UTC (rev 2541) @@ -6,7 +6,7 @@ <bean id="archivalurlhttpheaderprocessor" class="org.archive.wayback.replay.RedirectRewritingHttpHeaderProcessor" /> - <bean id="archivaldateredirectingreplayrenderer" class="org.archive.wayback.replay.DateRedirectReplayRenderer" /> + <bean id="archivaldateredirectingreplayrenderer" class="org.archive.wayback.replay.DateRedirectReplayRenderer" /> <bean id="archivalcssreplayrenderer" class="org.archive.wayback.archivalurl.ArchivalUrlCSSReplayRenderer"> <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> </bean> @@ -33,25 +33,25 @@ <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> <property name="jspInserts"> <list> - <value>/WEB-INF/replay/ArchiveComment.jsp</value> - <value>/WEB-INF/replay/ClientSideJSInsert.jsp</value> + <value>/WEB-INF/replay/ArchiveComment.jsp</value> + <value>/WEB-INF/replay/ClientSideJSInsert.jsp</value> + <value>/WEB-INF/replay/Disclaimer.jsp</value> +<!-- <value>/WEB-INF/replay/DebugBanner.jsp</value> -<!-- - <value>/WEB-INF/replay/Disclaimer.jsp</value> <value>/WEB-INF/replay/Timeline.jsp</value> --> </list> </property> </bean> - + <bean id="archivalurlreplay" class="org.archive.wayback.replay.SelectorReplayDispatcher"> <property name="selectors"> <list> <!-- REDIRECT IF NOT EXACT DATE --> - <bean class="org.archive.wayback.replay.selector.DateMismatchSelector"> - <property name="renderer" ref="archivaldateredirectingreplayrenderer"/> - </bean> + <bean class="org.archive.wayback.replay.selector.DateMismatchSelector"> + <property name="renderer" ref="archivaldateredirectingreplayrenderer"/> + </bean> <!-- HTML REPLAY --> <bean class="org.archive.wayback.replay.selector.MimeTypeSelector"> Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/DomainPrefixReplay.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/DomainPrefixReplay.xml 2008-08-12 23:03:30 UTC (rev 2540) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/DomainPrefixReplay.xml 2008-08-13 00:06:02 UTC (rev 2541) @@ -16,6 +16,7 @@ <property name="jspInserts"> <list> <value>/WEB-INF/replay/ArchiveComment.jsp</value> + <value>/WEB-INF/replay/Disclaimer.jsp</value> <!-- <value>/WEB-INF/replay/DebugBanner.jsp</value> <value>/WEB-INF/replay/JSLessTimeline.jsp</value> Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml 2008-08-12 23:03:30 UTC (rev 2540) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml 2008-08-13 00:06:02 UTC (rev 2541) @@ -2,319 +2,104 @@ <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" + default-init-method="init"> <!-- - The following 3 beans are required when using the ArcProxy for providing - HTTP 1.1 remote access to ARC files distributed across multiple computers - or directories. + Macro-like substitutions for the overall file: + wayback.basedir: default top level directory for all index, state, + locationdb storage. --> - - <bean id="resourcefilelocationdb" class="org.archive.wayback.resourcestore.locationdb.BDBResourceFileLocationDB" - init-method="init"> - <property name="bdbPath" value="/tmp/wayback/file-db/db/" /> - <property name="bdbName" value="DB1" /> - <property name="logPath" value="/tmp/wayback/file-db/db.log" /> - </bean> - <bean name="8080:locationdb" class="org.archive.wayback.resourcestore.locationdb.ResourceFileLocationDBServlet"> - <property name="locationDB" ref="resourcefilelocationdb" /> - </bean> - <bean name="8080:fileproxy" class="org.archive.wayback.resourcestore.locationdb.FileProxyServlet"> - <property name="locationDB" ref="resourcefilelocationdb" /> - </bean> - <bean id="localbdbresourceindex" class="org.archive.wayback.resourceindex.LocalResourceIndex"> - <property name="source"> - <bean class="org.archive.wayback.resourceindex.bdb.BDBIndex" - init-method="init"> - <property name="bdbName" value="DB1" /> - <property name="bdbPath" value="/tmp/wayback/index/" /> - </bean> + <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> + <property name="properties"> + <value> + wayback.basedir=/tmp/wayback + </value> </property> - <property name="maxRecords" value="10000" /> </bean> - <bean id="indexqueue" class="org.archive.wayback.resourcestore.indexer.DirectoryIndexQueue"> - <property name="path" value="/tmp/wayback/index-data/queue" /> - </bean> - <bean id="localbdbcollection" class="org.archive.wayback.webapp.WaybackCollection"> - <property name="resourceStore"> - <bean id="localresourcestore" class="org.archive.wayback.resourcestore.LocalResourceFileResourceStore"> - <property name="db" ref="resourcefilelocationdb" /> - </bean> - </property> - - <property name="resourceIndex" ref="localbdbresourceindex"/> - - <property name="shutdownables"> - <list> - <!-- This thread notices new files appearing in your resourcefilesources --> - <bean id="resourcefilesourceupdater" class="org.archive.wayback.resourcestore.resourcefile.ResourceFileSourceUpdater" - init-method="init"> - <property name="target" value="/tmp/wayback/file-db/incoming" /> - <property name="interval" value="100000" /> - <property name="sources"> - <list> - <bean class="org.archive.wayback.resourcestore.resourcefile.DirectoryResourceFileSource"> - <property name="name" value="files1" /> - <property name="prefix" value="/tmp/wayback/files1/" /> - </bean> - <bean class="org.archive.wayback.resourcestore.resourcefile.DirectoryResourceFileSource"> - <property name="name" value="files2" /> - <property name="prefix" value="/tmp/wayback/files2/" /> - </bean> - </list> - </property> - </bean> - - <!-- This thread updates the location db with updates from resourcefilesourceupdater --> - <bean id="resourcefilelocationdbupdater" class="org.archive.wayback.resourcestore.locationdb.ResourceFileLocationDBUpdater" - init-method="init"> - <property name="interval" value="100000" /> - <property name="db" ref="resourcefilelocationdb" /> - <property name="incomingDir" value="/tmp/wayback/file-db/incoming" /> - <property name="stateDir" value="/tmp/wayback/file-db/state" /> - </bean> - - <!-- This thread notices new files arriving in the filelocationdb, and queues them for indexing --> - <bean id="indexqueueupdater" class="org.archive.wayback.resourcestore.indexer.IndexQueueUpdater" - init-method="init"> - <property name="db" ref="resourcefilelocationdb" /> - <property name="queue" ref="indexqueue" /> - <property name="interval" value="1000" /> - <property name="lastMark" value="/tmp/wayback/index-data/queue.mark" /> - </bean> - - <!-- This thread checks the to-be-indexed queue for files needing indexing, indexes them, and hands off the results for merging with the ResourceIndex --> - <bean id="indexworker" class="org.archive.wayback.resourcestore.indexer.IndexWorker" - init-method="init"> - <property name="db" ref="resourcefilelocationdb" /> - <property name="queue" ref="indexqueue" /> - <property name="interval" value="1000" /> - <property name="target"> - <bean class="org.archive.wayback.resourceindex.updater.IndexClient"> - <property name="tmpDir" value="/tmp/wayback/index-data/tmp/" /> - <property name="target" value="/tmp/wayback/index-data/incoming/" /> - </bean> - </property> - </bean> - - <!-- This thread merges updates from the indexworker into the ResourceIndex --> - <bean class="org.archive.wayback.resourceindex.updater.LocalResourceIndexUpdater" - init-method="init"> - - <property name="index" ref="localbdbresourceindex" /> - <property name="incoming" value="/tmp/wayback/index-data/incoming/" /> - <property name="failed" value="/tmp/wayback/index-data/failed/" /> - <property name="merged" value="/tmp/wayback/index-data/merged/" /> - <property name="runInterval" value="10000" /> - </bean> - </list> - </property> - </bean> - - - <!-- - The following WaybackCollection bean template is required when using a - manually built local CDX index. + The ResourceFileLocationDB implementation to use for mapping ARC/WARC names + to absolute paths/URLs via a BDBJE database. --> -<!-- - <bean id="localcdxcollection" class="org.archive.wayback.webapp.WaybackCollection"> - <property name="resourceStore"> - <bean class="org.archive.wayback.resourcestore.LocalResourceStore" - init-method="init"> - <property name="dataDir" value="/tmp/wayback/arcs/" /> - </bean> - </property> - - <property name="resourceIndex"> - <bean class="org.archive.wayback.resourceindex.LocalResourceIndex"> - <property name="source"> - <bean id="cdxsearchresultsource" class="org.archive.wayback.resourceindex.cdx.CDXIndex"> - <property name="path" value="/tmp/wayback/cdx-index/index.cdx" /> - </bean> - </property> - <property name="maxRecords" value="10000" /> - </bean> - </property> + <bean id="resourcefilelocationdb" class="org.archive.wayback.resourcestore.locationdb.BDBResourceFileLocationDB"> + <property name="bdbPath" value="${wayback.basedir}/file-db/db/" /> + <property name="bdbName" value="DB1" /> + <property name="logPath" value="${wayback.basedir}/file-db/db.log" /> </bean> ---> - <bean id="localcdxcollection2" class="org.archive.wayback.webapp.WaybackCollection"> - - <property name="resourceStore"> - <bean class="org.archive.wayback.resourcestore.LocalResourceFileResourceStore"> - <property name="db"> - <bean class="org.archive.wayback.resourcestore.locationdb.FlatFileResourceFileLocationDB"> - <property name="path" value="/tmp/wayback/path-index.txt" /> - </bean> - </property> - </bean> - </property> - - <property name="resourceIndex"> - <bean class="org.archive.wayback.resourceindex.LocalResourceIndex"> - <property name="source"> - <bean id="cdxsearchresultsource" class="org.archive.wayback.resourceindex.cdx.CDXIndex"> - <property name="path" value="/tmp/wayback/cdx-index/index.1" /> - </bean> - </property> - <property name="maxRecords" value="10000" /> - </bean> - </property> - </bean> - <!-- - The following WaybackCollection bean template is required when using a - remote ResourceIndex and ResourceStore implementation. This will also - require setting up an arcproxy and locationdb on the host specified by - the resourceStore:urlPrefix configuration, and an additional AccessPoint - on the host specified by the resourceIndex:searchUrlBase configuration. + To enable manual management of, or remote access to the above locationDB, + uncomment the following bean. --> - <!-- - <bean id="remotecollection" class="org.archive.wayback.webapp.WaybackCollection"> - - <property name="resourceStore"> - <bean class="org.archive.wayback.resourcestore.Http11ResourceStore"> - <property name="urlPrefix" value="http://wayback.archive-it.org/fileproxy/" /> - </bean> - </property> - - <property name="resourceIndex"> - <bean class="org.archive.wayback.resourceindex.RemoteResourceIndex" - init-method="init"> - <property name="searchUrlBase" value="http://wayback.archive-it.org/1055/xmlquery" /> - </bean> - </property> + <bean name="8080:locationdb" class="org.archive.wayback.resourcestore.locationdb.ResourceFileLocationDBServlet"> + <property name="locationDB" ref="resourcefilelocationdb" /> </bean> --> <!-- - The following WaybackCollection bean template is an example for using a NutchWAX - full-text index with Wayback, using a RemoteResourceStore to access - replayed documents. You will need to change searchUrlBase to your local NutchWAX - installation. You may also need to ensure that the maxRecords on your RequestParser is - not greater than the maxRecords configured on the RemoteNutchResourceIndex. + The FileProxyServlet uses a ResourceFileLocationDB to make all ARC/WARC + files appear to reside within a single HTTP 1.1 exported directory. + Required when using the SimpleResourceStore to access distributed ARC/WARC + files over HTTP through a single reverse proxy. --> <!-- - <bean id="remotenutchcollection" class="org.archive.wayback.webapp.WaybackCollection"> - - <property name="resourceStore"> - <bean class="org.archive.wayback.resourcestore.Http11ResourceStore"> - <property name="urlPrefix" value="http://webapp101.us.archive.org/arcproxy/" /> - </bean> - </property> - - <property name="resourceIndex"> - <bean class="org.archive.wayback.resourceindex.NutchResourceIndex" init-method="init"> - <property name="searchUrlBase" value="http://webapp101.us.archive.org/e04/xmlquery" /> - <property name="maxRecords" value="100" /> - </bean> - </property> + <bean name="8080:fileproxy" class="org.archive.wayback.resourcestore.locationdb.FileProxyServlet"> + <property name="locationDB" ref="resourcefilelocationdb" /> </bean> --> -<!-- - The following bean is an example using the Access Control Oracle, thanks - Alex Osborne and NLA. Currently this is pretty undocumented, but here is a - place to get started: + <import resource="BDBCollection.xml"/> - http://webteam.archive.org/confluence/display/wayback/Exclusions+API +<!-- + The XML files indicated in the following import tags contain alternate + example implementations of WaybackCollections. --> + <import resource="CDXCollection.xml"/> + <import resource="RemoteCollection.xml"/> + <import resource="NutchCollection.xml"/> <!-- - <bean id="excluder-factory-oracle" class="org.archive.wayback.accesscontrol.oracleclient.OracleExclusionFilterFactory"> - <property name="oracleUrl" value="http://localhost:8180/oracle/" /> - <property name="accessGroup" value="ia_archiver" /> - </bean> --> + <!-- This is the only AccessPoint defined by default within this wayback.xml Spring configuration file, providing an ArchivalURL Replay UI to the - "localbdbcollection" by providing ArchivalURL-specific implementations - of the replay, parser, and uriConverter. - + "localbdbcollection", defined in "BDBCollection.xml" by providing + ArchivalURL-specific implementations of the replay, parser, and + uriConverter. + This AccessPoint currently will provide access only from the machine - running Tomcat. To provide external access, replace "localhost" with your - fully qualified hostname of the computer running Tomcat. + running Tomcat. To provide external access, replace "localhost.archive.org" + with your fully qualified hostname of the computer running Tomcat. --> <import resource="ArchivalUrlReplay.xml"/> <bean name="8080:wayback" class="org.archive.wayback.webapp.AccessPoint"> - <!-- - <property name="exclusionFactory" ref="excluder-factory-oracle" /> - --> - <property name="collection" ref="localbdbcollection" /> - <property name="configs"> - <props> - <prop key="inst">foo</prop> - <prop key="coll">supreme court</prop> - </props> - </property> - - <property name="uriConverter"> - <bean class="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter"> - <property name="replayURIPrefix" value="http://localhost:8080/wayback/"/> - </bean> - </property> - + <property name="collection" ref="remotecollection" /> + <property name="replay" ref="archivalurlreplay" /> <property name="query"> <bean class="org.archive.wayback.query.Renderer"> <property name="captureJsp" value="/WEB-INF/query/CalendarResults.jsp" /> </bean> </property> - <property name="replay" ref="archivalurlreplay" /> - - <property name="parser"> - <bean class="org.archive.wayback.archivalurl.ArchivalUrlRequestParser" - init-method="init"> - <property name="maxRecords" value="1000" /> - <property name="earliestTimestamp" value="1996" /> + <property name="uriConverter"> + <bean class="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter"> + <property name="replayURIPrefix" value="http://localhost.archive.org:8080/wayback/"/> </bean> </property> - </bean> - <bean name="8080:rwayback" parent="8080:wayback"> - <property name="collection" ref="localcdxcollection2" /> <property name="parser"> - <bean class="org.archive.wayback.archivalurl.ArchivalUrlRequestParser" - init-method="init"> - <property name="maxRecords" value="100" /> + <bean class="org.archive.wayback.archivalurl.ArchivalUrlRequestParser"> + <property name="maxRecords" value="1000" /> <property name="earliestTimestamp" value="1996" /> </bean> </property> - <property name="exception"> - <bean class="org.archive.wayback.exception.CustomNotInArchiveExceptionRenderer"> - <property name="hosts"> - <list> - <value>www.aladems.org</value> - </list> - </property> - <property name="jspHandler" value="/exception/GrayBlank.jsp"/> - </bean> - </property> - <property name="uriConverter"> - <bean class="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter"> - <property name="replayURIPrefix" value="http://localhost:8080/rwayback/" /> - </bean> - </property> - <!-- - <property name="collection"> - <bean class="org.archive.wayback.webapp.WaybackCollection"> - <property name="resourceStore" ref="fancyresourcestore" /> - <property name="resourceIndex"> - <bean class="org.archive.wayback.resourceindex.RemoteResourceIndex" - init-method="init"> - <property name="searchUrlBase" value="http://localhost:8080/wayback/xmlquery" /> - </bean> - </property> - </bean> - </property> - --> + </bean> <!-- @@ -325,52 +110,65 @@ <bean name="8080:netsecure" parent="8080:wayback"> <property name="authentication"> - <bean class="org.archive.wayback.authenticationcontrol.AccessControlSettingOperation"> - <property name="operator"> - <bean class="org.archive.wayback.util.operator.NotBooleanOperator"> - <property name="operand"> - <bean class="org.archive.wayback.authenticationcontrol.IPMatchesBooleanOperator"> - <property name="allowedRanges"> - <list> - <value>192.168.1.16/24</value> - </list> - </property> - </bean> - </property> - </bean> + <bean class="org.archive.wayback.authenticationcontrol.IPMatchesBooleanOperator"> + <property name="allowedRanges"> + <list> + <value>192.168.1.16/24</value> + </list> </property> - <property name="factory" ref="excluder-factory-robot"/> </bean> </property> <property name="uriConverter"> <bean class="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter"> - <property name="replayURIPrefix" value="http://192.168.1.16:8080/netsecure/" /> + <property name="replayURIPrefix" value="http://localhost.archive.org:8080/netsecure/" /> </bean> </property> </bean> --> + <!-- The following AccessPoint inherits all configuration from the 8080:wayback - AccessPoint, but checks live web robots.txt documents to determine if - archived content should be accessible. - - Note: using this AccessPoint requires enabling the "livewebcache" and - "excluder-factory-robot" beans declared at the top of this file. + AccessPoint, but uses an Access Control Oracle to determine if archived + content should be accessible. + + The Access Control Oracle was developed by Alex Osborne of the NLA. + + Some documentation for this project is available at: + + http://webteam.archive.org/confluence/display/wayback/Exclusions+API --> + <!-- - <bean name="8080:robots" parent="8080:wayback"> - <property name="exclusionFactory" ref="excluder-factory-robot" /> + <bean name="8080:exclusion" parent="8080:wayback"> + <property name="exclusionFactory"> + <bean class="org.archive.wayback.accesscontrol.oracleclient.OracleExclusionFilterFactory"> + <property name="oracleUrl" value="http://localhost:8180/oracle/" /> + <property name="accessGroup" value="ia_archiver" /> + </bean> + </property> <property name="uriConverter"> <bean class="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter"> - <property name="replayURIPrefix" value="http://localhost:8080/robots/" /> + <property name="replayURIPrefix" value="http://localhost:8080/exclusion/" /> </bean> </property> </bean> --> +<!-- + The following AccessPoint inherits all configuration from the 8080:wayback + AccessPoint, but provides a DomainPrefix Replay UI to the same collection. + These two access points can be used simultaneously on the same Tomcat + installation. + + Note: using this AccessPoint requires adding a "Connector" on port 8081 + in your Tomcat's server.xml file. + + Note: the hostname suffix localhost.archive.org has a special DNS wildcard + entry, so all hostnames suffixed with this value resolve to 127.0.0.1 + --> <import resource="DomainPrefixReplay.xml"/> <bean name="8081" parent="8080:wayback"> - <property name="useServerName" value="true" /> + <property name="urlRoot" value="http://localhost.archive.org:8081/" /> <property name="replay" ref="domainprefixreplay" /> <property name="uriConverter"> <bean class="org.archive.wayback.domainprefix.DomainPrefixResultURIConverter"> @@ -378,7 +176,7 @@ </bean> </property> <property name="parser"> - <bean class="org.archive.wayback.domainprefix.DomainPrefixCompositeRequestParser" init-method="init"> + <bean class="org.archive.wayback.domainprefix.DomainPrefixCompositeRequestParser"> <property name="hostPort" value="localhost.archive.org:8081" /> <property name="maxRecords" value="1000" /> </bean> @@ -397,18 +195,18 @@ --> <import resource="ProxyReplay.xml"/> <bean name="8090" parent="8080:wayback"> - <property name="useServerName" value="true" /> + <property name="urlRoot" value="http://localhost.archive.org/" /> <property name="replay" ref="proxyreplay" /> <property name="uriConverter"> <bean class="org.archive.wayback.proxy.RedirectResultURIConverter"> - <property name="redirectURI" value="http://brad.archive.org/jsp/Redirect.jsp" /> + <property name="redirectURI" value="http://localhost.archive.org/jsp/Redirect.jsp" /> </bean> </property> <property name="parser"> - <bean class="org.archive.wayback.proxy.ProxyRequestParser" init-method="init"> + <bean class="org.archive.wayback.proxy.ProxyRequestParser"> <property name="localhostNames"> <list> - <value>brad.archive.org</value> + <value>localhost.archive.org</value> </list> </property> <property name="maxRecords" value="1000" /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2008-08-13 01:37:30
|
Revision: 2543 http://archive-access.svn.sourceforge.net/archive-access/?rev=2543&view=rev Author: bradtofel Date: 2008-08-13 01:37:38 +0000 (Wed, 13 Aug 2008) Log Message: ----------- TWEAK: tested & finalized for 1.4 release. NutchWax 0.12.1 does not current work with Wayback as WERA did for replay: several problems, primarily that it does not index images, css, and likely several other formats. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/BDBCollection.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/CDXCollection.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ComplexAccessPoint.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/NutchCollection.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/RemoteCollection.xml Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/BDBCollection.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/BDBCollection.xml (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/BDBCollection.xml 2008-08-13 01:37:38 UTC (rev 2543) @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" + default-init-method="init"> + +<!-- + + This file contains the default WaybackCollection implementation shipped + with Wayback. It consists of a LocalResourceIndex using a BDBIndex, and + uses several Worker Threads to implement automatic indexing. + + Several beans defined in this file reference the "resourcefilelocationdb" + bean defined in wayback.xml. + + To customize where the automatic indexing system looks for ARC/WARC files, + see "resourcefilesourceupdater.sources" within this file. + + To customize the location where the automatic indexing state data is stored + you can modify "wayback.basedir" in wayback.xml, or replace the properties + in this file for further flexibility. + + For more information about the auto-indexing system, please see: + + http://archive-access.sourceforge.net/projects/wayback/resource_store.html + +--> + +<!-- + A LocalResourceIndex bean using a BDBIndex SearchResultSource. +--> + <bean id="localbdbresourceindex" class="org.archive.wayback.resourceindex.LocalResourceIndex"> + <property name="source"> + <bean class="org.archive.wayback.resourceindex.bdb.BDBIndex"> + <property name="bdbName" value="DB1" /> + <property name="bdbPath" value="${wayback.basedir}/index/" /> + </bean> + </property> + <property name="maxRecords" value="10000" /> + </bean> + +<!-- + An IndexQueue implementation required for automatic indexing. +--> + <bean id="indexqueue" class="org.archive.wayback.resourcestore.indexer.DirectoryIndexQueue"> + <property name="path" value="${wayback.basedir}/index-data/queue" /> + </bean> + + <bean id="localbdbcollection" class="org.archive.wayback.webapp.WaybackCollection"> + + <property name="resourceStore"> + <bean id="localresourcestore" class="org.archive.wayback.resourcestore.LocationDBResourceStore"> + <property name="db" ref="resourcefilelocationdb" /> + </bean> + </property> + + <property name="resourceIndex" ref="localbdbresourceindex"/> + + <property name="shutdownables"> + <list> + <!-- This thread notices new files appearing in your resourcefilesources --> + <bean id="resourcefilesourceupdater" class="org.archive.wayback.resourcestore.resourcefile.ResourceFileSourceUpdater"> + <property name="target" value="${wayback.basedir}/file-db/incoming" /> + <property name="interval" value="100000" /> + <property name="sources"> + <list> + <!-- + This example looks for ARC/WARC files recursively under 2 + directories: /tmp/wayback/files1 and /tmp/wayback/files2 + You can specify as few or as many ResourceFileSource instances + as needed, but each must have a unique 'name' property. + --> + <bean class="org.archive.wayback.resourcestore.resourcefile.DirectoryResourceFileSource"> + <property name="name" value="files1" /> + <property name="prefix" value="/tmp/wayback/files1/" /> + </bean> + <bean class="org.archive.wayback.resourcestore.resourcefile.DirectoryResourceFileSource"> + <property name="name" value="files2" /> + <property name="prefix" value="/tmp/wayback/files2/" /> + </bean> + </list> + </property> + </bean> + + <!-- This thread updates the location db with updates from resourcefilesourceupdater --> + <bean id="resourcefilelocationdbupdater" class="org.archive.wayback.resourcestore.locationdb.ResourceFileLocationDBUpdater"> + <property name="interval" value="100000" /> + <property name="db" ref="resourcefilelocationdb" /> + <property name="incomingDir" value="${wayback.basedir}/file-db/incoming" /> + <property name="stateDir" value="${wayback.basedir}/file-db/state" /> + </bean> + + <!-- This thread notices new files arriving in the filelocationdb, and queues them for indexing --> + <bean id="indexqueueupdater" class="org.archive.wayback.resourcestore.indexer.IndexQueueUpdater"> + <property name="db" ref="resourcefilelocationdb" /> + <property name="queue" ref="indexqueue" /> + <property name="interval" value="1000" /> + <property name="lastMark" value="${wayback.basedir}/index-data/queue.mark" /> + </bean> + + <!-- This thread checks the to-be-indexed queue for files needing indexing, indexes them, and hands off the results for merging with the ResourceIndex --> + <bean id="indexworker" class="org.archive.wayback.resourcestore.indexer.IndexWorker"> + <property name="db" ref="resourcefilelocationdb" /> + <property name="queue" ref="indexqueue" /> + <property name="interval" value="1000" /> + <property name="target"> + <bean class="org.archive.wayback.resourceindex.updater.IndexClient"> + <property name="tmpDir" value="${wayback.basedir}/index-data/tmp/" /> + <property name="target" value="${wayback.basedir}/index-data/incoming/" /> + </bean> + </property> + </bean> + + <!-- This thread merges updates from the indexworker into the ResourceIndex --> + <bean class="org.archive.wayback.resourceindex.updater.LocalResourceIndexUpdater"> + + <property name="index" ref="localbdbresourceindex" /> + <property name="incoming" value="${wayback.basedir}/index-data/incoming/" /> + <property name="failed" value="${wayback.basedir}/index-data/failed/" /> + <property name="merged" value="${wayback.basedir}/index-data/merged/" /> + <property name="runInterval" value="10000" /> + </bean> + </list> + </property> + </bean> + + +</beans> \ No newline at end of file Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/CDXCollection.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/CDXCollection.xml (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/CDXCollection.xml 2008-08-13 01:37:38 UTC (rev 2543) @@ -0,0 +1,69 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" + default-init-method="init"> + +<!-- + + This file contains a WaybackCollection implementation using a manually + created and administered CDX index file(s). It also uses the experimental + FlatFileResourceFileLocationDB, which enables mapping between ARC/WARC file + names and their absolute paths/URLs using a sorted text file + "path-index.txt". + + The format of the path-index.txt is + <NAME><TAB><PATH-OR-URL> + + Be sure to set the environment variable LC_ALL to "C" before sorting CDX + files and path-index.txt files. + + All paths in this file reference the Spring property placeholder + "wayback.basedir" defined in wayback.xml. That value may be changed to + alter top-level prefixes for these paths, or the values in this file can + be changed directly for further flexibility. + +--> + + <bean id="localcdxcollection" class="org.archive.wayback.webapp.WaybackCollection"> + + <property name="resourceStore"> + <bean class="org.archive.wayback.resourcestore.LocationDBResourceStore"> + <property name="db"> + <bean class="org.archive.wayback.resourcestore.locationdb.FlatFileResourceFileLocationDB"> + <property name="path" value="${wayback.basedir}/path-index.txt" /> + </bean> + </property> + </bean> + </property> + + <property name="resourceIndex"> + <bean class="org.archive.wayback.resourceindex.LocalResourceIndex"> + <property name="source"> + + <bean class="org.archive.wayback.resourceindex.cdx.CDXIndex"> + <property name="path" value="${wayback.basedir}/cdx-index/index.cdx" /> + </bean> + +<!-- + A CompositeSearchResultSource example, that allows searching through + multiple sorted CDX files. +--> +<!-- + <bean class="org.archive.wayback.resourceindex.CompositeSearchResultSource"> + <property name="CDXSources"> + <list> + <value>${wayback.basedir}/cdx-index/index-1.cdx</value> + <value>${wayback.basedir}/cdx-index/index-2.cdx</value> + </list> + </property> + </bean> +--> + </property> + <property name="maxRecords" value="10000" /> + </bean> + </property> + </bean> + +</beans> \ No newline at end of file Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ComplexAccessPoint.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ComplexAccessPoint.xml (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ComplexAccessPoint.xml 2008-08-13 01:37:38 UTC (rev 2543) @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" + default-init-method="init"> + +<!-- + + This file contains an alternate "8080:wayback" AccessPoint demonstrating + several optional AccessPoint configurations. +--> + + <bean name="8080:wayback" class="org.archive.wayback.webapp.AccessPoint"> + <property name="collection" ref="localbdbcollection" /> + <property name="replay" ref="archivalurlreplay" /> + <property name="query"> + <bean class="org.archive.wayback.query.Renderer"> + <property name="captureJsp" value="/WEB-INF/query/CalendarResults.jsp" /> + </bean> + </property> + + <property name="uriConverter"> + <bean class="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter"> + <property name="replayURIPrefix" value="http://localhost.archive.org:8080/wayback/"/> + </bean> + </property> + + <property name="parser"> + <bean class="org.archive.wayback.archivalurl.ArchivalUrlRequestParser"> + <property name="maxRecords" value="1000" /> + <property name="earliestTimestamp" value="1996" /> + </bean> + </property> + + <!-- + The following configuration enables free String key-value pairs to be + associated. These values can be used within customized .jsp UI files. + Here is some example .jsp code demonstrating access of the "Institution" + value: + UIResults results = UIResults.getGeneric(request); + String institution = results.getContextConfig("Institution"); + ... + + --> + <property name="configs"> + <props> + <prop key="Institution">Sample Institution</prop> + <prop key="Collection">Sample Collection</prop> + </props> + </property> + + <!-- + The following is a rather complex configuration example demonstrating + context specific AccessControl configuration. Specifically, it causes any + request NOT originating INSIDE the 192.168.1.16/24 IP space to use the + specified Access Control Oracle to determine which documents are + accessible. Requests originating INSIDE the IP space have no access + control restrictions. + --> + + <property name="authentication"> + <bean class="org.archive.wayback.authenticationcontrol.AccessControlSettingOperation"> + <property name="operator"> + <bean class="org.archive.wayback.util.operator.NotBooleanOperator"> + <property name="operand"> + <bean class="org.archive.wayback.authenticationcontrol.IPMatchesBooleanOperator"> + <property name="allowedRanges"> + <list> + <value>192.168.1.16/24</value> + </list> + </property> + </bean> + </property> + </bean> + </property> + <property name="factory"> + <bean class="org.archive.wayback.accesscontrol.oracleclient.OracleExclusionFilterFactory"> + <property name="oracleUrl" value="http://localhost:8180/oracle/" /> + <property name="accessGroup" value="ia_archiver" /> + </bean> + </property> + </bean> + </property> + </bean> + +</beans> Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/NutchCollection.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/NutchCollection.xml (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/NutchCollection.xml 2008-08-13 01:37:38 UTC (rev 2543) @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" + default-init-method="init"> +<!-- + + The following WaybackCollection bean is an example using a NutchWAX + full-text index with Wayback, using a SimpleResourceStore to access + replayed documents. You will need to change searchUrlBase to your local + NutchWAX installation. + + Please note that Wayback is supported for use with NutchWax version 0.14.1 + or higher. + + Please see RemoteCollection.xml for information on the meaning of the + SimpleResourceStore definition and options. + + You also need to ensure that the maxRecords on your RequestParser is not + greater than the maxRecords configured on the RemoteNutchResourceIndex. + +--> + + <bean id="remotenutchcollection" class="org.archive.wayback.webapp.WaybackCollection"> + + <property name="resourceStore"> + <bean class="org.archive.wayback.resourcestore.SimpleResourceStore"> + <property name="prefix" value="http://wayback.archive-it.org/fileproxy/" /> + </bean> + </property> + + <property name="resourceIndex"> + <bean class="org.archive.wayback.resourceindex.NutchResourceIndex"> + <property name="searchUrlBase" value="http://ia400138.us.archive.org:8080/nutch-1.0-dev/opensearch" /> + <property name="maxRecords" value="100" /> + </bean> + </property> + </bean> + +</beans> \ No newline at end of file Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/RemoteCollection.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/RemoteCollection.xml (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/RemoteCollection.xml 2008-08-13 01:37:38 UTC (rev 2543) @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" + default-init-method="init"> + +<!-- + + This file contains a WaybackCollection implementation using a + RemoteResourceIndex and a SimpleResourceStore. + + The RemoteResourceIndex implementation assumes that a Wayback is running on + the machine indicated by "searchUrlBase", which provides an XML-HTTP search + interface to the ResourceIndex on that machine. + + The SimpleResourceStore implementation assumes that all ARC/WARC files are + accessible under the path/URL named in "prefix". + + When a path is specified as the "prefix", it is assumed that there exists a + single local directory containing all ARC/WARC files. + + When a URL is specified as the "prefix", it is assumed that all ARC/WARC + files are HTTP 1.1 exported under the directory denoted. The + FileProxyServlet defined in wayback.xml may be useful in installations + where ARC/WARC files are distributed across many machines, and it is + desirable to route all ARC/WARC resource requests through a single machine. + +--> + + <bean id="remotecollection" class="org.archive.wayback.webapp.WaybackCollection"> + + <property name="resourceStore"> + <bean class="org.archive.wayback.resourcestore.SimpleResourceStore"> + <property name="prefix" value="http://wayback.archive-it.org/fileproxy/" /> + </bean> + </property> + + <property name="resourceIndex"> + <bean class="org.archive.wayback.resourceindex.RemoteResourceIndex"> + <property name="searchUrlBase" value="http://wayback.archive-it.org/1055/xmlquery" /> + </bean> + </property> + </bean> + +</beans> \ No newline at end of file Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml 2008-08-13 01:07:20 UTC (rev 2542) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml 2008-08-13 01:37:38 UTC (rev 2543) @@ -53,16 +53,16 @@ </bean> --> - <import resource="BDBCollection.xml"/> <!-- The XML files indicated in the following import tags contain alternate example implementations of WaybackCollections. --> + <import resource="NutchCollection.xml"/> +<!-- + <import resource="BDBCollection.xml"/> <import resource="CDXCollection.xml"/> <import resource="RemoteCollection.xml"/> - <import resource="NutchCollection.xml"/> -<!-- --> @@ -79,7 +79,7 @@ --> <import resource="ArchivalUrlReplay.xml"/> <bean name="8080:wayback" class="org.archive.wayback.webapp.AccessPoint"> - <property name="collection" ref="remotecollection" /> + <property name="collection" ref="localbdbcollection" /> <property name="replay" ref="archivalurlreplay" /> <property name="query"> <bean class="org.archive.wayback.query.Renderer"> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2008-08-14 03:24:41
|
Revision: 2550 http://archive-access.svn.sourceforge.net/archive-access/?rev=2550&view=rev Author: bradtofel Date: 2008-08-14 03:24:49 +0000 (Thu, 14 Aug 2008) Log Message: ----------- TWEAK: tested & finalized for 1.4 release. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml 2008-08-14 02:00:33 UTC (rev 2549) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml 2008-08-14 03:24:49 UTC (rev 2550) @@ -37,8 +37,8 @@ <value>/WEB-INF/replay/ClientSideJSInsert.jsp</value> <value>/WEB-INF/replay/Disclaimer.jsp</value> <!-- + <value>/WEB-INF/replay/Timeline.jsp</value> <value>/WEB-INF/replay/DebugBanner.jsp</value> - <value>/WEB-INF/replay/Timeline.jsp</value> --> </list> </property> Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml 2008-08-14 02:00:33 UTC (rev 2549) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml 2008-08-14 03:24:49 UTC (rev 2550) @@ -58,9 +58,9 @@ The XML files indicated in the following import tags contain alternate example implementations of WaybackCollections. --> + <import resource="BDBCollection.xml"/> +<!-- <import resource="NutchCollection.xml"/> -<!-- - <import resource="BDBCollection.xml"/> <import resource="CDXCollection.xml"/> <import resource="RemoteCollection.xml"/> --> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2009-11-06 02:37:22
|
Revision: 2896 http://archive-access.svn.sourceforge.net/archive-access/?rev=2896&view=rev Author: bradtofel Date: 2009-11-06 02:37:07 +0000 (Fri, 06 Nov 2009) Log Message: ----------- Improved comments, and now includes many more examples of the various Archival URL replay options. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlSaxReplay.xml Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml 2009-11-06 02:28:19 UTC (rev 2895) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml 2009-11-06 02:37:07 UTC (rev 2896) @@ -2,23 +2,59 @@ <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans - http://www.springframework.org/schema/beans/spring-beans-2.5.xsd"> + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" + default-init-method="init"> +<!-- + The following bean controls how HTTP headers from original documents + are returned to clients. This configuration will cause + all original HTTP headers to be prefixed with "X-Archive-Orig-". To return + the original HTTP headers as-is (except for Content-Length) comment out the + "prefix" property. This has significant implications on caching and cookies. + --> <bean id="archivalurlhttpheaderprocessor" class="org.archive.wayback.replay.RedirectRewritingHttpHeaderProcessor"> <property name="prefix" value="X-Archive-Orig-" /> </bean> - <bean id="archivaldateredirectingreplayrenderer" class="org.archive.wayback.replay.DateRedirectReplayRenderer" /> +<!-- + Renderer for both CSS and Javascript, causing a comment containing + archive inforation to be inserted in the returned documents. + --> <bean id="archivalcssreplayrenderer" class="org.archive.wayback.archivalurl.ArchivalUrlCSSReplayRenderer"> <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> + <property name="jspInserts"> + <list> + <value>/WEB-INF/replay/ArchiveCSSComment.jsp</value> + </list> + </property> </bean> + <bean id="archivaljsreplayrenderer" class="org.archive.wayback.archivalurl.ArchivalUrlJSReplayRenderer"> + <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> + <property name="jspInserts"> + <list> + <value>/WEB-INF/replay/ArchiveCSSComment.jsp</value> + </list> + </property> + </bean> +<!-- + Renderer which rewrites mms:// URLs inside ASX mime types to be http:// + --> <bean id="archivalasxreplayrenderer" class="org.archive.wayback.archivalurl.ArchivalUrlASXReplayRenderer"> <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> </bean> + +<!-- + Renderer which returns documents as-is. Suitable for images, binary formats, + and anything else Wayback doesn't know how to handle yet. + --> <bean id="archivaltransparentreplayrenderer" class="org.archive.wayback.replay.TransparentReplayRenderer"> <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> </bean> +<!-- + The following bean is an example of the experimental Regex-Based + server-side HTML rewriting Renderer + --> <bean id="archivalserversidehtmlreplayrenderer" class="org.archive.wayback.archivalurl.ServerSideHTMLReplayRenderer"> <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> <property name="jspInserts"> @@ -31,14 +67,40 @@ </property> </bean> +<!-- + Custom rules for rewriting HTML content using a SAX parser, for fine-tuned + server-side rewriting. + --> + <import resource="ArchivalUrlSaxReplay.xml"/> + +<!-- + The following bean is an example of the new SAX based rewriting renderer. It + also uses a pluggable character encoding detector, which could allow clients + to issue special requests to Wayback to alter the detection strategy. + --> + <bean id="archivalsaxreplayrenderer" class="org.archive.wayback.archivalurl.ArchivalUrlSAXRewriteReplayRenderer"> + <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> + <property name="charsetDetector"> + <bean class="org.archive.wayback.replay.charset.RotatingCharsetDetector"/> + </property> + <property name="rules" ref="archivalSAXRules"/> + </bean> + +<!-- + The following bean is an example of the "classic" or most mature ArchivalUrl + Replay system - it uses a combination of server-side regex rewriting and + a client-side javascript insert to rewite links within an HTML page. +--> <bean id="archivalclientsidehtmlreplayrenderer" class="org.archive.wayback.archivalurl.ClientSideHTMLReplayRenderer"> <constructor-arg><ref bean="archivalurlhttpheaderprocessor"/></constructor-arg> <property name="jspInserts"> <list> + <value>/WEB-INF/replay/Timeline.jsp</value> +<!-- + <value>/WEB-INF/replay/DisclaimerHead.jsp</value> <value>/WEB-INF/replay/ArchiveComment.jsp</value> <value>/WEB-INF/replay/ClientSideJSInsert.jsp</value> <value>/WEB-INF/replay/Disclaimer.jsp</value> -<!-- <value>/WEB-INF/replay/Timeline.jsp</value> <value>/WEB-INF/replay/DebugBanner.jsp</value> --> @@ -46,15 +108,36 @@ </property> </bean> +<!-- + The main Archival URL replay dispatcher. It uses a list of Selectors to + determine which ReplayRenderer should be used for each document. + --> <bean id="archivalurlreplay" class="org.archive.wayback.replay.SelectorReplayDispatcher"> <property name="selectors"> <list> <!-- REDIRECT IF NOT EXACT DATE --> <bean class="org.archive.wayback.replay.selector.DateMismatchSelector"> - <property name="renderer" ref="archivaldateredirectingreplayrenderer"/> + <property name="renderer"> + <bean class="org.archive.wayback.archivalurl.ArchivalUrlDateRedirectReplayRenderer" /> + </property> </bean> + <!-- Explicit (via "cs_" flag) CSS REPLAY --> + <bean class="org.archive.wayback.replay.selector.CSSRequestSelector"> + <property name="renderer" ref="archivalcssreplayrenderer"/> + </bean> + + <!-- Explicit (via "js_" flag) JS REPLAY --> + <bean class="org.archive.wayback.replay.selector.JSRequestSelector"> + <property name="renderer" ref="archivaljsreplayrenderer"/> + </bean> + + <!-- Explicit (via "im_" flag) IMG REPLAY --> + <bean class="org.archive.wayback.replay.selector.IMGRequestSelector"> + <property name="renderer" ref="archivaltransparentreplayrenderer"/> + </bean> + <!-- HTML REPLAY --> <bean class="org.archive.wayback.replay.selector.MimeTypeSelector"> <property name="mimeContains"> @@ -63,8 +146,12 @@ <value>application/xhtml</value> </list> </property> + <property name="renderer" ref="archivalsaxreplayrenderer"/> +<!-- <property name="renderer" ref="archivalclientsidehtmlreplayrenderer"/> + --> </bean> + <!-- CSS REPLAY --> <bean class="org.archive.wayback.replay.selector.MimeTypeSelector"> Added: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlSaxReplay.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlSaxReplay.xml (rev 0) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlSaxReplay.xml 2009-11-06 02:37:07 UTC (rev 2896) @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="UTF-8"?> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" + default-init-method="init"> + + + <bean id="anchorURLRewriter" + class="org.archive.wayback.replay.html.transformer.URLStringTransformer"> + </bean> + <bean id="imageURLRewriter" + class="org.archive.wayback.replay.html.transformer.URLStringTransformer"> + <property name="flags" value="im_" /> + </bean> + <bean id="jsURLRewriter" + class="org.archive.wayback.replay.html.transformer.URLStringTransformer"> + <property name="flags" value="js_" /> + </bean> + <bean id="cssURLRewriter" + class="org.archive.wayback.replay.html.transformer.URLStringTransformer"> + <property name="flags" value="cs_" /> + </bean> + <bean id="baseHrefHandler" + class="org.archive.wayback.replay.html.transformer.BaseHrefStringTransformer"> + </bean> + <bean id="cssAttributeHandler" + class="org.archive.wayback.replay.html.transformer.InlineCSSStringTransformer"> + </bean> + <bean id="cssBlockHandler" + class="org.archive.wayback.replay.html.transformer.BlockCSSStringTransformer"> + </bean> + + + + <bean id="archivalSAXRules" + class="org.archive.wayback.replay.html.ReplayParseEventDelegator"> + <property name="parserVisitors"> + <list> + <bean class="org.archive.wayback.replay.html.rules.CommentRule"> + </bean> + <bean + class="org.archive.wayback.replay.html.rules.AfterBodyStartTagJSPExecRule"> + <property name="jspPath" value="/WEB-INF/replay/DebugBanner.jsp" /> + </bean> + + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="A" /> + <property name="modifyAttributeName" value="HREF" /> + <property name="transformer" ref="anchorURLRewriter" /> + </bean> + + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="IMG" /> + <property name="modifyAttributeName" value="SRC" /> + <property name="transformer" ref="imageURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="SCRIPT" /> + <property name="modifyAttributeName" value="SRC" /> + <property name="transformer" ref="jsURLRewriter" /> + </bean> + + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="BASE" /> + <property name="modifyAttributeName" value="HREF" /> + <property name="transformer" ref="baseHrefHandler" /> + </bean> + + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="modifyAttributeName" value="BACKGROUND" /> + <property name="transformer" ref="imageURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="FRAME" /> + <property name="modifyAttributeName" value="SRC" /> + <property name="transformer" ref="anchorURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="INPUT" /> + <property name="modifyAttributeName" value="SRC" /> + <property name="transformer" ref="imageURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="IFRAME" /> + <property name="modifyAttributeName" value="SRC" /> + <property name="transformer" ref="anchorURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="META" /> + <property name="modifyAttributeName" value="URL" /> + <property name="transformer" ref="anchorURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="FORM" /> + <property name="modifyAttributeName" value="ACTION" /> + <property name="transformer" ref="anchorURLRewriter" /> + </bean> + + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + + <property name="tagName" value="LINK" /> + <property name="whereAttributeName" value="rel" /> + <property name="whereAttributeValue" value="Stylesheet" /> + + <property name="modifyAttributeName" value="HREF" /> + <property name="transformer" ref="cssURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="LINK" /> + <property name="whereAttributeName" value="rel" /> + <property name="whereAttributeValue" value="shortcut icon" /> + <property name="modifyAttributeName" value="HREF" /> + <property name="transformer" ref="imageURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="LINK" /> + <property name="modifyAttributeName" value="HREF" /> + <property name="transformer" ref="anchorURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="AREA" /> + <property name="modifyAttributeName" value="HREF" /> + <property name="transformer" ref="anchorURLRewriter" /> + </bean> + + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="OBJECT" /> + <property name="modifyAttributeName" value="CODEBASE" /> + <property name="transformer" ref="anchorURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="OBJECT" /> + <property name="modifyAttributeName" value="CDATA" /> + <property name="transformer" ref="anchorURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="APPLET" /> + <property name="modifyAttributeName" value="CODEBASE" /> + <property name="transformer" ref="anchorURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="APPLET" /> + <property name="modifyAttributeName" value="ARCHIVE" /> + <property name="transformer" ref="anchorURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="tagName" value="EMBED" /> + <property name="modifyAttributeName" value="SRC" /> + <property name="transformer" ref="anchorURLRewriter" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.StyleContentRule"> + <property name="transformer" ref="cssBlockHandler" /> + </bean> + <bean class="org.archive.wayback.replay.html.rules.AttributeModifyingRule"> + <property name="modifyAttributeName" value="style" /> + <property name="transformer" ref="cssAttributeHandler" /> + </bean> + </list> + </property> + </bean> + +</beans> \ 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...> - 2009-11-07 01:07:32
|
Revision: 2908 http://archive-access.svn.sourceforge.net/archive-access/?rev=2908&view=rev Author: bradtofel Date: 2009-11-07 01:07:21 +0000 (Sat, 07 Nov 2009) Log Message: ----------- BUGFIX(unreported) fixed property name: rules -> delegator Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlSaxReplay.xml Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml 2009-11-06 03:38:39 UTC (rev 2907) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlReplay.xml 2009-11-07 01:07:21 UTC (rev 2908) @@ -83,7 +83,7 @@ <property name="charsetDetector"> <bean class="org.archive.wayback.replay.charset.RotatingCharsetDetector"/> </property> - <property name="rules" ref="archivalSAXRules"/> + <property name="delegator" ref="archivalSAXDelegator"/> </bean> <!-- Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlSaxReplay.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlSaxReplay.xml 2009-11-06 03:38:39 UTC (rev 2907) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/ArchivalUrlSaxReplay.xml 2009-11-07 01:07:21 UTC (rev 2908) @@ -33,7 +33,7 @@ - <bean id="archivalSAXRules" + <bean id="archivalSAXDelegator" class="org.archive.wayback.replay.html.ReplayParseEventDelegator"> <property name="parserVisitors"> <list> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2009-11-07 01:08:36
|
Revision: 2909 http://archive-access.svn.sourceforge.net/archive-access/?rev=2909&view=rev Author: bradtofel Date: 2009-11-07 01:08:15 +0000 (Sat, 07 Nov 2009) Log Message: ----------- TWEAK: now we define a global canonicalizer bean, which is referred to in (hopefully) all the right places Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/BDBCollection.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/CDXCollection.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/BDBCollection.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/BDBCollection.xml 2009-11-07 01:07:21 UTC (rev 2908) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/BDBCollection.xml 2009-11-07 01:08:15 UTC (rev 2909) @@ -55,6 +55,7 @@ A LocalResourceIndex bean using a BDBIndex SearchResultSource. --> <bean id="localbdbresourceindex" class="org.archive.wayback.resourceindex.LocalResourceIndex"> + <property name="canonicalizer" ref="waybackCanonicalizer" /> <property name="source"> <bean class="org.archive.wayback.resourceindex.bdb.BDBIndex"> <property name="bdbName" value="DB1" /> @@ -117,6 +118,7 @@ <property name="target" value="${wayback.basedir}/index-data/incoming/" /> </bean> </property> + <property name="canonicalizer" ref="waybackCanonicalizer"/> </bean> <!-- This thread merges updates from the indexworker into the ResourceIndex --> Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/CDXCollection.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/CDXCollection.xml 2009-11-07 01:07:21 UTC (rev 2908) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/CDXCollection.xml 2009-11-07 01:08:15 UTC (rev 2909) @@ -40,6 +40,7 @@ <property name="resourceIndex"> <bean class="org.archive.wayback.resourceindex.LocalResourceIndex"> + <property name="canonicalizer" ref="waybackCanonicalizer" /> <property name="source"> <bean class="org.archive.wayback.resourceindex.cdx.CDXIndex"> Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml 2009-11-07 01:07:21 UTC (rev 2908) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/wayback.xml 2009-11-07 01:08:15 UTC (rev 2909) @@ -19,7 +19,7 @@ </property> </bean> - + <bean id="waybackCanonicalizer" class="org.archive.wayback.util.url.AggressiveUrlCanonicalizer" /> <!-- The ResourceFileLocationDB implementation to use for mapping ARC/WARC names to absolute paths/URLs via a BDBJE database. 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-08-04 01:09:37
|
Revision: 3208 http://archive-access.svn.sourceforge.net/archive-access/?rev=3208&view=rev Author: bradtofel Date: 2010-08-04 01:09:30 +0000 (Wed, 04 Aug 2010) Log Message: ----------- TWEAK: replaced template header/footer with standards Modified Paths: -------------- 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/query/BubbleCalendar.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/exception/HTMLError.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/HTMLError.jsp 2010-08-03 00:37:53 UTC (rev 3207) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/exception/HTMLError.jsp 2010-08-04 01:09:30 UTC (rev 3208) @@ -31,7 +31,7 @@ StringFormatter fmt = results.getWbRequest().getFormatter(); %> -<jsp:include page="/WEB-INF/global-template/UI-header.jsp" flush="true" /> +<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" /> <div id="positionHome"> <section> @@ -139,4 +139,4 @@ </section> <div id="errorBorder"></div> -<jsp:include page="/WEB-INF/global-template/UI-footer.jsp" flush="true" /> \ No newline at end of file +<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/BubbleCalendar.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/BubbleCalendar.jsp 2010-08-03 00:37:53 UTC (rev 3207) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/BubbleCalendar.jsp 2010-08-04 01:09:30 UTC (rev 3208) @@ -13,7 +13,7 @@ <%@ page import="org.archive.wayback.partition.BubbleCalendarData" %> <%@ page import="org.archive.wayback.util.partition.Partition" %> <%@ page import="org.archive.wayback.util.StringFormatter" %> -<jsp:include page="/WEB-INF/global-template/UI-header.jsp" flush="true" /> +<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" /> <jsp:include page="/WEB-INF/template/CookieJS.jsp" flush="true" /> <% UIResults results = UIResults.extractCaptureQuery(request); @@ -466,4 +466,4 @@ </div> </div> -<jsp:include page="/WEB-INF/global-template/UI-footer.jsp" flush="true" /> \ No newline at end of file +<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-08-03 00:37:53 UTC (rev 3207) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/HTMLUrlResults.jsp 2010-08-04 01:09:30 UTC (rev 3208) @@ -10,7 +10,7 @@ %><%@ page import="org.archive.wayback.core.WaybackRequest" %><%@ page import="org.archive.wayback.util.StringFormatter" %> -<jsp:include page="/WEB-INF/global-template/UI-header.jsp" flush="true" /> +<jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" /> <% UIResults results = UIResults.extractUrlQuery(request); WaybackRequest wbRequest = results.getWbRequest(); @@ -214,4 +214,4 @@ </table> -<jsp:include page="/WEB-INF/global-template/UI-footer.jsp" flush="true" /> \ No newline at end of file +<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-08-03 00:37:53 UTC (rev 3207) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/UrlRedirectNotice.jsp 2010-08-04 01:09:30 UTC (rev 3208) @@ -35,7 +35,7 @@ int secs = 5; %> - <jsp:include page="/WEB-INF/global-template/UI-header.jsp" flush="true" /> + <jsp:include page="/WEB-INF/template/UI-header.jsp" flush="true" /> <div id="positionHome"> <section> @@ -61,4 +61,4 @@ </section> <div id="errorBorder"></div> - <jsp:include page="/WEB-INF/global-template/UI-footer.jsp" flush="true" /> \ No newline at end of file + <jsp:include page="/WEB-INF/template/UI-footer.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-10-01 15:43:16
|
Revision: 3264 http://archive-access.svn.sourceforge.net/archive-access/?rev=3264&view=rev Author: bradtofel Date: 2010-10-01 15:43:09 +0000 (Fri, 01 Oct 2010) Log Message: ----------- BUGFIXES, undescribed.. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/Memento.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/ORE.jsp trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/MementoValidity.jsp Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/Memento.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/Memento.jsp 2010-09-30 22:36:57 UTC (rev 3263) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/Memento.jsp 2010-10-01 15:43:09 UTC (rev 3264) @@ -1,25 +1,25 @@ -<%@ page import="java.util.Date" %> -<%@ page import="org.archive.wayback.core.UIResults" %> -<%@ page import="org.archive.wayback.util.StringFormatter" %> -<%@ page import="org.archive.wayback.core.WaybackRequest" %> -<%@ page import="org.archive.wayback.core.CaptureSearchResults" %> -<%@ page import="org.archive.wayback.core.CaptureSearchResult"%> -<%@ page import="org.archive.wayback.ResultURIConverter" %> -<%@ page import="java.text.SimpleDateFormat" %> -<%@ page import="org.archive.wayback.util.Timestamp" %> -<%@ page import="java.util.Iterator" %> -<%@ page import="java.util.List" %> -<%@ page import="java.util.ArrayList" %> -<%@ page import="org.archive.wayback.ResultURIConverter" %> -<%@ page import="java.util.TimeZone" %> -<%@ page import="java.io.PrintWriter"%> -<%@ page import="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter" %> -<% - //timegate implementation - String method = request.getMethod(); - // may be there is better place to put this piece of code? - if( !(method.equals("GET")||method.equals("HEAD")) ) { - response.setStatus(405); +<%@ page import="java.util.Date" +%><%@ page import="org.archive.wayback.core.UIResults" +%><%@ page import="org.archive.wayback.util.StringFormatter" +%><%@ page import="org.archive.wayback.core.WaybackRequest" +%><%@ page import="org.archive.wayback.core.CaptureSearchResults" +%><%@ page import="org.archive.wayback.core.CaptureSearchResult" +%><%@ page import="org.archive.wayback.ResultURIConverter" +%><%@ page import="java.text.SimpleDateFormat" +%><%@ page import="org.archive.wayback.util.Timestamp" +%><%@ page import="java.util.Iterator" +%><%@ page import="java.util.List" +%><%@ page import="java.util.ArrayList" +%><%@ page import="org.archive.wayback.ResultURIConverter" +%><%@ page import="java.util.TimeZone" +%><%@ page import="java.io.PrintWriter" +%><%@ page import="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter" +%><% + //timegate implementation + String method = request.getMethod(); + // may be there is better place to put this peace of code + if (!(method.equals("GET") || method.equals("HEAD"))) { + response.setStatus(405); response.setHeader("Allow", "GET, HEAD"); return; } @@ -27,10 +27,10 @@ response.setHeader("Vary", "negotiate,accept-datetime"); SimpleDateFormat httpformatterl = new SimpleDateFormat( "E, dd MMM yyyy HH:mm:ss z"); - TimeZone tzo = TimeZone.getTimeZone("GMT"); - httpformatterl.setTimeZone(tzo); - SimpleDateFormat formatterk = new SimpleDateFormat("yyyyMMddHHmmss"); - formatterk.setTimeZone(tzo); + TimeZone tzo = TimeZone.getTimeZone("GMT"); + httpformatterl.setTimeZone(tzo); + SimpleDateFormat formatterk = new SimpleDateFormat("yyyyMMddHHmmss"); + formatterk.setTimeZone(tzo); Date now = new Date(); UIResults results = UIResults.extractCaptureQuery(request);//nuzno potom perepisat' @@ -58,105 +58,105 @@ String replayUrl = results.resultToReplayUrl(res); StringBuffer sb = new StringBuffer(); - - String memento = ",<" + replayUrl - + ">;rel=\"memento\";datetime=\"" - + httpformatterl.format(closestDate) + "\""; + + String memento = ",<" + replayUrl + ">;rel=\"memento\";datetime=\"" + + httpformatterl.format(closestDate) + "\""; StringFormatter fmt = results.getWbRequest().getFormatter(); Date f = cResults.getFirstResultDate(); Date l = cResults.getLastResultDate(); - String mfl = null; - if ( (closestDate.equals(f)) && closestDate.equals(l)) { + if ((closestDate.equals(f)) && closestDate.equals(l)) { + mfl = ", <" + + uriPrefix + + formatterk.format(f) + + "/" + + u + + ">;rel=\"first-memento memento last-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""; + } else if (closestDate.equals(f)) { + mfl = ", <" + uriPrefix + formatterk.format(f) + "/" + u + + ">;rel=\"first-memento memento\"; datetime=\"" + + httpformatterl.format(f) + "\""; + mfl = mfl + ", <" + uriPrefix + formatterk.format(l) + "/" + u + + ">;rel=\"last-memento\"; datetime=\"" + + httpformatterl.format(l) + "\""; - mfl = ", <" + uriPrefix + formatterk.format(f) + "/" + u - + ">;rel=\"first-memento memento last-memento\"; datetime=\"" - + httpformatterl.format(f) + "\""; + } else if (closestDate.equals(l)) { + mfl = ", <" + uriPrefix + formatterk.format(l) + "/" + u + + ">;rel=\"last-memento memento\"; datetime=\"" + + httpformatterl.format(l) + "\""; + mfl = mfl + ", <" + uriPrefix + formatterk.format(f) + "/" + u + + ">;rel=\"first-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""; + } else { - } else if (closestDate.equals(f)){ + mfl = memento; + mfl = mfl + ", <" + uriPrefix + formatterk.format(l) + "/" + u + + ">;rel=\"last-memento\"; datetime=\"" + + httpformatterl.format(l) + "\""; + mfl = mfl + ", <" + uriPrefix + formatterk.format(f) + "/" + u + + ">;rel=\"first-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""; + } - mfl = ", <" + uriPrefix + formatterk.format(f) + "/" + u - + ">;rel=\"first-memento memento\"; datetime=\"" - + httpformatterl.format(f) + "\"" - + ", <" + uriPrefix + formatterk.format(l) + "/" + u - + ">;rel=\"last-memento\"; datetime=\"" - + httpformatterl.format(l) + "\""; - - } else if (closestDate.equals(l)) { + sb = new StringBuffer(mfl); - mfl = ", <" + uriPrefix + formatterk.format(l) + "/" + u - + ">;rel=\"last-memento memento\"; datetime=\"" - + httpformatterl.format(l) + "\"" - + ", <" + uriPrefix + formatterk.format(f) + "/" + u - + ">;rel=\"first-memento\"; datetime=\"" - + httpformatterl.format(f) + "\""; + if (dtdate == null) + dtdate = ""; - } else { - - mfl = memento - + ", <" + uriPrefix + formatterk.format(l) + "/" + u - + ">;rel=\"last-memento\"; datetime=\"" - + httpformatterl.format(l) + "\"" - + ", <" + uriPrefix + formatterk.format(f) + "/" + u - + ">;rel=\"first-memento\"; datetime=\"" - + httpformatterl.format(f) + "\""; - } - - sb = new StringBuffer(mfl); - - if (dtdate==null) dtdate=""; - - //special handling date unparsable case if (dtdate.equals("unparsable")) { - String fl= null; + String fl = null; if (f.equals(l)) { - fl=", <" + uriPrefix + formatterk.format(f) + "/" + u - + ">;rel=\"last-memento first-memento\"; datetime=\"" - + httpformatterl.format(f) + "\""; - + fl = ", <" + + uriPrefix + + formatterk.format(f) + + "/" + + u + + ">;rel=\"last-memento first-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""; + } else { fl = ", <" + uriPrefix + formatterk.format(l) + "/" + u - + ">;rel=\"last-memento\"; datetime=\"" - + httpformatterl.format(l) + "\""; - fl =fl +", <" + uriPrefix + formatterk.format(f) + "/" + u - + ">;rel=\"first-memento\"; datetime=\"" + + ">;rel=\"last-memento\"; datetime=\"" + + httpformatterl.format(l) + "\""; + fl = fl + ", <" + uriPrefix + formatterk.format(f) + "/" + + u + ">;rel=\"first-memento\"; datetime=\"" + httpformatterl.format(f) + "\""; } response.setHeader("TCN", "list"); response.setStatus(400); response.setHeader("Link", "<" + agguri - + ">;rel=\"timebundle\"" + origlink + fl - + timemap); - - - + + ">;rel=\"timebundle\"" + origlink + fl + timemap); + StringBuffer sberr = new StringBuffer(); - sberr.append("<html><head><title>400 Bad Request</title></head><body>" ); + sberr.append("<html><head><title>400 Bad Request</title></head><body>"); sberr.append("<center><table width='800px'><tr><td><div style='background-color: #e0e0e0; padding: 10px;'><br/>"); - sberr.append("<center><b>Error: 400</b><center>" ); - sberr.append("<center><p>Bad Date Request.</p>" ); - sberr.append("However, we found archived resources available in the following time-range: " ); - sberr.append("<i><blockquote><ul> " ); - - sberr.append("<li>Very first available Memento "+ " at "+ uriPrefix + formatterk.format(f) + "/" + u +"</BR>\n" ); - sberr.append("<li>Most recent available Memento " + " at " + uriPrefix + formatterk.format(f) + "/" + u +"</BR>\n" ); - - - sberr.append("</ul> </blockquote></i>" ); + sberr.append("<center><b>Error: 400</b><center>"); + sberr.append("<center><p>Bad Date Request.</p>"); + sberr.append("However, we found archived resources available in the following time-range: "); + sberr.append("<i><blockquote><ul> "); + + sberr.append("<li>Very first available Memento " + " at " + + uriPrefix + formatterk.format(f) + "/" + u + + "</BR>\n"); + sberr.append("<li>Most recent available Memento " + " at " + + uriPrefix + formatterk.format(f) + "/" + u + + "</BR>\n"); + + sberr.append("</ul> </blockquote></i>"); sberr.append("<br/></div></td></tr>"); sberr.append("</table>"); sberr.append("</body></html>"); PrintWriter pw = response.getWriter(); - response.setContentType("text/html"); - pw.print(sberr.toString()); - pw.flush(); - pw.close(); - return; - } - - + response.setContentType("text/html"); + pw.print(sberr.toString()); + pw.flush(); + pw.close(); + return; + } + // calculate closest values for alternates CaptureSearchResult closestleft = null; CaptureSearchResult closestright = null; @@ -167,12 +167,12 @@ long maxWindow = -1; long wantTime = closestDate.getTime(); - + Iterator<CaptureSearchResult> itr = cResults.iterator(); while (itr.hasNext()) { cur = itr.next(); cur.getCaptureDate(); - long curDistance = cur.getCaptureDate().getTime()-wantTime; + long curDistance = cur.getCaptureDate().getTime() - wantTime; // == 0 skip if (curDistance > 0) { if ((closestright == null) @@ -194,38 +194,42 @@ } - - if (closestleft != null) { if (!(closestleft.getCaptureDate().equals(f))) { - sb.append(", <" + uriPrefix + formatterk.format(closestleft.getCaptureDate()) - + "/" + u - + ">;rel=\"prev-memento\"; datetime=\"" - + httpformatterl.format(closestleft.getCaptureDate()) + "\""); + sb.append(", <" + + uriPrefix + + formatterk.format(closestleft.getCaptureDate()) + + "/" + + u + + ">;rel=\"prev-memento\"; datetime=\"" + + httpformatterl.format(closestleft + .getCaptureDate()) + "\""); } else { int m_index = sb.lastIndexOf("\"first-memento\""); - sb.insert(m_index + 1, "prev-memento "); + sb.insert(m_index + 1, "prev-memento "); } } if (closestright != null) { if (!(closestright.getCaptureDate().equals(l))) { - sb.append(", <" + uriPrefix + formatterk.format(closestright.getCaptureDate()) - + "/" + u + sb.append(", <" + + uriPrefix + + formatterk.format(closestright.getCaptureDate()) + + "/" + + u + ">;rel=\"next-memento\"; datetime=\"" - + httpformatterl.format(closestright.getCaptureDate()) + "\""); + + httpformatterl.format(closestright + .getCaptureDate()) + "\""); } else { int m_index = sb.lastIndexOf("\"last-memento\""); - sb.insert(m_index + 1, "next-memento "); + sb.insert(m_index + 1, "next-memento "); } + } - - - response.setHeader("Link", "<" + agguri - + ">;rel=\"timebundle\"" + origlink + sb.toString() - + timemap); //added timemap - + + response.setHeader("Link", "<" + agguri + ">;rel=\"timebundle\"" + + origlink + sb.toString() + timemap); //added timemap + response.setHeader("TCN", "choice"); response.setHeader("Location", replayUrl); response.sendError(302, "Found"); - %> \ No newline at end of file Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/ORE.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/ORE.jsp 2010-09-30 22:36:57 UTC (rev 3263) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/query/ORE.jsp 2010-10-01 15:43:09 UTC (rev 3264) @@ -1,39 +1,39 @@ -<%@ page import="java.util.Date" %> -<%@ page import="org.archive.wayback.core.UIResults" %> -<%@ page import="org.archive.wayback.util.StringFormatter" %> -<%@ page import="org.archive.wayback.core.WaybackRequest" %> -<%@ page import="org.archive.wayback.core.CaptureSearchResults" %> -<%@ page import="org.archive.wayback.core.CaptureSearchResult"%> -<%@ page import="org.archive.wayback.ResultURIConverter" %> -<%@ page import="java.text.SimpleDateFormat" %> -<%@ page import="org.archive.wayback.util.Timestamp" %> -<%@ page import="java.util.Iterator" %> -<%@ page import="java.util.List" %> -<%@ page import="java.util.ArrayList" %> -<%@ page import="org.dspace.foresite.Aggregation" %> -<%@ page import="org.dspace.foresite.ResourceMap" %> -<%@ page import="org.dspace.foresite.Agent" %> -<%@ page import="org.dspace.foresite.OREFactory" %> -<%@ page import="org.dspace.foresite.AggregatedResource" %> -<%@ page import="org.dspace.foresite.ORESerialiser" %> -<%@ page import="org.dspace.foresite.ORESerialiserFactory" %> -<%@ page import="org.dspace.foresite.ResourceMapDocument" %> -<%@ page import="java.io.PrintWriter" %> -<%@ page import="java.net.URI" %> -<%@ page import="org.dspace.foresite.Predicate" %> -<%@ page import="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter" %> -<%@page import="org.dspace.foresite.Triple"%> -<%@page import="org.dspace.foresite.jena.TripleJena"%> -<%@page import="java.util.UUID"%> -<%@ page import="java.util.TimeZone" %> -<%@page import="java.util.Calendar"%> -<% +<%@ page import="java.util.Date" +%><%@ page import="org.archive.wayback.core.UIResults" +%><%@ page import="org.archive.wayback.util.StringFormatter" +%><%@ page import="org.archive.wayback.core.WaybackRequest" +%><%@ page import="org.archive.wayback.core.CaptureSearchResults" +%><%@ page import="org.archive.wayback.core.CaptureSearchResult" +%><%@ page import="org.archive.wayback.ResultURIConverter" +%><%@ page import="java.text.SimpleDateFormat" +%><%@ page import="org.archive.wayback.util.Timestamp" +%><%@ page import="java.util.Iterator" +%><%@ page import="java.util.List" +%><%@ page import="java.util.ArrayList" +%><%@ page import="org.dspace.foresite.Aggregation" +%><%@ page import="org.dspace.foresite.ResourceMap" +%><%@ page import="org.dspace.foresite.Agent" +%><%@ page import="org.dspace.foresite.OREFactory" +%><%@ page import="org.dspace.foresite.AggregatedResource" +%><%@ page import="org.dspace.foresite.ORESerialiser" +%><%@ page import="org.dspace.foresite.ORESerialiserFactory" +%><%@ page import="org.dspace.foresite.ResourceMapDocument" +%><%@ page import="java.io.PrintWriter" +%><%@ page import="java.net.URI" +%><%@ page import="org.dspace.foresite.Predicate" +%><%@ page import="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter" +%><%@ page import="org.dspace.foresite.Triple" +%><%@ page import="org.dspace.foresite.jena.TripleJena" +%><%@ page import="java.util.UUID" +%><%@ page import="java.util.TimeZone" +%><%@ page import="java.util.Calendar" +%><% UIResults results = UIResults.extractCaptureQuery(request);//nuzno potom perepisat' SimpleDateFormat httpformatterl = new SimpleDateFormat( "E, dd MMM yyyy HH:mm:ss z"); TimeZone tzo = TimeZone.getTimeZone("GMT"); - httpformatterl.setTimeZone(tzo); - + httpformatterl.setTimeZone(tzo); + WaybackRequest wbRequest = results.getWbRequest(); CaptureSearchResults cResults = results.getCaptureResults(); CaptureSearchResult res = cResults.getClosest(wbRequest, true); @@ -41,22 +41,13 @@ ArchivalUrlResultURIConverter uriconverter = (ArchivalUrlResultURIConverter) results .getURIConverter(); String uriPrefix = uriconverter.getReplayURIPrefix(); - //String p_url = wbRequest.getContextPrefix(); String u = wbRequest.getRequestUrl(); String agguri = uriPrefix + "timebundle/" + u; - //String agguri = results.getContextConfig("Prefix") + "timebundle/" + u; - //String remuri = p_url +"timemap/" + u; - //System.out.println(agguri); - //System.out.println(remuri); String format = wbRequest.get("format"); - // System.out.println("here"); Aggregation agg = OREFactory.createAggregation(new URI(agguri)); - //System.out.println("here"); ResourceMap rem = agg.createResourceMap(new URI(uriPrefix + "timemap/" + format + "/" + u)); - //SimpleDateFormat formatter_utc = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); - Date now = new Date(); rem.setCreated(now); @@ -67,20 +58,14 @@ rem.setModified(now); rem.createTriple(pr_type, new URI( "http://www.mementoweb.org/terms/tb/TimeMap")); - //rem.addType(new URI("http://www.mementoweb.org/terms/tb/TimeMap")); Agent creator = OREFactory.createAgent(); creator.addName("Foresite Toolkit (Java)"); - //creator.addMbox(new URI("for...@go...")); - //rem.addAgent(new URI("http://foresite-toolkit.googlecode.com/#javaAgent"),creator); rem.addCreator(creator); agg.addTitle("Memento Time Bundle for " + u); - //CaptureSearchResults cResults = results.getCaptureResults(); - //CaptureSearchResult res = cResults.getClosest(wbRequest,true); Iterator<CaptureSearchResult> itr = cResults.iterator(); - SimpleDateFormat formatterk = new SimpleDateFormat( - "yyyyMMddHHmmss"); + SimpleDateFormat formatterk = new SimpleDateFormat("yyyyMMddHHmmss"); formatterk.setTimeZone(tzo); Date f = cResults.getFirstResultDate(); Date l = cResults.getLastResultDate(); @@ -88,24 +73,18 @@ String ArchiveInterval = formatterk.format(f) + " - " + formatterk.format(l); - //agg.createTriple(new URI("http://www.mementoweb.org/ns/archiveInterval"),ArchiveInterval); - agg.addType(new URI( - "http://www.mementoweb.org/terms/tb/TimeBundle")); - //String mementourl =p_url.replace("ore","memento"); + agg.addType(new URI("http://www.mementoweb.org/terms/tb/TimeBundle")); //include original into aggregation - AggregatedResource ar_o = agg.createAggregatedResource(new URI( - u)); + AggregatedResource ar_o = agg.createAggregatedResource(new URI(u)); ar_o.createTriple(pr_type, new URI( "http://www.mementoweb.org/terms/tb/OriginalResource")); //include timegate into aggregation - AggregatedResource ar_tg = agg - .createAggregatedResource(new URI(results - .getContextConfig("Prefix") - + "timegate/" + u)); + AggregatedResource ar_tg = agg.createAggregatedResource(new URI( + results.getContextConfig("Prefix") + "timegate/" + u)); + Predicate pr_format = new Predicate(); - pr_format.setURI(new URI( - "http://purl.org/dc/elements/1.1/format")); + pr_format.setURI(new URI("http://purl.org/dc/elements/1.1/format")); ar_tg.createTriple(pr_format, new URI(u)); ar_tg.createTriple(pr_type, new URI( "http://www.mementoweb.org/terms/tb/TimeGate")); @@ -127,8 +106,13 @@ linkbf.append("<" + u + ">;rel=\"original\"\n"); linkbf.append(",<" + agguri + ">;rel=\"timebundle\"\n"); - String firstmemento = null; + linkbf.append(",<" + results.getContextConfig("Prefix") + + "timegate/" + u + ">;rel=\"timegate\"\n"); + linkbf.append(",<" + uriPrefix + "timemap/" + format + "/" + u + + ">;rel=\"timemap\"\n"); + String firstmemento = null; + int count = 0; while (itr.hasNext()) { CaptureSearchResult cur = itr.next(); //I am not deduping urls (by digest) for the rdf serialization running out of time, extra efforts for me now ;) @@ -152,9 +136,7 @@ "http://www.mementoweb.org/terms/tb/Memento")); Date startdate = cur.getDuplicateDigestStoredDate(); - //System.out.println("start:"+startdate); enddate = cur.getCaptureDate(); - //System.out.println("end:"+enddate); // serialiase it in links format only for unique digest @@ -164,10 +146,12 @@ + ">;rel=\"first-memento\";datetime=\"" + httpformatterl.format(enddate) + "\"\n"); firstmemento = "firstmemento"; + } else { linkbf.append(",<" + resurl + ">;rel=\"memento\";datetime=\"" + httpformatterl.format(enddate) + "\"\n"); + count = count + 1; } } @@ -178,9 +162,8 @@ UUID a = UUID.randomUUID(); String blanc = "urn:uuid:" + a.toString(); - //System.out.println(blanc); pred.setURI(new URI( - "http://www.mementoweb.org/terms/tb/validOver")); + "http://www.mementoweb.org/terms/tb/observedOver")); triple.relate(pred, new URI(blanc)); Triple tr = new TripleJena(); tr.initialise(new URI(blanc)); @@ -193,7 +176,6 @@ String start = null; Triple trd = new TripleJena(); trd.initialise(new URI(blanc)); - //Calendar cal = Calendar.getInstance(); if (startdate != null) { @@ -206,8 +188,6 @@ start = httpformatterl.format(enddate); } - //System.out.println("type" +trd.getLiteralType()); - ar.addTriple(triple); ar.addTriple(tr); ar.addTriple(trd); @@ -220,7 +200,6 @@ Triple tre = new TripleJena(); tre.initialise(new URI(blanc_)); - //Calendar cal = Calendar.getInstance(); cal.setTime(enddate); tre.relate(pre, cal); ar.addTriple(tre); @@ -246,13 +225,11 @@ ar.addTriple(tre); } - // additional logic for link format - int m_index = linkbf.lastIndexOf("\"memento\""); - //System.out.println(m_index); - linkbf.insert(m_index + 1, "last-"); - //System.out.println("here"); + if (count > 0) { + int m_index = linkbf.lastIndexOf("\"memento\""); + linkbf.insert(m_index + 1, "last-"); + } - //String format = wbRequest.get("format"); ORESerialiser serial = null; if (format.equals("rdf")) { serial = ORESerialiserFactory.getInstance("RDF/XML"); @@ -272,15 +249,12 @@ //} else if (format.equals("link")) { PrintWriter pw = response.getWriter(); - //System.out.println(linkbf.toString()); - - // TODO: are we sure this is right? We want to flush *before* - // setting content-type? + + response.setContentType("text/csv"); pw.print(linkbf.toString()); pw.flush(); - response.setContentType("text/csv"); + } else { - // response.setStatus(404); // TODO: this should be handled in TimeBundleParser to allow // usual Exception rendering to happen. response.sendError(404, "Unknown TimeMap serialization"); @@ -306,5 +280,4 @@ pw.print(serialisation); pw.flush(); } - %> \ No newline at end of file Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/MementoValidity.jsp =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/MementoValidity.jsp 2010-09-30 22:36:57 UTC (rev 3263) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/replay/MementoValidity.jsp 2010-10-01 15:43:09 UTC (rev 3264) @@ -1,150 +1,164 @@ -<%@ page import="org.archive.wayback.core.UIResults" %> -<%@ page import="org.archive.wayback.core.CaptureSearchResults" %> -<%@ page import="org.archive.wayback.core.CaptureSearchResult"%> -<%@ page import="java.util.Date" %> -<%@ page import="org.archive.wayback.core.WaybackRequest" %> -<%@ page import="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter" %> -<%@ page import="java.text.SimpleDateFormat" %> -<%@ page import="java.util.TimeZone" %> -<%@ page import="java.util.Iterator" %> -<% - UIResults results = UIResults.extractCaptureQuery(request); - WaybackRequest wbRequest = results.getWbRequest(); - CaptureSearchResults cResults = results.getCaptureResults(); - CaptureSearchResult res = cResults.getClosest(wbRequest, true); - String u = wbRequest.getRequestUrl(); - SimpleDateFormat httpformatterl = new SimpleDateFormat( - "E, dd MMM yyyy HH:mm:ss z"); - TimeZone tzo = TimeZone.getTimeZone("GMT"); - httpformatterl.setTimeZone(tzo); - SimpleDateFormat formatterk = new SimpleDateFormat("yyyyMMddHHmmss"); - formatterk.setTimeZone(tzo); - - - Date closestDate = res.getCaptureDate(); - String agguri = results.getContextConfig("aggregationPrefix") - + "timebundle/" + u; - String timemap = " , <" - + results.getContextConfig("aggregationPrefix") - + "timemap/link/" + u - + ">;rel=\"timemap\"; type=\"text/csv\""; - ArchivalUrlResultURIConverter uriconverter = - (ArchivalUrlResultURIConverter) results.getURIConverter(); +<%@ page import="org.archive.wayback.core.UIResults" +%><%@ page import="org.archive.wayback.core.CaptureSearchResults" +%><%@ page import="org.archive.wayback.core.CaptureSearchResult" +%><%@ page import="java.util.Date" +%><%@ page import="org.archive.wayback.core.WaybackRequest" +%><%@ page import="org.archive.wayback.archivalurl.ArchivalUrlResultURIConverter" +%><%@ page import="java.text.SimpleDateFormat" +%><%@ page import="java.util.TimeZone" +%><%@ page import="java.util.Iterator" +%><% + UIResults results = UIResults.extractCaptureQuery(request); + WaybackRequest wbRequest = results.getWbRequest(); + CaptureSearchResults cResults = results.getCaptureResults(); + CaptureSearchResult res = cResults.getClosest(wbRequest, true); + String u = wbRequest.getRequestUrl(); + SimpleDateFormat httpformatterl = new SimpleDateFormat( + "E, dd MMM yyyy HH:mm:ss z"); + TimeZone tzo = TimeZone.getTimeZone("GMT"); + httpformatterl.setTimeZone(tzo); + SimpleDateFormat formatterk = new SimpleDateFormat("yyyyMMddHHmmss"); + formatterk.setTimeZone(tzo); - String uriPrefix = uriconverter.getReplayURIPrefix(); + ArchivalUrlResultURIConverter uriconverter = (ArchivalUrlResultURIConverter) results + .getURIConverter(); + Date closestDate = res.getCaptureDate(); + String uriPrefix = uriconverter.getReplayURIPrefix(); + String agguri = results.getContextConfig("aggregationPrefix") + + "timebundle/" + u; + String timemap = " , <" + + results.getContextConfig("aggregationPrefix") + + "timemap/link/" + u + + ">;rel=\"timemap\"; type=\"text/csv\""; - Date f = cResults.getFirstResultDate(); - Date l = cResults.getLastResultDate(); - - StringBuffer sb = new StringBuffer(); - - response.setHeader("Memento-Datetime", httpformatterl.format(res - .getCaptureDate())); - - String memento = ",<" + uriPrefix + formatterk.format(closestDate) + "/" + u - + ">;rel=\"memento\";datetime=\"" - + httpformatterl.format(closestDate) + "\""; - String mfl = null; - if ( (closestDate.equals(f)) && closestDate.equals(l)) { - mfl = ", <" + uriPrefix + formatterk.format(f) + "/" + u - + ">;rel=\"first-memento memento last-memento\"; datetime=\"" - + httpformatterl.format(f) + "\""; - } - else if (closestDate.equals(f)){ - mfl=", <" + uriPrefix + formatterk.format(f) + "/" + u + String timegate = ",<" + uriPrefix + "timegate/" + u + + ">;rel=\"timegate\""; + + Date f = cResults.getFirstResultDate(); + Date l = cResults.getLastResultDate(); + + StringBuffer sb = new StringBuffer(); + + response.setHeader("Memento-Datetime", + httpformatterl.format(res.getCaptureDate())); + + String memento = ",<" + uriPrefix + formatterk.format(closestDate) + + "/" + u + ">;rel=\"memento\";datetime=\"" + + httpformatterl.format(closestDate) + "\""; + String mfl = null; + if ((closestDate.equals(f)) && closestDate.equals(l)) { + mfl = ", <" + + uriPrefix + + formatterk.format(f) + + "/" + + u + + ">;rel=\"first-memento memento last-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""; + } else if (closestDate.equals(f)) { + mfl = ", <" + uriPrefix + formatterk.format(f) + "/" + u + ">;rel=\"first-memento memento\"; datetime=\"" - + httpformatterl.format(f) + "\"" ; - mfl = mfl+", <" + uriPrefix + formatterk.format(l) + "/" + u - + ">;rel=\"last-memento\"; datetime=\"" - + httpformatterl.format(l) + "\""; - - } - else if (closestDate.equals(l)) { - mfl=", <" + uriPrefix + formatterk.format(l) + "/" + u - + ">;rel=\"last-memento memento\"; datetime=\"" - + httpformatterl.format(l) + "\""; - mfl = mfl +", <" + uriPrefix + formatterk.format(f) + "/" + u - + ">;rel=\"first-memento\"; datetime=\"" - + httpformatterl.format(f) + "\""; - } - else { - mfl = memento ; - - mfl = mfl+", <" + uriPrefix + formatterk.format(l) + "/" + u - + ">;rel=\"last-memento\"; datetime=\"" - + httpformatterl.format(l) + "\""; - mfl =mfl +", <" + uriPrefix + formatterk.format(f) + "/" + u + + httpformatterl.format(f) + "\""; + mfl = mfl + ", <" + uriPrefix + formatterk.format(l) + "/" + u + + ">;rel=\"last-memento\"; datetime=\"" + + httpformatterl.format(l) + "\""; + + } else if (closestDate.equals(l)) { + mfl = ", <" + uriPrefix + formatterk.format(l) + "/" + u + + ">;rel=\"last-memento memento\"; datetime=\"" + + httpformatterl.format(l) + "\""; + mfl = mfl + ", <" + uriPrefix + formatterk.format(f) + "/" + u + ">;rel=\"first-memento\"; datetime=\"" + httpformatterl.format(f) + "\""; + } else { + mfl = memento; + + mfl = mfl + ", <" + uriPrefix + formatterk.format(l) + "/" + u + + ">;rel=\"last-memento\"; datetime=\"" + + httpformatterl.format(l) + "\""; + mfl = mfl + ", <" + uriPrefix + formatterk.format(f) + "/" + u + + ">;rel=\"first-memento\"; datetime=\"" + + httpformatterl.format(f) + "\""; } - + sb = new StringBuffer(mfl); - - CaptureSearchResult closestleft = null; - CaptureSearchResult closestright = null; - long rclosestDistance = 0; - long lclosestDistance = 0; - CaptureSearchResult cur = null; - String anchorDate = null; - long maxWindow = -1; - long wantTime = closestDate.getTime(); - - Iterator<CaptureSearchResult> itr = cResults.iterator(); - while (itr.hasNext()) { - cur = itr.next(); - cur.getCaptureDate(); - long curDistance = cur.getCaptureDate().getTime()-wantTime; - // == 0 skip - if (curDistance > 0) { - if ((closestright == null) - || (Math.abs(curDistance) < Math - .abs(rclosestDistance))) { - closestright = cur; - rclosestDistance = Math.abs(curDistance); - } - } + // calculate closest values for link header - if (curDistance < 0) { - if ((closestleft == null) - || (Math.abs(curDistance) < Math - .abs(lclosestDistance))) { - closestleft = cur; - lclosestDistance = Math.abs(curDistance); - } - } + CaptureSearchResult closestleft = null; + CaptureSearchResult closestright = null; + long rclosestDistance = 0; + long lclosestDistance = 0; + CaptureSearchResult cur = null; + String anchorDate = null; - } + long maxWindow = -1; + long wantTime = closestDate.getTime(); - if (closestleft != null) { - if (!(closestleft.getCaptureDate().equals(f))) { - - sb.append(", <" + uriPrefix + formatterk.format(closestleft.getCaptureDate()) + "/" - + u + ">;rel=\"prev-memento\"; datetime=\"" - + httpformatterl.format(closestleft.getCaptureDate()) + "\""); - } - else { - int m_index = sb.lastIndexOf("\"first-memento\""); - sb.insert(m_index + 1, "prev-memento "); + Iterator<CaptureSearchResult> itr = cResults.iterator(); + while (itr.hasNext()) { + cur = itr.next(); + cur.getCaptureDate(); + long curDistance = cur.getCaptureDate().getTime() - wantTime; + // == 0 skip + if (curDistance > 0) { + if ((closestright == null) + || (Math.abs(curDistance) < Math + .abs(rclosestDistance))) { + closestright = cur; + rclosestDistance = Math.abs(curDistance); + } + } - } - } - if (closestright != null) { - if (!(closestright.getCaptureDate().equals(l))) { - sb.append(", <" + uriPrefix + formatterk.format(closestright.getCaptureDate()) + "/" - + u + ">;rel=\"next-memento\"; datetime=\"" - + httpformatterl.format(closestright.getCaptureDate()) + "\""); - } - else { - int m_index = sb.lastIndexOf("\"last-memento\""); - sb.insert(m_index + 1, "next-memento "); - - } + if (curDistance < 0) { + if ((closestleft == null) + || (Math.abs(curDistance) < Math + .abs(lclosestDistance))) { + closestleft = cur; + lclosestDistance = Math.abs(curDistance); + } + } - } + } - String origlink = ", <" + u + ">;rel=\"original\""; + if (closestleft != null) { + if (!(closestleft.getCaptureDate().equals(f))) { - response.setHeader("Link", "<" + agguri + ">;rel=\"timebundle\"" - + origlink + sb.toString() + timemap); + sb.append(", <" + + uriPrefix + + formatterk.format(closestleft.getCaptureDate()) + + "/" + + u + + ">;rel=\"prev-memento\"; datetime=\"" + + httpformatterl.format(closestleft + .getCaptureDate()) + "\""); + } else { + int m_index = sb.lastIndexOf("\"first-memento\""); + sb.insert(m_index + 1, "prev-memento "); + + } + } + if (closestright != null) { + if (!(closestright.getCaptureDate().equals(l))) { + sb.append(", <" + + uriPrefix + + formatterk.format(closestright.getCaptureDate()) + + "/" + + u + + ">;rel=\"next-memento\"; datetime=\"" + + httpformatterl.format(closestright + .getCaptureDate()) + "\""); + } else { + int m_index = sb.lastIndexOf("\"last-memento\""); + sb.insert(m_index + 1, "next-memento "); + + } + + } + + String origlink = ", <" + u + ">;rel=\"original\""; + + response.setHeader("Link", "<" + agguri + ">;rel=\"timebundle\"" + + origlink + sb.toString() + timemap + timegate); + + %> \ 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...> - 2011-02-28 23:55:10
|
Revision: 3418 http://archive-access.svn.sourceforge.net/archive-access/?rev=3418&view=rev Author: bradtofel Date: 2011-02-28 23:55:04 +0000 (Mon, 28 Feb 2011) Log Message: ----------- Added deupeRecords:true property to LocalResourceIndex as default Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/BDBCollection.xml trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/CDXCollection.xml Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/BDBCollection.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/BDBCollection.xml 2011-02-17 22:35:47 UTC (rev 3417) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/BDBCollection.xml 2011-02-28 23:55:04 UTC (rev 3418) @@ -65,6 +65,7 @@ </bean> </property> <property name="maxRecords" value="100000000" /> + <property name="dedupeRecords" value="true" /> </bean> <!-- Modified: trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/CDXCollection.xml =================================================================== --- trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/CDXCollection.xml 2011-02-17 22:35:47 UTC (rev 3417) +++ trunk/archive-access/projects/wayback/wayback-webapp/src/main/webapp/WEB-INF/CDXCollection.xml 2011-02-28 23:55:04 UTC (rev 3418) @@ -67,6 +67,7 @@ --> </property> <property name="maxRecords" value="10000" /> + <property name="dedupeRecords" value="true" /> </bean> </property> </bean> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |