From: <bra...@us...> - 2008-07-22 01:27:42
|
Revision: 2470 http://archive-access.svn.sourceforge.net/archive-access/?rev=2470&view=rev Author: bradtofel Date: 2008-07-22 01:27:51 +0000 (Tue, 22 Jul 2008) Log Message: ----------- INTERFACE: added ResultURIConverter argument to renderException() Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ExceptionRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ExceptionRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ExceptionRenderer.java 2008-07-21 23:54:57 UTC (rev 2469) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ExceptionRenderer.java 2008-07-22 01:27:51 UTC (rev 2470) @@ -54,6 +54,6 @@ */ public void renderException(HttpServletRequest httpRequest, HttpServletResponse httpResponse, WaybackRequest wbRequest, - WaybackException exception) + WaybackException exception, ResultURIConverter uriConverter) throws ServletException, IOException; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java 2008-07-21 23:54:57 UTC (rev 2469) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java 2008-07-22 01:27:51 UTC (rev 2470) @@ -33,6 +33,7 @@ import javax.servlet.http.HttpServletResponse; import org.archive.wayback.ExceptionRenderer; +import org.archive.wayback.ResultURIConverter; import org.archive.wayback.core.UIResults; import org.archive.wayback.core.WaybackRequest; @@ -134,13 +135,14 @@ */ public void renderException(HttpServletRequest httpRequest, HttpServletResponse httpResponse, WaybackRequest wbRequest, - WaybackException exception) throws ServletException, IOException { + WaybackException exception, ResultURIConverter uriConverter) + throws ServletException, IOException { String jspPath = getExceptionHandler(httpRequest, httpResponse, wbRequest, exception); httpRequest.setAttribute("exception", exception); - UIResults uiResults = new UIResults(wbRequest,null,exception); + UIResults uiResults = new UIResults(wbRequest,uriConverter,exception); uiResults.forward(httpRequest, httpResponse, jspPath); } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java 2008-07-21 23:54:57 UTC (rev 2469) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java 2008-07-22 01:27:51 UTC (rev 2470) @@ -304,7 +304,8 @@ } catch(WaybackException e) { logNotInArchive(e,wbRequest); - exception.renderException(httpRequest, httpResponse, wbRequest, e); + exception.renderException(httpRequest, httpResponse, wbRequest, e, + uriConverter); } return handled; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2008-07-22 01:29:21
|
Revision: 2471 http://archive-access.svn.sourceforge.net/archive-access/?rev=2471&view=rev Author: bradtofel Date: 2008-07-22 01:29:30 +0000 (Tue, 22 Jul 2008) Log Message: ----------- MOVED: /exception/ and /query/ .jsp directories under webapps/WEB-INF/ Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/Renderer.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java 2008-07-22 01:27:51 UTC (rev 2470) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java 2008-07-22 01:29:30 UTC (rev 2471) @@ -51,11 +51,11 @@ * @version $Date$, $Revision$ */ public class BaseExceptionRenderer implements ExceptionRenderer { - private String xmlErrorJsp = "/exception/XMLError.jsp"; - private String errorJsp = "/exception/HTMLError.jsp"; - private String imageErrorJsp = "/exception/HTMLError.jsp"; - private String javascriptErrorJsp = "/exception/JavaScriptError.jsp"; - private String cssErrorJsp = "/exception/CSSError.jsp"; + private String xmlErrorJsp = "/WEB-INF/exception/XMLError.jsp"; + private String errorJsp = "/WEB-INF/exception/HTMLError.jsp"; + private String imageErrorJsp = "/WEB-INF/exception/HTMLError.jsp"; + private String javascriptErrorJsp = "/WEB-INF/exception/JavaScriptError.jsp"; + private String cssErrorJsp = "/WEB-INF/exception/CSSError.jsp"; protected final Pattern IMAGE_REGEX = Pattern .compile(".*\\.(jpg|jpeg|gif|png|bmp|tiff|tif)$"); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/Renderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/Renderer.java 2008-07-22 01:27:51 UTC (rev 2470) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/Renderer.java 2008-07-22 01:29:30 UTC (rev 2471) @@ -47,10 +47,10 @@ */ public class Renderer implements QueryRenderer { - private String captureJsp = "/query/HTMLCaptureResults.jsp"; - private String urlJsp = "/query/HTMLUrlResults.jsp"; - private String xmlCaptureJsp = "/query/XMLCaptureResults.jsp"; - private String xmlUrlJsp = "/query/XMLUrlResults.jsp"; + private String captureJsp = "/WEB-INF/query/HTMLCaptureResults.jsp"; + private String urlJsp = "/WEB-INF/query/HTMLUrlResults.jsp"; + private String xmlCaptureJsp = "/WEB-INF/query/XMLCaptureResults.jsp"; + private String xmlUrlJsp = "/WEB-INF/query/XMLUrlResults.jsp"; public void renderCaptureResults(HttpServletRequest httpRequest, HttpServletResponse httpResponse, WaybackRequest wbRequest, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2008-07-23 00:42:39
|
Revision: 2485 http://archive-access.svn.sourceforge.net/archive-access/?rev=2485&view=rev Author: bradtofel Date: 2008-07-23 00:42:47 +0000 (Wed, 23 Jul 2008) Log Message: ----------- REFACTOR: moved WaybackRequest.fixup() out of all RequestParser implementations, and into AccessPoint. This allows the AccessPoint to set the reference to itself before fixup() allowing: FEATURE: Added get/setLocale() to AccessPoint, allowing explicit configuration of the Locale to use for that AccessPoint. If none is specified, then the Locale of the HttpServletRequest is used, as before. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/OpenSearchRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/PathRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java 2008-07-22 02:59:11 UTC (rev 2484) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java 2008-07-23 00:42:47 UTC (rev 2485) @@ -720,10 +720,14 @@ String.valueOf(httpRequest.getLocalPort())); putUnlessNull(REQUEST_WAYBACK_CONTEXT, httpRequest.getContextPath()); - Locale l = httpRequest.getLocale(); - ResourceBundle b = ResourceBundle.getBundle(UI_RESOURCE_BUNDLE_NAME, - httpRequest.getLocale()); - formatter = new StringFormatter(b,l); + Locale l = null; + if(accessPoint != null) { + l = accessPoint.getLocale(); + } + if(l == null) { + l = httpRequest.getLocale(); + } + setLocale(l); putUnlessNull(REQUEST_LOCALE_LANG,l.getDisplayLanguage()); Cookie[] cookies = httpRequest.getCookies(); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyRequestParser.java 2008-07-22 02:59:11 UTC (rev 2484) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyRequestParser.java 2008-07-23 00:42:47 UTC (rev 2485) @@ -74,7 +74,6 @@ String replayDateStr = BDBMap.getTimestampForId( httpRequest.getContextPath(), id); wbRequest.setReplayTimestamp(replayDateStr); - wbRequest.fixup(httpRequest); } return wbRequest; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java 2008-07-22 02:59:11 UTC (rev 2484) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java 2008-07-23 00:42:47 UTC (rev 2485) @@ -102,10 +102,6 @@ } } } - if(wbRequest != null) { - wbRequest.fixup(httpRequest); - } - return wbRequest; } } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/OpenSearchRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/OpenSearchRequestParser.java 2008-07-22 02:59:11 UTC (rev 2484) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/OpenSearchRequestParser.java 2008-07-23 00:42:47 UTC (rev 2485) @@ -146,7 +146,6 @@ if(wbRequest.getEndTimestamp() == null) { wbRequest.setEndTimestamp(getLatestTimestamp()); } - wbRequest.fixup(httpRequest); return wbRequest; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/PathRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/PathRequestParser.java 2008-07-22 02:59:11 UTC (rev 2484) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/PathRequestParser.java 2008-07-23 00:42:47 UTC (rev 2485) @@ -67,7 +67,6 @@ WaybackRequest wbRequest = parse(requestPath); if(wbRequest != null) { - wbRequest.fixup(httpRequest); wbRequest.setResultsPerPage(maxRecords); } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java 2008-07-22 02:59:11 UTC (rev 2484) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java 2008-07-23 00:42:47 UTC (rev 2485) @@ -25,6 +25,7 @@ package org.archive.wayback.webapp; import java.io.IOException; +import java.util.Locale; import java.util.Properties; import java.util.logging.Logger; @@ -89,7 +90,17 @@ private Properties configs = null; private ExclusionFilterFactory exclusionFactory = null; private BooleanOperator<WaybackRequest> authentication = null; + private String urlRoot = null; + private Locale locale = null; + public Locale getLocale() { + return locale; + } + + public void setLocale(Locale locale) { + this.locale = locale; + } + /** * */ @@ -224,6 +235,9 @@ * Canonical server and port information. */ public String getAbsoluteLocalPrefix(HttpServletRequest httpRequest) { + if(urlRoot != null) { + return urlRoot; + } return getAbsoluteContextPrefix(httpRequest, useServerName); } @@ -236,7 +250,7 @@ WaybackRequest wbRequest = new WaybackRequest(); wbRequest.setContextPrefix(getAbsoluteLocalPrefix(httpRequest)); wbRequest.setAccessPoint(this); - + wbRequest.fixup(httpRequest); UIResults uiResults = new UIResults(wbRequest,uriConverter); try { uiResults.forward(httpRequest, httpResponse, translated); @@ -278,9 +292,10 @@ wbRequest = parser.parse(httpRequest, this); if(wbRequest != null) { + handled = true; wbRequest.setAccessPoint(this); - handled = true; wbRequest.setContextPrefix(getAbsoluteLocalPrefix(httpRequest)); + wbRequest.fixup(httpRequest); if(authentication != null) { if(!authentication.isTrue(wbRequest)) { throw new AuthenticationControlException("Not authorized"); @@ -485,4 +500,12 @@ public void setException(ExceptionRenderer exception) { this.exception = exception; } + + public String getUrlRoot() { + return urlRoot; + } + + public void setUrlRoot(String urlRoot) { + this.urlRoot = urlRoot; + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2008-07-23 01:06:22
|
Revision: 2487 http://archive-access.svn.sourceforge.net/archive-access/?rev=2487&view=rev Author: bradtofel Date: 2008-07-23 01:06:29 +0000 (Wed, 23 Jul 2008) Log Message: ----------- REFACTOR: moved various Adapter<*SearchResult> into org.archive.wayback.resourceindex.adapters Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/LocalResourceIndex.java Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/CaptureToUrlSearchResultAdapter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/DeduplicationSearchResultAnnotationAdapter.java Removed Paths: ------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureToUrlSearchResultAdapter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/DeduplicationSearchResultAnnotationAdapter.java Deleted: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureToUrlSearchResultAdapter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureToUrlSearchResultAdapter.java 2008-07-23 01:04:09 UTC (rev 2486) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureToUrlSearchResultAdapter.java 2008-07-23 01:06:29 UTC (rev 2487) @@ -1,113 +0,0 @@ -/* CaptureToUrlSearchResultAdapter - * - * $Id$ - * - * Created on 4:45:55 PM Jun 28, 2008. - * - * Copyright (C) 2008 Internet Archive. - * - * This file is part of wayback. - * - * wayback is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * any later version. - * - * wayback is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser Public License for more details. - * - * You should have received a copy of the GNU Lesser Public License - * along with wayback; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -package org.archive.wayback.core; - -import java.util.HashMap; - -import org.archive.wayback.util.AdaptedIterator; -import org.archive.wayback.util.Adapter; -import org.archive.wayback.util.CloseableIterator; - -/** - * - * - * @author brad - * @version $Date$, $Revision$ - */ -public class CaptureToUrlSearchResultAdapter - implements Adapter<CaptureSearchResult, UrlSearchResult> { - - private String currentUrl; - private String originalUrl; - private String firstCapture; - private String lastCapture; - private int numCaptures; - private HashMap<String,Object> digests; - private UrlSearchResult resultRef = null; - public CaptureToUrlSearchResultAdapter() { - - } - private UrlSearchResult makeUrlSearchResult(CaptureSearchResult result) { - currentUrl = result.getUrlKey(); - originalUrl = result.getOriginalUrl(); - firstCapture = result.getCaptureTimestamp(); - lastCapture = firstCapture; - digests = new HashMap<String,Object>(); - digests.put(result.getDigest(),null); - numCaptures = 1; - - resultRef = new UrlSearchResult(); - resultRef.setUrlKey(currentUrl); - resultRef.setOriginalUrl(originalUrl); - resultRef.setFirstCapture(firstCapture); - resultRef.setLastCapture(lastCapture); - resultRef.setNumCaptures(1); - resultRef.setNumVersions(1); - return resultRef; - } - - /* (non-Javadoc) - * @see org.archive.wayback.util.Adapter#adapt(java.lang.Object) - */ - public UrlSearchResult adapt(CaptureSearchResult c) { - String urlKey = c.getUrlKey(); - if(resultRef == null || !currentUrl.equals(urlKey)) { - return makeUrlSearchResult(c); - } - - // same url -- accumulate into the last one we returned: - String captureDate = c.getCaptureTimestamp(); - if(captureDate.compareTo(firstCapture) < 0) { - firstCapture = captureDate; - resultRef.setFirstCapture(firstCapture); - } - if(captureDate.compareTo(lastCapture) > 0) { - lastCapture = captureDate; - resultRef.setLastCapture(lastCapture); - } - numCaptures++; - digests.put(c.getDigest(), null); - resultRef.setNumCaptures(numCaptures); - resultRef.setNumVersions(digests.size()); - return null; - } - public static CloseableIterator<UrlSearchResult> adaptCaptureIterator( - CloseableIterator<CaptureSearchResult> itr) { - - // HACKHACK: this is pretty lame. We return an UrlSearchResult the - // first time we see a new urlKey, and cache a reference to the returned - // UrlSearchResult, updating it as we see subsequent CaptureSearchResult - // objects with the same urlKey. - // This means that users of the returned UrlSearchResult need to wait - // until they've got the *next* returned UrlSearchResult before using - // the *previous* UrlSearchResult. - // At the moment, this all happens inside a LocalResourceIndex, so - // none of the UrlSearchResult objects should be seen/used in any - // significant way before they've all be accumulated into an - // UrlSearchResults object.. - return new AdaptedIterator<CaptureSearchResult,UrlSearchResult>(itr, - new CaptureToUrlSearchResultAdapter()); - } -} Deleted: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/DeduplicationSearchResultAnnotationAdapter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/DeduplicationSearchResultAnnotationAdapter.java 2008-07-23 01:04:09 UTC (rev 2486) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/DeduplicationSearchResultAnnotationAdapter.java 2008-07-23 01:06:29 UTC (rev 2487) @@ -1,63 +0,0 @@ -package org.archive.wayback.resourceindex; - -import java.util.HashMap; - -import org.archive.wayback.core.CaptureSearchResult; -import org.archive.wayback.util.Adapter; - -/** - * Adapter class that observes a stream of SearchResults tracking for each - * complete record, a mapping of that records digest to: - * Arc/Warc Filename - * Arc/Warc offset - * HTTP Response - * MIME-Type - * Redirect URL - * - * If subsequent SearchResults are missing these fields ("-") and the Digest - * field has been seen, then the subsequent SearchResults are updated with the - * values from the kept copy matching that digest, and an additional annotation - * field is added. - * - * - * @author brad - * @version $Date$, $Revision$ - */ -public class DeduplicationSearchResultAnnotationAdapter -implements Adapter<CaptureSearchResult,CaptureSearchResult> { - private final static String EMPTY_VALUE = "-"; - - private HashMap<String,CaptureSearchResult> memory = null; - - public DeduplicationSearchResultAnnotationAdapter() { - memory = new HashMap<String,CaptureSearchResult>(); - } - - private CaptureSearchResult annotate(CaptureSearchResult o) { - String thisDigest = o.getDigest(); - CaptureSearchResult last = memory.get(thisDigest); - if(last == null) { - // TODO: log missing record digest reference - return null; - } - o.setFile(last.getFile()); - o.setOffset(last.getOffset()); - o.setHttpCode(last.getHttpCode()); - o.setMimeType(last.getMimeType()); - o.setRedirectUrl(last.getRedirectUrl()); - o.flagDuplicateDigest(last.getCaptureTimestamp()); - return o; - } - - private CaptureSearchResult remember(CaptureSearchResult o) { - memory.put(o.getDigest(),o); - return o; - } - - public CaptureSearchResult adapt(CaptureSearchResult o) { - if(o.getFile().equals(EMPTY_VALUE)) { - return annotate(o); - } - return remember(o); - } -} \ No newline at end of file Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/LocalResourceIndex.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/LocalResourceIndex.java 2008-07-23 01:04:09 UTC (rev 2486) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/LocalResourceIndex.java 2008-07-23 01:06:29 UTC (rev 2487) @@ -34,7 +34,6 @@ import org.archive.wayback.UrlCanonicalizer; import org.archive.wayback.core.CaptureSearchResult; import org.archive.wayback.core.CaptureSearchResults; -import org.archive.wayback.core.CaptureToUrlSearchResultAdapter; import org.archive.wayback.core.SearchResult; import org.archive.wayback.core.SearchResults; import org.archive.wayback.core.UrlSearchResult; @@ -44,6 +43,8 @@ import org.archive.wayback.exception.BadQueryException; import org.archive.wayback.exception.ResourceIndexNotAvailableException; import org.archive.wayback.exception.ResourceNotInArchiveException; +import org.archive.wayback.resourceindex.adapters.CaptureToUrlSearchResultAdapter; +import org.archive.wayback.resourceindex.adapters.DeduplicationSearchResultAnnotationAdapter; import org.archive.wayback.resourceindex.filters.CounterFilter; import org.archive.wayback.resourceindex.filters.DateRangeFilter; import org.archive.wayback.resourceindex.filters.DuplicateRecordFilter; Copied: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/CaptureToUrlSearchResultAdapter.java (from rev 2448, trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureToUrlSearchResultAdapter.java) =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/CaptureToUrlSearchResultAdapter.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/CaptureToUrlSearchResultAdapter.java 2008-07-23 01:06:29 UTC (rev 2487) @@ -0,0 +1,115 @@ +/* CaptureToUrlSearchResultAdapter + * + * $Id$ + * + * Created on 4:45:55 PM Jun 28, 2008. + * + * Copyright (C) 2008 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +package org.archive.wayback.resourceindex.adapters; + +import java.util.HashMap; + +import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.core.UrlSearchResult; +import org.archive.wayback.util.AdaptedIterator; +import org.archive.wayback.util.Adapter; +import org.archive.wayback.util.CloseableIterator; + +/** + * + * + * @author brad + * @version $Date$, $Revision$ + */ +public class CaptureToUrlSearchResultAdapter + implements Adapter<CaptureSearchResult, UrlSearchResult> { + + private String currentUrl; + private String originalUrl; + private String firstCapture; + private String lastCapture; + private int numCaptures; + private HashMap<String,Object> digests; + private UrlSearchResult resultRef = null; + public CaptureToUrlSearchResultAdapter() { + + } + private UrlSearchResult makeUrlSearchResult(CaptureSearchResult result) { + currentUrl = result.getUrlKey(); + originalUrl = result.getOriginalUrl(); + firstCapture = result.getCaptureTimestamp(); + lastCapture = firstCapture; + digests = new HashMap<String,Object>(); + digests.put(result.getDigest(),null); + numCaptures = 1; + + resultRef = new UrlSearchResult(); + resultRef.setUrlKey(currentUrl); + resultRef.setOriginalUrl(originalUrl); + resultRef.setFirstCapture(firstCapture); + resultRef.setLastCapture(lastCapture); + resultRef.setNumCaptures(1); + resultRef.setNumVersions(1); + return resultRef; + } + + /* (non-Javadoc) + * @see org.archive.wayback.util.Adapter#adapt(java.lang.Object) + */ + public UrlSearchResult adapt(CaptureSearchResult c) { + String urlKey = c.getUrlKey(); + if(resultRef == null || !currentUrl.equals(urlKey)) { + return makeUrlSearchResult(c); + } + + // same url -- accumulate into the last one we returned: + String captureDate = c.getCaptureTimestamp(); + if(captureDate.compareTo(firstCapture) < 0) { + firstCapture = captureDate; + resultRef.setFirstCapture(firstCapture); + } + if(captureDate.compareTo(lastCapture) > 0) { + lastCapture = captureDate; + resultRef.setLastCapture(lastCapture); + } + numCaptures++; + digests.put(c.getDigest(), null); + resultRef.setNumCaptures(numCaptures); + resultRef.setNumVersions(digests.size()); + return null; + } + public static CloseableIterator<UrlSearchResult> adaptCaptureIterator( + CloseableIterator<CaptureSearchResult> itr) { + + // HACKHACK: this is pretty lame. We return an UrlSearchResult the + // first time we see a new urlKey, and cache a reference to the returned + // UrlSearchResult, updating it as we see subsequent CaptureSearchResult + // objects with the same urlKey. + // This means that users of the returned UrlSearchResult need to wait + // until they've got the *next* returned UrlSearchResult before using + // the *previous* UrlSearchResult. + // At the moment, this all happens inside a LocalResourceIndex, so + // none of the UrlSearchResult objects should be seen/used in any + // significant way before they've all be accumulated into an + // UrlSearchResults object.. + return new AdaptedIterator<CaptureSearchResult,UrlSearchResult>(itr, + new CaptureToUrlSearchResultAdapter()); + } +} Copied: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/DeduplicationSearchResultAnnotationAdapter.java (from rev 2448, trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/DeduplicationSearchResultAnnotationAdapter.java) =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/DeduplicationSearchResultAnnotationAdapter.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/DeduplicationSearchResultAnnotationAdapter.java 2008-07-23 01:06:29 UTC (rev 2487) @@ -0,0 +1,63 @@ +package org.archive.wayback.resourceindex.adapters; + +import java.util.HashMap; + +import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.util.Adapter; + +/** + * Adapter class that observes a stream of SearchResults tracking for each + * complete record, a mapping of that records digest to: + * Arc/Warc Filename + * Arc/Warc offset + * HTTP Response + * MIME-Type + * Redirect URL + * + * If subsequent SearchResults are missing these fields ("-") and the Digest + * field has been seen, then the subsequent SearchResults are updated with the + * values from the kept copy matching that digest, and an additional annotation + * field is added. + * + * + * @author brad + * @version $Date$, $Revision$ + */ +public class DeduplicationSearchResultAnnotationAdapter +implements Adapter<CaptureSearchResult,CaptureSearchResult> { + private final static String EMPTY_VALUE = "-"; + + private HashMap<String,CaptureSearchResult> memory = null; + + public DeduplicationSearchResultAnnotationAdapter() { + memory = new HashMap<String,CaptureSearchResult>(); + } + + private CaptureSearchResult annotate(CaptureSearchResult o) { + String thisDigest = o.getDigest(); + CaptureSearchResult last = memory.get(thisDigest); + if(last == null) { + // TODO: log missing record digest reference + return null; + } + o.setFile(last.getFile()); + o.setOffset(last.getOffset()); + o.setHttpCode(last.getHttpCode()); + o.setMimeType(last.getMimeType()); + o.setRedirectUrl(last.getRedirectUrl()); + o.flagDuplicateDigest(last.getCaptureTimestamp()); + return o; + } + + private CaptureSearchResult remember(CaptureSearchResult o) { + memory.put(o.getDigest(),o); + return o; + } + + public CaptureSearchResult adapt(CaptureSearchResult o) { + if(o.getFile().equals(EMPTY_VALUE)) { + return annotate(o); + } + return remember(o); + } +} \ 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-08 23:03:43
|
Revision: 2529 http://archive-access.svn.sourceforge.net/archive-access/?rev=2529&view=rev Author: bradtofel Date: 2008-08-08 23:03:50 +0000 (Fri, 08 Aug 2008) Log Message: ----------- TWEAK: improvements to logging. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/updater/LocalResourceIndexUpdater.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/IndexQueueUpdater.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/IndexWorker.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBUpdater.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFileSourceUpdater.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/updater/LocalResourceIndexUpdater.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/updater/LocalResourceIndexUpdater.java 2008-08-08 23:02:29 UTC (rev 2528) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/updater/LocalResourceIndexUpdater.java 2008-08-08 23:03:50 UTC (rev 2529) @@ -304,7 +304,7 @@ sleepInterval = runInterval; } } catch (InterruptedException e) { - e.printStackTrace(); + LOGGER.info("Shutting Down."); return; } } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/IndexQueueUpdater.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/IndexQueueUpdater.java 2008-08-08 23:02:29 UTC (rev 2528) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/IndexQueueUpdater.java 2008-08-08 23:03:50 UTC (rev 2529) @@ -87,7 +87,9 @@ CloseableIterator<String> newNames = db.getNamesBetweenMarks(lastMarkPoint, currentMarkPoint); while(newNames.hasNext()) { - queue.enqueue(newNames.next()); + String newName = newNames.next(); + LOGGER.info("Queued " + newName + " for indexing."); + queue.enqueue(newName); added++; } newNames.close(); @@ -143,15 +145,13 @@ int updated = updater.updateQueue(); if(updated > 0) { - LOGGER.info("Updated " + updated + " files.."); sleepInterval = runInterval; } else { - LOGGER.info("Updated ZERO files.."); sleepInterval += runInterval; } sleep(sleepInterval); } catch (InterruptedException e) { - e.printStackTrace(); + LOGGER.info("Shutting Down."); return; } catch (IOException e) { e.printStackTrace(); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/IndexWorker.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/IndexWorker.java 2008-08-08 23:02:29 UTC (rev 2528) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/IndexWorker.java 2008-08-08 23:03:50 UTC (rev 2529) @@ -103,6 +103,7 @@ try { if(pathsOrUrls != null) { for(String pathOrUrl : pathsOrUrls) { + LOGGER.info("Indexing " + name + " from " + pathOrUrl); CloseableIterator<CaptureSearchResult> itr = indexFile(pathOrUrl); target.addSearchResults(name, itr); itr.close(); @@ -151,17 +152,15 @@ boolean worked = worker.doWork(); if(worked) { - LOGGER.info("Did work, no sleep.."); sleepInterval = 0; } else { - LOGGER.info("No Work to do - sleeping.."); sleepInterval += runInterval; } if(sleepInterval > 0) { sleep(sleepInterval); } } catch (InterruptedException e) { - e.printStackTrace(); + LOGGER.info("Shutting Down."); return; } catch (IOException e) { e.printStackTrace(); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBUpdater.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBUpdater.java 2008-08-08 23:02:29 UTC (rev 2528) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBUpdater.java 2008-08-08 23:03:50 UTC (rev 2529) @@ -168,7 +168,7 @@ } sleep(sleepInterval); } catch (InterruptedException e) { - e.printStackTrace(); + LOGGER.info("Shutting Down."); return; } catch (IOException e) { e.printStackTrace(); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFileSourceUpdater.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFileSourceUpdater.java 2008-08-08 23:02:29 UTC (rev 2528) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFileSourceUpdater.java 2008-08-08 23:03:50 UTC (rev 2529) @@ -125,7 +125,7 @@ ". Not sleeping."); } } catch (InterruptedException e) { - e.printStackTrace(); + LOGGER.info("Shutting Down."); return; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2008-08-11 23:25:27
|
Revision: 2534 http://archive-access.svn.sourceforge.net/archive-access/?rev=2534&view=rev Author: bradtofel Date: 2008-08-11 23:25:34 +0000 (Mon, 11 Aug 2008) Log Message: ----------- TWEAK: ResourceStore.retrieveResource() no longer throws IOException: this is now converted into a ResourceNotAvailableException Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResourceStore.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/LocationDBResourceStore.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/SimpleResourceStore.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResourceStore.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResourceStore.java 2008-08-09 02:37:52 UTC (rev 2533) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResourceStore.java 2008-08-11 23:25:34 UTC (rev 2534) @@ -41,11 +41,10 @@ * * @param result * @return Resource object retrieved for the SearchResult - * @throws IOException * @throws ResourceNotAvailableException */ - public Resource retrieveResource(CaptureSearchResult result) throws IOException, - ResourceNotAvailableException; + public Resource retrieveResource(CaptureSearchResult result) + throws ResourceNotAvailableException; public void shutdown() throws IOException; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/LocationDBResourceStore.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/LocationDBResourceStore.java 2008-08-09 02:37:52 UTC (rev 2533) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/LocationDBResourceStore.java 2008-08-11 23:25:34 UTC (rev 2534) @@ -49,15 +49,21 @@ /* (non-Javadoc) * @see org.archive.wayback.ResourceStore#retrieveResource(org.archive.wayback.core.SearchResult) */ - public Resource retrieveResource(CaptureSearchResult result) throws IOException, - ResourceNotAvailableException { + public Resource retrieveResource(CaptureSearchResult result) + throws ResourceNotAvailableException { // extract ARC filename String fileName = result.getFile(); if(fileName == null || fileName.length() < 1) { - throw new IOException("No ARC/WARC name in search result..."); + throw new ResourceNotAvailableException("No ARC/WARC name in search result..."); } - String urls[] = db.nameToUrls(fileName); + String urls[]; + try { + urls = db.nameToUrls(fileName); + } catch (IOException e1) { + e1.printStackTrace(); + throw new ResourceNotAvailableException(e1.getLocalizedMessage()); + } if(urls == null || urls.length == 0) { throw new ResourceNotAvailableException("Unable to locate(" + fileName + ")"); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/SimpleResourceStore.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/SimpleResourceStore.java 2008-08-09 02:37:52 UTC (rev 2533) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/SimpleResourceStore.java 2008-08-11 23:25:34 UTC (rev 2534) @@ -48,13 +48,13 @@ private String prefix = null; - public Resource retrieveResource(CaptureSearchResult result) throws IOException, - ResourceNotAvailableException { + public Resource retrieveResource(CaptureSearchResult result) + throws ResourceNotAvailableException { // extract ARC filename String fileName = result.getFile(); if(fileName == null || fileName.length() < 1) { - throw new IOException("No ARC/WARC name in search result..."); + throw new ResourceNotAvailableException("No ARC/WARC name in search result..."); } final long offset = result.getOffset(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2008-10-11 02:12:46
|
Revision: 2607 http://archive-access.svn.sourceforge.net/archive-access/?rev=2607&view=rev Author: bradtofel Date: 2008-10-11 02:12:37 +0000 (Sat, 11 Oct 2008) Log Message: ----------- ENHANCEMENT(ACC-38): added timeouts to HTTP requests for remote index and remote ARC/WARC documents. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/RemoteResourceIndex.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFactory.java Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/TimeoutArchiveReaderFactory.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/RemoteResourceIndex.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/RemoteResourceIndex.java 2008-10-11 01:59:57 UTC (rev 2606) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/RemoteResourceIndex.java 2008-10-11 02:12:37 UTC (rev 2607) @@ -26,6 +26,8 @@ import java.io.File; import java.io.IOException; +import java.net.URL; +import java.net.URLConnection; import java.util.logging.Logger; import javax.xml.parsers.DocumentBuilder; @@ -71,7 +73,10 @@ .class.getName()); private String searchUrlBase; - + private int connectTimeout = 10000; + private int readTimeout = 10000; + + private DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); private static final String WB_XML_REQUEST_TAGNAME = "request"; @@ -333,7 +338,11 @@ // do an HTTP request, plus parse the result into an XML DOM protected Document getHttpDocument(String url) throws IOException, SAXException { - return (getDocumentBuilder()).parse(url); + URL u = new URL(url); + URLConnection conn = u.openConnection(); + conn.setConnectTimeout(connectTimeout); + conn.setReadTimeout(readTimeout); + return (getDocumentBuilder()).parse(conn.getInputStream(),url); } protected Document getFileDocument(File f) throws IOException, SAXException { @@ -365,4 +374,19 @@ public void setCanonicalizer(UrlCanonicalizer canonicalizer) { this.canonicalizer = canonicalizer; } + public int getConnectTimeout() { + return connectTimeout; + } + + public void setConnectTimeout(int connectTimeout) { + this.connectTimeout = connectTimeout; + } + + public int getReadTimeout() { + return readTimeout; + } + + public void setReadTimeout(int readTimeout) { + this.readTimeout = readTimeout; + } } \ No newline at end of file Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFactory.java 2008-10-11 01:59:57 UTC (rev 2606) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFactory.java 2008-10-11 02:12:37 UTC (rev 2607) @@ -4,6 +4,7 @@ import java.io.IOException; import java.net.URL; +import org.archive.io.ArchiveReader; import org.archive.io.ArchiveRecord; import org.archive.io.arc.ARCReader; import org.archive.io.arc.ARCReaderFactory; @@ -60,25 +61,27 @@ } public static Resource getResource(URL url, long offset) - throws IOException, ResourceNotAvailableException { + throws IOException, ResourceNotAvailableException { + Resource r = null; - String name = url.getFile(); - if (isArc(name)) { - - ARCReader reader = ARCReaderFactory.get(url, offset); - r = ARCArchiveRecordToResource(reader.get(),reader); - - } else if (isWarc(name)) { - - WARCReader reader = WARCReaderFactory.get(url, offset); - r = WARCArchiveRecordToResource(reader.get(),reader); - + // TODO: allow configuration of timeouts -- now using defaults.. + TimeoutArchiveReaderFactory tarf = new TimeoutArchiveReaderFactory(); + ArchiveReader reader = tarf.getArchiveReader(url,offset); + if(reader instanceof ARCReader) { + ARCReader areader = (ARCReader) reader; + r = ARCArchiveRecordToResource(areader.get(),areader); + + } else if(reader instanceof WARCReader) { + WARCReader wreader = (WARCReader) reader; + r = WARCArchiveRecordToResource(wreader.get(),wreader); + } else { - throw new ResourceNotAvailableException("Unknown extension"); + throw new ResourceNotAvailableException("Unknown ArchiveReader"); } return r; } - + + private static boolean isArc(final String name) { return (name.endsWith(ArcWarcFilenameFilter.ARC_SUFFIX) Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/TimeoutArchiveReaderFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/TimeoutArchiveReaderFactory.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/TimeoutArchiveReaderFactory.java 2008-10-11 02:12:37 UTC (rev 2607) @@ -0,0 +1,58 @@ +package org.archive.wayback.resourcestore.resourcefile; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLConnection; + +import org.archive.io.ArchiveReader; +import org.archive.io.ArchiveReaderFactory; + +/** + * Sad but needed subclass of the ArchiveReaderFactory, allows config of + * timeouts for connect and reads on underlying HTTP connections, and overrides + * the one getArchiveReader(URL,long) method to enable setting the timeouts. + * + * This functionality should be moved into the ArchiveReaderFactory. + * + * @author brad + * + */ +public class TimeoutArchiveReaderFactory extends ArchiveReaderFactory { + + private final static int STREAM_ALL = -1; + private int connectTimeout = 10000; + private int readTimeout = 10000; + public TimeoutArchiveReaderFactory(int connectTimeout, int readTimeout) { + this.connectTimeout = connectTimeout; + this.readTimeout = readTimeout; + } + + public TimeoutArchiveReaderFactory(int timeout) { + this.connectTimeout = timeout; + this.readTimeout = timeout; + } + public TimeoutArchiveReaderFactory() { + } + protected ArchiveReader getArchiveReader(final URL f, final long offset) + throws IOException { + + // Get URL connection. + URLConnection connection = f.openConnection(); + if (connection instanceof HttpURLConnection) { + addUserAgent((HttpURLConnection)connection); + } + if (offset != STREAM_ALL) { + // Use a Range request (Assumes HTTP 1.1 on other end). If + // length >= 0, add open-ended range header to the request. Else, + // because end-byte is inclusive, subtract 1. + connection.addRequestProperty("Range", "bytes=" + offset + "-"); + } + + connection.setConnectTimeout(connectTimeout); + connection.setReadTimeout(readTimeout); + + return getArchiveReader(f.toString(), connection.getInputStream(), + (offset == 0)); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2008-12-05 22:17:59
|
Revision: 2644 http://archive-access.svn.sourceforge.net/archive-access/?rev=2644&view=rev Author: bradtofel Date: 2008-12-05 22:17:55 +0000 (Fri, 05 Dec 2008) Log Message: ----------- ACC-53: now we check within the URI converters to (try to) ensure an URL is rewritten at most once -- becomes an idempotent operation. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlResultURIConverter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixResultURIConverter.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlResultURIConverter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlResultURIConverter.java 2008-12-05 22:13:14 UTC (rev 2643) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlResultURIConverter.java 2008-12-05 22:17:55 UTC (rev 2644) @@ -42,10 +42,14 @@ * @see org.archive.wayback.ResultURIConverter#makeReplayURI(java.lang.String, java.lang.String) */ public String makeReplayURI(String datespec, String url) { + String suffix = datespec + "/" + url; if(replayURIPrefix == null) { - return datespec + "/" + url; + return suffix; } else { - return replayURIPrefix + datespec + "/" + url; + if(url.startsWith(replayURIPrefix)) { + return url; + } + return replayURIPrefix + suffix; } } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixResultURIConverter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixResultURIConverter.java 2008-12-05 22:13:14 UTC (rev 2643) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixResultURIConverter.java 2008-12-05 22:17:55 UTC (rev 2644) @@ -45,6 +45,9 @@ public String makeReplayURI(String datespec, String url) { String replayURI = ""; try { + if(url.contains(hostPort)) { + return url; + } URI uri = new URI(url); StringBuilder sb = new StringBuilder(90); sb.append("http://"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2009-05-20 02:18:54
|
Revision: 2716 http://archive-access.svn.sourceforge.net/archive-access/?rev=2716&view=rev Author: bradtofel Date: 2009-05-20 02:12:57 +0000 (Wed, 20 May 2009) Log Message: ----------- REFACTOR: now all parse() implementations can throw a BetterRequestException. Also, CompositeRequestParser is now officially abstract, clarifying the semantics of overriding getRequestParsers(). Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/RequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixCompositeRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/CompositeRequestParser.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/RequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/RequestParser.java 2009-05-20 02:06:47 UTC (rev 2715) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/RequestParser.java 2009-05-20 02:12:57 UTC (rev 2716) @@ -28,6 +28,7 @@ import org.archive.wayback.core.WaybackRequest; import org.archive.wayback.exception.BadQueryException; +import org.archive.wayback.exception.BetterRequestException; import org.archive.wayback.webapp.AccessPoint; /** @@ -47,17 +48,6 @@ * @throws BadQueryException */ public abstract WaybackRequest parse(HttpServletRequest httpRequest, - AccessPoint wbContext) throws BadQueryException; - /** - * @param maxRecords - */ - public void setMaxRecords(int maxRecords); - /** - * @param timestamp - */ - public void setEarliestTimestamp(String timestamp); - /** - * @param timestamp - */ - public void setLatestTimestamp(String timestamp); + AccessPoint wbContext) throws BadQueryException, + BetterRequestException; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java 2009-05-20 02:06:47 UTC (rev 2715) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java 2009-05-20 02:12:57 UTC (rev 2716) @@ -44,13 +44,13 @@ public class ArchivalUrlRequestParser extends CompositeRequestParser { protected RequestParser[] getRequestParsers() { RequestParser[] theParsers = { - new ReplayRequestParser(), - new PathDatePrefixQueryRequestParser(), - new PathDateRangeQueryRequestParser(), - new PathPrefixDatePrefixQueryRequestParser(), - new PathPrefixDateRangeQueryRequestParser(), - new OpenSearchRequestParser(), - new FormRequestParser() + new ReplayRequestParser(this), + new PathDatePrefixQueryRequestParser(this), + new PathDateRangeQueryRequestParser(this), + new PathPrefixDatePrefixQueryRequestParser(this), + new PathPrefixDateRangeQueryRequestParser(this), + new OpenSearchRequestParser(this), + new FormRequestParser(this) }; return theParsers; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixCompositeRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixCompositeRequestParser.java 2009-05-20 02:06:47 UTC (rev 2715) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixCompositeRequestParser.java 2009-05-20 02:12:57 UTC (rev 2716) @@ -36,12 +36,12 @@ * @version $Date$, $Revision$ */ public class DomainPrefixCompositeRequestParser extends CompositeRequestParser { - DomainPrefixRequestParser dprp = new DomainPrefixRequestParser(); + DomainPrefixRequestParser dprp = new DomainPrefixRequestParser(this); protected RequestParser[] getRequestParsers() { RequestParser[] theParsers = { dprp, - new OpenSearchRequestParser(), - new FormRequestParser() + new OpenSearchRequestParser(this), + new FormRequestParser(this) }; return theParsers; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyRequestParser.java 2009-05-20 02:06:47 UTC (rev 2715) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyRequestParser.java 2009-05-20 02:12:57 UTC (rev 2716) @@ -31,6 +31,7 @@ import org.archive.wayback.RequestParser; import org.archive.wayback.core.WaybackRequest; import org.archive.wayback.exception.BadQueryException; +import org.archive.wayback.exception.BetterRequestException; import org.archive.wayback.requestparser.CompositeRequestParser; import org.archive.wayback.requestparser.FormRequestParser; import org.archive.wayback.requestparser.OpenSearchRequestParser; @@ -44,13 +45,13 @@ * @version $Date$, $Revision$ */ public class ProxyRequestParser extends CompositeRequestParser { - private ProxyReplayRequestParser prrp = new ProxyReplayRequestParser(); + private ProxyReplayRequestParser prrp = new ProxyReplayRequestParser(this); protected RequestParser[] getRequestParsers() { prrp.init(); RequestParser[] theParsers = { prrp, - new OpenSearchRequestParser(), - new FormRequestParser() + new OpenSearchRequestParser(this), + new FormRequestParser(this) }; return theParsers; } @@ -61,7 +62,7 @@ prrp.setLocalhostNames(localhostNames); } public WaybackRequest parse(HttpServletRequest httpRequest, - AccessPoint wbContext) throws BadQueryException { + AccessPoint wbContext) throws BadQueryException, BetterRequestException { WaybackRequest wbRequest = super.parse(httpRequest, wbContext); if (wbRequest != null) { Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/CompositeRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/CompositeRequestParser.java 2009-05-20 02:06:47 UTC (rev 2715) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/CompositeRequestParser.java 2009-05-20 02:12:57 UTC (rev 2716) @@ -29,15 +29,19 @@ import org.archive.wayback.RequestParser; import org.archive.wayback.core.WaybackRequest; import org.archive.wayback.exception.BadQueryException; +import org.archive.wayback.exception.BetterRequestException; import org.archive.wayback.webapp.AccessPoint; /** + * Abstract RequestParser implementation. Subclasses must implement + * the getRequestParsers() method. This implementation provides a parse() + * implementation, which allows each RequestParser returned by the + * getRequestParsers() method an attempt at parsing the incoming request. * - * * @author brad * @version $Date$, $Revision$ */ -public class CompositeRequestParser extends BaseRequestParser { +public abstract class CompositeRequestParser extends BaseRequestParser { private RequestParser[] parsers = null; /** @@ -45,31 +49,26 @@ */ public void init() { parsers = getRequestParsers(); - for(int i = 0; i < parsers.length; i++) { - parsers[i].setMaxRecords(maxRecords); - if(earliestTimestamp != null) { - parsers[i].setEarliestTimestamp(earliestTimestamp); - } - if(latestTimestamp != null) { - parsers[i].setLatestTimestamp(latestTimestamp); - } - } } - protected RequestParser[] getRequestParsers() { - RequestParser[] theParsers = { - new OpenSearchRequestParser(), - new FormRequestParser() - }; - return theParsers; - } + protected abstract RequestParser[] getRequestParsers(); +// A basic example implementation method: + +// protected abstract RequestParser[] getRequestParsers() { +// RequestParser[] theParsers = { +// new OpenSearchRequestParser(this), +// new FormRequestParser(this) +// }; +// return theParsers; +// } + /* (non-Javadoc) * @see org.archive.wayback.RequestParser#parse(javax.servlet.http.HttpServletRequest) */ public WaybackRequest parse(HttpServletRequest httpRequest, - AccessPoint wbContext) throws BadQueryException { + AccessPoint wbContext) throws BadQueryException, BetterRequestException { WaybackRequest wbRequest = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2009-06-09 22:48:10
|
Revision: 2736 http://archive-access.svn.sourceforge.net/archive-access/?rev=2736&view=rev Author: bradtofel Date: 2009-06-09 22:48:09 +0000 (Tue, 09 Jun 2009) Log Message: ----------- BUGFIX: Conditional GET SearchResult Annotater was indication duplicate type was due to Digest match. Added support for HTTP-Duplicate to CaptureSearchResult, and now the ConditionalGetAnnotationSearchResultAdapter uses these methods to indicate the correct type of duplicate record. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/ConditionalGetAnnotationSearchResultAdapter.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java 2009-06-09 21:20:22 UTC (rev 2735) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java 2009-06-09 22:48:09 UTC (rev 2736) @@ -203,6 +203,7 @@ public void setClosest(boolean value) { putBoolean(CAPTURE_CLOSEST_INDICATOR,value); } + public void flagDuplicateDigest(Date storedDate) { put(CAPTURE_DUPLICATE_ANNOTATION,CAPTURE_DUPLICATE_DIGEST); put(CAPTURE_DUPLICATE_STORED_TS,dateToTS(storedDate)); @@ -216,19 +217,40 @@ return (dupeType != null && dupeType.equals(CAPTURE_DUPLICATE_DIGEST)); } public Date getDuplicateDigestStoredDate() { - String dupeType = get(CAPTURE_DUPLICATE_ANNOTATION); - Date date = null; - if(dupeType != null && dupeType.equals(CAPTURE_DUPLICATE_DIGEST)) { - date = tsToDate(get(CAPTURE_DUPLICATE_STORED_TS)); + if(isDuplicateDigest()) { + return tsToDate(get(CAPTURE_DUPLICATE_STORED_TS)); } - return date; + return null; } public String getDuplicateDigestStoredTimestamp() { + if(isDuplicateDigest()) { + return get(CAPTURE_DUPLICATE_STORED_TS); + } + return null; + } + + public void flagDuplicateHTTP(Date storedDate) { + put(CAPTURE_DUPLICATE_ANNOTATION,CAPTURE_DUPLICATE_HTTP); + put(CAPTURE_DUPLICATE_STORED_TS,dateToTS(storedDate)); + } + public void flagDuplicateHTTP(String storedTS) { + put(CAPTURE_DUPLICATE_ANNOTATION,CAPTURE_DUPLICATE_HTTP); + put(CAPTURE_DUPLICATE_STORED_TS,storedTS); + } + public boolean isDuplicateHTTP() { String dupeType = get(CAPTURE_DUPLICATE_ANNOTATION); - String ts = null; - if(dupeType != null && dupeType.equals(CAPTURE_DUPLICATE_DIGEST)) { - ts = get(CAPTURE_DUPLICATE_STORED_TS); + return (dupeType != null && dupeType.equals(CAPTURE_DUPLICATE_HTTP)); + } + public Date getDuplicateHTTPStoredDate() { + if(isDuplicateHTTP()) { + return tsToDate(get(CAPTURE_DUPLICATE_STORED_TS)); } - return ts; + return null; } + public String getDuplicateHTTPStoredTimestamp() { + if(isDuplicateHTTP()) { + return get(CAPTURE_DUPLICATE_STORED_TS); + } + return null; + } } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/ConditionalGetAnnotationSearchResultAdapter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/ConditionalGetAnnotationSearchResultAdapter.java 2009-06-09 21:20:22 UTC (rev 2735) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/ConditionalGetAnnotationSearchResultAdapter.java 2009-06-09 22:48:09 UTC (rev 2736) @@ -78,7 +78,7 @@ o.setHttpCode(lastSeen.getHttpCode()); o.setMimeType(lastSeen.getMimeType()); o.setRedirectUrl(lastSeen.getRedirectUrl()); - o.flagDuplicateDigest(lastSeen.getCaptureTimestamp()); + o.flagDuplicateHTTP(lastSeen.getCaptureTimestamp()); return o; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2009-06-11 22:21:12
|
Revision: 2737 http://archive-access.svn.sourceforge.net/archive-access/?rev=2737&view=rev Author: bradtofel Date: 2009-06-11 22:20:54 +0000 (Thu, 11 Jun 2009) Log Message: ----------- TWEAK: changed bad NotImplementedException to UnsupportedOperationException. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBLog.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/CompositeSortedIterator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/PeekableIterator.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBLog.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBLog.java 2009-06-09 22:48:09 UTC (rev 2736) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBLog.java 2009-06-11 22:20:54 UTC (rev 2737) @@ -34,8 +34,6 @@ import org.archive.wayback.util.CloseableIterator; import org.archive.wayback.util.flatfile.RecordIterator; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; - /** * Simple log file tracking new names being added to a ResourceFileLocationDB. * @@ -169,7 +167,7 @@ * @see java.util.Iterator#remove() */ public void remove() { - throw new NotImplementedException(); + throw new UnsupportedOperationException(); } } } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/CompositeSortedIterator.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/CompositeSortedIterator.java 2009-06-09 22:48:09 UTC (rev 2736) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/CompositeSortedIterator.java 2009-06-11 22:20:54 UTC (rev 2737) @@ -31,8 +31,6 @@ import java.util.NoSuchElementException; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; - /** * Composite of multiple Iterators that returns the next from a series of * all component Iterators based on Comparator constructor argument. @@ -100,7 +98,7 @@ * @see java.util.Iterator#remove() */ public void remove() { - throw new NotImplementedException(); + throw new UnsupportedOperationException(); } /* (non-Javadoc) Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/PeekableIterator.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/PeekableIterator.java 2009-06-09 22:48:09 UTC (rev 2736) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/PeekableIterator.java 2009-06-11 22:20:54 UTC (rev 2737) @@ -27,8 +27,6 @@ import java.io.IOException; import java.util.Iterator; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; - /** * * @@ -90,6 +88,6 @@ * @see java.util.Iterator#remove() */ public void remove() { - throw new NotImplementedException(); + throw new UnsupportedOperationException(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2009-10-15 22:32:45
|
Revision: 2806 http://archive-access.svn.sourceforge.net/archive-access/?rev=2806&view=rev Author: bradtofel Date: 2009-10-15 22:32:38 +0000 (Thu, 15 Oct 2009) Log Message: ----------- BUGFIX(ACC-70): No longer explicitly set timezone for entire JVM to GMT, now GMT is specified at Calendar construction. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/resultspartitioner/ResultsPartitioner.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/Timestamp.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/RequestFilter.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/resultspartitioner/ResultsPartitioner.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/resultspartitioner/ResultsPartitioner.java 2009-10-15 22:27:18 UTC (rev 2805) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/resultspartitioner/ResultsPartitioner.java 2009-10-15 22:32:38 UTC (rev 2806) @@ -41,12 +41,7 @@ public abstract class ResultsPartitioner { protected Calendar getCalendar() { - String[] ids = TimeZone.getAvailableIDs(0); - if (ids.length < 1) { - return null; - } - TimeZone gmt = new SimpleTimeZone(0, ids[0]); - return new GregorianCalendar(gmt); + return Calendar.getInstance(TimeZone.getTimeZone("GMT")); } protected Calendar dateStrToCalendar(String dateStr) { Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/Timestamp.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/Timestamp.java 2009-10-15 22:27:18 UTC (rev 2805) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/Timestamp.java 2009-10-15 22:32:38 UTC (rev 2806) @@ -42,7 +42,7 @@ private final static String UPPER_TIMESTAMP_LIMIT = "29991939295959"; private final static String YEAR_LOWER_LIMIT = "1996"; private final static String YEAR_UPPER_LIMIT = - String.valueOf(Calendar.getInstance().get(Calendar.YEAR)); + String.valueOf(Calendar.getInstance(TimeZone.getTimeZone("GMT")).get(Calendar.YEAR)); private final static String MONTH_LOWER_LIMIT = "01"; private final static String MONTH_UPPER_LIMIT = "12"; private final static String DAY_LOWER_LIMIT = "01"; @@ -327,14 +327,14 @@ return finalDigits; } - private static String boundDigits(String input, String min, String max) { - String bounded = input; - if(input.compareTo(min) < 0) { - bounded = min; - } else if(input.compareTo(max) > 0) { - bounded = max; + private static String boundDigits(final String test, final String min, + final String max) { + if(test.compareTo(min) < 0) { + return min; + } else if(test.compareTo(max) > 0) { + return max; } - return bounded; + return test; } // check each of YEAR, MONTH, DAY, HOUR, MINUTE, SECOND to make sure they Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/RequestFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/RequestFilter.java 2009-10-15 22:27:18 UTC (rev 2805) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/RequestFilter.java 2009-10-15 22:32:38 UTC (rev 2806) @@ -60,7 +60,6 @@ public void init(FilterConfig config) throws ServletException { LOGGER.info("Wayback Filter initializing..."); - TimeZone.setDefault(TimeZone.getTimeZone("GMT")); try { mapper = new RequestMapper(config.getServletContext()); } catch (ConfigurationException e) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2009-10-22 23:42:23
|
Revision: 2816 http://archive-access.svn.sourceforge.net/archive-access/?rev=2816&view=rev Author: bradtofel Date: 2009-10-22 23:42:14 +0000 (Thu, 22 Oct 2009) Log Message: ----------- FEATURE: now attempts to dechunkify Chunk-Encoded streams. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/Resource.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ArcResource.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/WarcResource.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/Resource.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/Resource.java 2009-10-22 23:41:35 UTC (rev 2815) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/Resource.java 2009-10-22 23:42:14 UTC (rev 2816) @@ -28,6 +28,8 @@ import java.io.InputStream; import java.util.Map; +import org.apache.commons.httpclient.ChunkedInputStream; + /** * Abstraction on top of a document stored in a WaybackCollection. Currently * implemented subclasses include ArcResource and WarcResource. @@ -58,6 +60,15 @@ } } /** + * indicate that there is a Transfer-Encoding: chunked header, so the input + * data should be dechunked as it is read. + * @throws IOException + */ + public void setChunkedEncoding() throws IOException { + validate(); + is = new ChunkedInputStream(is); + } + /** * @return * @throws IOException * @see java.io.BufferedInputStream#available() Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ArcResource.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ArcResource.java 2009-10-22 23:41:35 UTC (rev 2815) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ArcResource.java 2009-10-22 23:42:14 UTC (rev 2816) @@ -14,6 +14,7 @@ import org.archive.io.arc.ARCReader; import org.archive.io.arc.ARCRecord; import org.archive.wayback.core.Resource; +import org.archive.wayback.replay.HttpHeaderOperation; public class ArcResource extends Resource { /** @@ -78,6 +79,13 @@ String value = headers[i].getValue(); String name = headers[i].getName(); metaData.put(HTTP_HEADER_PREFIX + name,value); + if(name.toUpperCase().contains( + HttpHeaderOperation.HTTP_TRANSFER_ENC_HEADER)) { + if(value.toUpperCase().contains( + HttpHeaderOperation.HTTP_CHUNKED_ENCODING_HEADER)) { + setChunkedEncoding(); + } + } } } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/WarcResource.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/WarcResource.java 2009-10-22 23:41:35 UTC (rev 2815) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/WarcResource.java 2009-10-22 23:42:14 UTC (rev 2816) @@ -13,6 +13,7 @@ import org.archive.io.warc.WARCReader; import org.archive.io.warc.WARCRecord; import org.archive.wayback.core.Resource; +import org.archive.wayback.replay.HttpHeaderOperation; public class WarcResource extends Resource { private WARCRecord rec = null; @@ -66,10 +67,17 @@ Header[] tmpHeaders = HttpParser.parseHeaders(rec, ARCConstants.DEFAULT_ENCODING); headers = new Hashtable<String,String>(); + this.setInputStream(rec); for(Header header: tmpHeaders) { headers.put(header.getName(), header.getValue()); + if(header.getName().toUpperCase().contains( + HttpHeaderOperation.HTTP_TRANSFER_ENC_HEADER)) { + if(header.getValue().toUpperCase().contains( + HttpHeaderOperation.HTTP_CHUNKED_ENCODING_HEADER)) { + setChunkedEncoding(); + } + } } - this.setInputStream(rec); parsedHeaders = true; } 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:17:21
|
Revision: 2911 http://archive-access.svn.sourceforge.net/archive-access/?rev=2911&view=rev Author: bradtofel Date: 2009-11-07 01:17:15 +0000 (Sat, 07 Nov 2009) Log Message: ----------- COMMENT Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResultURIConverter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/UrlCanonicalizer.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResultURIConverter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResultURIConverter.java 2009-11-07 01:10:39 UTC (rev 2910) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResultURIConverter.java 2009-11-07 01:17:15 UTC (rev 2911) @@ -1,4 +1,4 @@ -/* ReplayURI +/* ResultURIConverter * * $Id$ * @@ -25,8 +25,9 @@ package org.archive.wayback; /** + * Interface for implementations that convert a string datespec and URL into + * an absolute URL that will replay the specified URL at the specified date. * - * * @author brad * @version $Date$, $Revision$ */ Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/UrlCanonicalizer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/UrlCanonicalizer.java 2009-11-07 01:10:39 UTC (rev 2910) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/UrlCanonicalizer.java 2009-11-07 01:17:15 UTC (rev 2911) @@ -1,3 +1,27 @@ +/* UrlCanonicalizer + * + * $Id$ + * + * Created on 3:28:47 PM Nov 14, 2005. + * + * Copyright (C) 2005 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback; import org.apache.commons.httpclient.URIException; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2009-11-07 22:49:48
|
Revision: 2912 http://archive-access.svn.sourceforge.net/archive-access/?rev=2912&view=rev Author: bradtofel Date: 2009-11-07 22:49:40 +0000 (Sat, 07 Nov 2009) Log Message: ----------- COMMENT: added missing/fixed file license comment Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlASXReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlCSSReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/ResourceIndexNotAvailableException.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/ResourceNotAvailableException.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/ResourceNotInArchiveException.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/resultspartitioner/TwoMonthTimelineResultsPartitioner.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/XArchiveHttpHeaderProcessor.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/RotatingCharsetDetector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/StandardCharsetDetector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/CDXFormatIndex.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/CDXFormatToSearchResultAdapter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/SearchResultToCDXFormatAdapter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/AccessPointCaptureFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/AccessPointCaptureFilterGroupFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CaptureFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CoreCaptureFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CoreCaptureFilterGroupFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroupFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/FilterGroupFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/QueryCaptureFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/QueryCaptureFilterGroupFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/WindowFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/BeanShellFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/ConditionalGetAnnotationFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/DuplicateRecordFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/FilePrefixFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/FileRegexFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/HttpCodeFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/WARCRevisitAnnotationFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/ArchiveReaderCloseableIterator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/HTTPRecordAnnotater.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/RobotMetaFlags.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/RobotMetaRule.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/WARCRecordToSearchResultAdapter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/WarcIndexer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/FlatFileResourceFileLocationDB.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ArcResource.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/TimeoutArchiveReaderFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/WarcResource.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/IPRange.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/WARCHeader.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/bdb/BDBMap.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/html/SelectHTML.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/AndBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/BinaryBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/BooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/FalseBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/NotBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/OrBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/TrueBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/UnaryBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/Utils.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/url/IdentityUrlCanonicalizer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/url/UrlOperations.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* OracleExclusionFilter + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.accesscontrol.oracleclient; import java.util.Date; @@ -9,6 +33,10 @@ import org.archive.wayback.core.CaptureSearchResult; import org.archive.wayback.util.ObjectFilter; +/** + * @author brad + * + */ public class OracleExclusionFilter implements ObjectFilter<CaptureSearchResult> { AccessControlClient client = null; private String accessGroup = null; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* OracleExclusionFilterFactory + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.accesscontrol.oracleclient; import org.archive.wayback.accesscontrol.ExclusionFilterFactory; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlASXReplayRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlASXReplayRenderer.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlASXReplayRenderer.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* ArchivalUrlASXReplayRenderer + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.archivalurl; import java.io.IOException; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlCSSReplayRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlCSSReplayRenderer.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlCSSReplayRenderer.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* ArchivalUrlCSSReplayRenderer + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.archivalurl; import java.io.IOException; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* AccessControlSettingOperation + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.authenticationcontrol; import org.archive.wayback.accesscontrol.ExclusionFilterFactory; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* HTTPAuthBooleanOperator + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.authenticationcontrol; import java.util.List; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* IPMatchesBooleanOperator + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.authenticationcontrol; import java.util.ArrayList; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/ResourceIndexNotAvailableException.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/ResourceIndexNotAvailableException.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/ResourceIndexNotAvailableException.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* ResourceIndexNotAvailableException + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.exception; import javax.servlet.http.HttpServletResponse; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/ResourceNotAvailableException.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/ResourceNotAvailableException.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/ResourceNotAvailableException.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* ResourceNotAvailableException + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.exception; import javax.servlet.http.HttpServletResponse; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/ResourceNotInArchiveException.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/ResourceNotInArchiveException.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/ResourceNotInArchiveException.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* ResourceNotInArchiveException + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.exception; import java.util.List; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/resultspartitioner/TwoMonthTimelineResultsPartitioner.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/resultspartitioner/TwoMonthTimelineResultsPartitioner.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/resultspartitioner/TwoMonthTimelineResultsPartitioner.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* TwoMonthTimelineResultsPartitioner + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.query.resultspartitioner; import java.util.Calendar; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/XArchiveHttpHeaderProcessor.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/XArchiveHttpHeaderProcessor.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/XArchiveHttpHeaderProcessor.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* XArchiveHttpHeaderProcessor + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.replay; import java.util.Map; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* CharsetDetector + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.replay.charset; import java.io.IOException; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/RotatingCharsetDetector.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/RotatingCharsetDetector.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/RotatingCharsetDetector.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* RotatingCharsetDetector + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.replay.charset; import java.io.IOException; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/StandardCharsetDetector.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/StandardCharsetDetector.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/StandardCharsetDetector.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* StandardCharsetDetector + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.replay.charset; import java.io.IOException; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/CDXFormatIndex.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/CDXFormatIndex.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/CDXFormatIndex.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* CDXFormatIndex + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.cdx; import java.io.BufferedReader; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/CDXFormatToSearchResultAdapter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/CDXFormatToSearchResultAdapter.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/CDXFormatToSearchResultAdapter.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* CDXFormatToSearchResultAdapter + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.cdx; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/SearchResultToCDXFormatAdapter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/SearchResultToCDXFormatAdapter.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/SearchResultToCDXFormatAdapter.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* SearchResultToCDXFormatAdapter + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.cdx; import java.util.Iterator; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/AccessPointCaptureFilterGroup.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/AccessPointCaptureFilterGroup.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/AccessPointCaptureFilterGroup.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* AccessPointCaptureFilterGroup + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filterfactory; import java.util.List; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/AccessPointCaptureFilterGroupFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/AccessPointCaptureFilterGroupFactory.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/AccessPointCaptureFilterGroupFactory.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* AccessPointCaptureFilterGroupFactory + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filterfactory; import org.archive.wayback.UrlCanonicalizer; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CaptureFilterGroup.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CaptureFilterGroup.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CaptureFilterGroup.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* CaptureFilterGroup + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filterfactory; import java.util.List; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CoreCaptureFilterGroup.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CoreCaptureFilterGroup.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CoreCaptureFilterGroup.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* CoreCaptureFilterGroup + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filterfactory; import java.util.List; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CoreCaptureFilterGroupFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CoreCaptureFilterGroupFactory.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CoreCaptureFilterGroupFactory.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* CoreCaptureFilterGroupFactory + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filterfactory; import org.archive.wayback.UrlCanonicalizer; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroup.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroup.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroup.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* ExclusionCaptureFilterGroup + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filterfactory; import java.util.List; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroupFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroupFactory.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroupFactory.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* ExclusionCaptureFilterGroupFactory + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filterfactory; import org.archive.wayback.UrlCanonicalizer; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/FilterGroupFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/FilterGroupFactory.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/FilterGroupFactory.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* FilterGroupFactory + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filterfactory; import org.archive.wayback.UrlCanonicalizer; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/QueryCaptureFilterGroup.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/QueryCaptureFilterGroup.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/QueryCaptureFilterGroup.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* QueryCaptureFilterGroup + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filterfactory; import java.util.ArrayList; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/QueryCaptureFilterGroupFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/QueryCaptureFilterGroupFactory.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/QueryCaptureFilterGroupFactory.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* QueryCaptureFilterGroupFactory + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filterfactory; import org.archive.wayback.UrlCanonicalizer; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/WindowFilterGroup.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/WindowFilterGroup.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/WindowFilterGroup.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* WindowFilterGroup + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filterfactory; import java.util.List; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/BeanShellFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/BeanShellFilter.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/BeanShellFilter.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* BeanShellFilter + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filters; import org.archive.wayback.core.CaptureSearchResult; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/ConditionalGetAnnotationFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/ConditionalGetAnnotationFilter.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/ConditionalGetAnnotationFilter.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* ConditionalGetAnnotationFilter + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filters; import org.archive.wayback.core.CaptureSearchResult; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/DuplicateRecordFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/DuplicateRecordFilter.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/DuplicateRecordFilter.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* DuplicateRecordFilter + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filters; import org.archive.wayback.core.CaptureSearchResult; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/FilePrefixFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/FilePrefixFilter.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/FilePrefixFilter.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* FilePrefixFilter + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with wayback-svn; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ package org.archive.wayback.resourceindex.filters; import org.archive.wayback.core.CaptureSearchResult; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/FileRegexFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/FileRegexFilter.java 2009-11-07 01:17:15 UTC (rev 2911) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/FileRegexFilter.java 2009-11-07 22:49:40 UTC (rev 2912) @@ -1,3 +1,27 @@ +/* FileRegexFilter + * + * $Id$ + * + * Created on Nov 7, 2009. + * + * Copyright (C) 2007 Internet Archive. + * + * This file is part of wayback. + * + * wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either... [truncated message content] |
From: <bra...@us...> - 2009-11-07 22:59:17
|
Revision: 2913 http://archive-access.svn.sourceforge.net/archive-access/?rev=2913&view=rev Author: bradtofel Date: 2009-11-07 22:59:03 +0000 (Sat, 07 Nov 2009) Log Message: ----------- SVN: added svn:keywords and svn:eol-style props Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/ByteOp.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/http/BadRequestException.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/http/HttpRequestMessage.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/http/HttpResponse.java Property Changed: ---------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ExceptionRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ReplayDispatcher.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/RequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/Shutdownable.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/UrlCanonicalizer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/CompositeExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExternalExcluder.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotRules.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlASXReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlCSSReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlContextResultURIConverterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlDateRedirectReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlJSReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlSAXRewriteReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlSpecialContextResultURIConverter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ClientSideHTMLReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ServerSideHTMLReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/PathDatePrefixQueryRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/PathDateRangeQueryRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/PathPrefixDatePrefixQueryRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/PathPrefixDateRangeQueryRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/ReplayRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResults.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/UIResults.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/UrlSearchResult.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/UrlSearchResults.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixCompositeRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixResultURIConverter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixTextReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AnchorWindowTooSmallException.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AnnotationExceptionRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AuthenticationControlException.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BadContentException.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/CustomNotInArchiveExceptionRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/LiveDocumentNotAvailableException.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/ARCCacheDirectory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/LiveWebCache.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/LiveWebLocalResourceIndex.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/URLCacher.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyArchivalRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyHTMLMarkupReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyReplayRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/resultspartitioner/TwoMonthTimelineResultsPartitioner.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/DateRedirectReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/HttpHeaderOperation.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/HttpHeaderProcessor.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/IdentityHttpHeaderProcessor.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/JSPExecutor.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/RedirectRewritingHttpHeaderProcessor.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/ReplayRendererSelector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/SelectorReplayDispatcher.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/StringHttpServletResponseWrapper.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TextDocument.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TextReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TransparentReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/XArchiveHttpHeaderProcessor.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/RotatingCharsetDetector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/StandardCharsetDetector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/ContextResultURIConverterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/ReplayParseContext.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/ReplayParseEventDelegator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/ReplayParseEventDelegatorVisitor.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/StringTransformer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/AfterBodyStartTagJSPExecRule.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/AttributeModifyingRule.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/BeforeBodyEndTagJSPExecRule.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/CommentRule.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/JSContentRule.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/JSPExecRule.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/RawNodeRule.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/StaticStringRule.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/StyleContentRule.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/transformer/BaseCSSStringTransformer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/transformer/BaseHrefStringTransformer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/transformer/BlockCSSStringTransformer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/transformer/IdentityStringTransformer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/transformer/InlineCSSStringTransformer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/transformer/JSStringTransformer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/transformer/URLStringTransformer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/AlwaysMatchSelector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/BaseReplayRendererSelector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/CSSRequestSelector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/DateMismatchSelector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/IMGRequestSelector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/JSRequestSelector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/MimeTypeSelector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/PathMatchSelector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/BaseRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/CompositeRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/OpenSearchRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/PathRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/WrappedRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/UpdatableSearchResultSource.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/adapters/CaptureToUrlSearchResultAdapter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/bdb/SearchResultToBDBRecordAdapter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/CDXFormatIndex.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/CDXFormatToSearchResultAdapter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/SearchResultToCDXFormatAdapter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/SearchResultToCDXLineAdapter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/dynamic/CDXDefinitionFile.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/dynamic/DynamicCDXIndex.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/dynamic/MD5LocationFile.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/dynamic/RangeAssignmentFile.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/CDXField.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/CDXFormat.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/CDXFormatException.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/DigestCDXField.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/EndOffsetCDXField.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/FilenameCDXField.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/HTTPCodeCDXField.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/MIMETypeCDXField.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/OriginalURLCDXField.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/RedirectURLCDXField.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/RobotFlagsCDXField.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/StartOffsetCDXField.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/TimestampCDXField.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/cdx/format/URLKeyCDXField.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/distributed/AlphaPartitionedIndex.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/distributed/RangeGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/distributed/RangeMember.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/AccessPointCaptureFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/AccessPointCaptureFilterGroupFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CaptureFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CoreCaptureFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/CoreCaptureFilterGroupFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroupFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/FilterGroupFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/QueryCaptureFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/QueryCaptureFilterGroupFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/WindowFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/BeanShellFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/CompositeExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/ConditionalGetAnnotationFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/DuplicateRecordFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/FilePrefixFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/FileRegexFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/HttpCodeFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/OracleAnnotationFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/SchemeMatchFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/WARCRevisitAnnotationFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/LocationDBResourceStore.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/ARCRecordToSearchResultAdapter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/ArchiveReaderCloseableIterator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/DirectoryIndexQueue.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/HTTPRecordAnnotater.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/IndexQueue.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/IndexQueueUpdater.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/IndexWorker.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/RobotMetaFlags.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/RobotMetaRule.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/WARCRecordToSearchResultAdapter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/indexer/WarcIndexer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/FlatFileResourceFileLocationDB.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDB.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBUpdater.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ArcResource.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ArcWarcFilenameFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/DirectoryResourceFileSource.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/JspUrlResourceFileSource.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFileList.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFileLocation.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFileSource.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/ResourceFileSourceUpdater.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/TimeoutArchiveReaderFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/UrlLinkExtractor.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/resourcefile/WarcResource.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/ByteOp.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/CachedFile.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/DirMaker.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/FileDownloader.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/IPRange.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/ObjectFilterIterator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/PeekableIterator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/StringFormatter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/WARCHeader.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/WrappedCloseableIterator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/html/SelectHTML.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ContextAwareLexer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/NodeUtils.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ParseContext.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ParseEventDelegator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ParseEventDelegatorVisitor.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/ParseEventHandler.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/handlers/CSSTextHandler.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/handlers/CloseTagHandler.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/handlers/ContentTextHandler.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/handlers/JSTextHandler.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/handlers/OpenTagHandler.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/handlers/ParseCompleteHandler.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/htmllex/handlers/RemarkTextHandler.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/http/BadRequestException.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/http/HttpMessage.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/http/HttpRequest.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/http/HttpRequestMessage.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/http/HttpResponse.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/http/HttpResponseMessage.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/AndBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/BinaryBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/BooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/FalseBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/NotBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/OrBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/TrueBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/UnaryBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/operator/Utils.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/url/IdentityUrlCanonicalizer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/url/UrlOperations.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/RequestContext.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/RequestFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/RequestMapper.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/ServletRequestContext.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/WaybackCollection.java Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ExceptionRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ReplayDispatcher.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/RequestParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/Shutdownable.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/UrlCanonicalizer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/CompositeExclusionFilterFactory.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExclusionFilterFactory.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExternalExcluder.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilter.java 2009-11-07 22:49:40 UTC (rev 2912) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilter.java 2009-11-07 22:59:03 UTC (rev 2913) @@ -1,6 +1,6 @@ /* EclusionFilter * - * $Id: ExclusionFilter.java 1276 2006-10-17 22:21:15Z bradtofel $ + * $Id$ * * Created on 3:30:05 PM Aug 17, 2006. * @@ -40,7 +40,7 @@ * filter results. * * @author brad - * @version $Date: 2006-10-17 15:21:15 -0700 (Tue, 17 Oct 2006) $, $Revision: 1276 $ + * @version $Date$, $Revision$ */ public class RemoteExclusionFilter implements ObjectFilter<CaptureSearchResult> { private static final Logger LOGGER = Logger.getLogger(RemoteExclusionFilter.class Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilter.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilterFactory.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilterFactory.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotRules.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilter.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilterFactory.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlASXReplayRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlCSSReplayRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlContextResultURIConverterFactory.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlDateRedirectReplayRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlJSReplayRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlSAXRewriteReplayRenderer.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlSpecialContextResultURIConverter.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ClientSideHTMLReplayRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ServerSideHTMLReplayRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/PathDatePrefixQueryRequestParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/PathDateRangeQueryRequestParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/PathPrefixDatePrefixQueryRequestParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/PathPrefixDateRangeQueryRequestParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/ReplayRequestParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResults.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/UIResults.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/UrlSearchResult.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/UrlSearchResults.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixCompositeRequestParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixRequestParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixResultURIConverter.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/domainprefix/DomainPrefixTextReplayRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AnchorWindowTooSmallException.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AnnotationExceptionRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AuthenticationControlException.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BadContentException.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/BaseExceptionRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/CustomNotInArchiveExceptionRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/LiveDocumentNotAvailableException.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/ARCCacheDirectory.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/LiveWebCache.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/LiveWebLocalResourceIndex.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/URLCacher.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyArchivalRequestParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyHTMLMarkupReplayRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyReplayRequestParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/proxy/ProxyRequestParser.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/query/resultspartitioner/TwoMonthTimelineResultsPartitioner.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/DateRedirectReplayRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/HttpHeaderOperation.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/HttpHeaderProcessor.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/IdentityHttpHeaderProcessor.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/JSPExecutor.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/RedirectRewritingHttpHeaderProcessor.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/ReplayRendererSelector.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/SelectorReplayDispatcher.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/StringHttpServletResponseWrapper.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TextDocument.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TextReplayRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/TransparentReplayRenderer.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/XArchiveHttpHeaderProcessor.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/CharsetDetector.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/RotatingCharsetDetector.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/charset/StandardCharsetDetector.java ___________________________________________________________________ Added: svn:keywords + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/ContextResultURIConverterFactory.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/ReplayParseContext.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/ReplayParseEventDelegator.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/ReplayParseEventDelegatorVisitor.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/StringTransformer.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/AfterBodyStartTagJSPExecRule.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/AttributeModifyingRule.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/BeforeBodyEndTagJSPExecRule.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/CommentRule.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/JSContentRule.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/JSPExecRule.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/RawNodeRule.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/StaticStringRule.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/StyleContentRule.java ___________________________________________________________________ Modified: svn:keywords - Author Date Revision Id + Author Date Id Revision Added: svn:eol-style + native Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/tran... [truncated message content] |
From: <bra...@us...> - 2009-11-08 01:33:46
|
Revision: 2917 http://archive-access.svn.sourceforge.net/archive-access/?rev=2917&view=rev Author: bradtofel Date: 2009-11-08 01:33:37 +0000 (Sun, 08 Nov 2009) Log Message: ----------- JAVADOC: updated javadoc for public methods Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ExceptionRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/QueryRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ReplayDispatcher.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/RequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResourceIndex.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResourceStore.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResultURIConverter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/Shutdownable.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/UrlCanonicalizer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExternalExcluder.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotRules.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilterFactory.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ExceptionRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ExceptionRenderer.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ExceptionRenderer.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -45,12 +45,13 @@ * css format, depending on the guessed context, so errors in embedded * documents do not cause unneeded errors in the embedding document. * - * @param httpRequest - * @param httpResponse - * @param wbRequest - * @param exception - * @throws ServletException - * @throws IOException + * @param httpRequest from Servlet handling + * @param httpResponse from Servlet handling + * @param wbRequest as parsed by RequestParser + * @param exception specific WaybackException subclass thrown + * @param uriConverter for the AccessPoint handling the request + * @throws ServletException per usual + * @throws IOException per usual */ public void renderException(HttpServletRequest httpRequest, HttpServletResponse httpResponse, WaybackRequest wbRequest, Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/QueryRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/QueryRenderer.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/QueryRenderer.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -42,7 +42,8 @@ */ public interface QueryRenderer { - /** Show the SearchResults of the request for this particular URL + /** + * Display matching SearchResults for the WaybackRequest to the user. * * @param httpRequest the HttpServletRequest * @param httpResponse the HttpServletResponse @@ -50,8 +51,8 @@ * @param results the SearchResults that the WaybackRequest matched * @param uriConverter the URI converter to use to translate matching * results into replayable URLs - * @throws ServletException - * @throws IOException + * @throws ServletException per usual + * @throws IOException per usual */ public void renderCaptureResults(HttpServletRequest httpRequest, HttpServletResponse httpResponse, WaybackRequest wbRequest, @@ -67,8 +68,8 @@ * @param results the SearchResults that the WaybackRequest matched * @param uriConverter the URI converter to use to translate matching * results into replayable URLs - * @throws ServletException - * @throws IOException + * @throws ServletException per usual + * @throws IOException per usual */ public void renderUrlResults(HttpServletRequest httpRequest, HttpServletResponse response, WaybackRequest wbRequest, Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ReplayDispatcher.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ReplayDispatcher.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ReplayDispatcher.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -29,8 +29,9 @@ import org.archive.wayback.core.WaybackRequest; /** + * Locate and return a ReplayRenderer appropriate for the users request + * (accept header, for example) and the resulting Resource. * - * * @author brad * @version $Date$, $Revision$ */ @@ -39,10 +40,13 @@ * * Return a ReplayRenderer appropriate for the Resource. * - * @param wbRequest - * @param result - * @param resource - * @return the correct ReplayRenderer for the Resource + * @param wbRequest WaybackRequest being handled. + * @param result CapturSearchResult from the ResourceIndex which is + * being returned. + * @param resource Resource as returned by ResourceStore which should + * be returned to the user. + * @return an appropriate ReplayRenderer for the Resource, given the request + * context */ public ReplayRenderer getRenderer(WaybackRequest wbRequest, CaptureSearchResult result, Resource resource); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ReplayRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ReplayRenderer.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ReplayRenderer.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -57,9 +57,10 @@ * @param results all CaptureSearchResults that were returned from the * ResourceIndex, probably including other capture * dates of the same URL. - * @throws ServletException - * @throws IOException - * @throws WaybackException + * @throws ServletException per usual + * @throws IOException per usual + * @throws WaybackException if Wayback data specific, anticipated exceptions + * occur */ public void renderResource(HttpServletRequest httpRequest, HttpServletResponse httpResponse, WaybackRequest wbRequest, Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/RequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/RequestParser.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/RequestParser.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -42,12 +42,15 @@ * attempt to transform an incoming HttpServletRequest into a * WaybackRequest object. returns null if there is missing information. * - * @param httpRequest - * @param wbContext + * @param httpRequest ServletHttpRequest being handled + * @param accessPoint AccessPoint which is attempting to parse the request * @return populated WaybackRequest object if successful, null otherwise. - * @throws BadQueryException - */ + * @throws BadQueryException if the request could match this AccessPoint, + * but is malformed: invalid datespec, URL, or flags + * @throws BetterRequestException if the request should be redirected to + * provide better user feedback (corrected URL/date in address bar) + */ public abstract WaybackRequest parse(HttpServletRequest httpRequest, - AccessPoint wbContext) throws BadQueryException, + AccessPoint accessPoint) throws BadQueryException, BetterRequestException; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResourceIndex.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResourceIndex.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResourceIndex.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -33,28 +33,37 @@ import org.archive.wayback.exception.ResourceNotInArchiveException; /** - * Transforms a WMRequest into a ResourceResults. + * Transforms a WaybackRequest into a ResourceResults. * * @author Brad Tofel * @version $Date$, $Revision$ */ public interface ResourceIndex { /** - * Transform a WMRequest into a ResourceResults. + * Transform a WaybackRequest into a ResourceResults. * - * @param request - * @return ResourceResults containing ResourceResult objects matching the - * WMRequest + * @param request WaybackRequest object from RequestParser + * @return SearchResults containing SearchResult objects matching the + * WaybackRequest * - * @throws ResourceIndexNotAvailableException - * @throws ResourceNotInArchiveException - * @throws BadQueryException - * @throws AccessControlException + * @throws ResourceIndexNotAvailableException if the ResourceIndex + * is not available (remote host down, local files missing, etc) + * @throws ResourceNotInArchiveException if the ResourceIndex could be + * contacted, but no SearchResult objects matched the request + * @throws BadQueryException if the WaybackRequest is lacking information + * required to make a reasonable search of this ResourceIndex + * @throws AccessControlException if SearchResult objects actually matched, + * but could not be returned due to AccessControl restrictions + * (robots.txt documents, Administrative URL blocks, etc) */ public SearchResults query(final WaybackRequest request) throws ResourceIndexNotAvailableException, ResourceNotInArchiveException, BadQueryException, AccessControlException; + /** + * Release any resources used by this ResourceIndex cleanly + * @throws IOException for usual causes + */ public void shutdown() throws IOException; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResourceStore.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResourceStore.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResourceStore.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -30,21 +30,26 @@ import org.archive.wayback.exception.ResourceNotAvailableException; /** - * Transforms a SearchResult into a Resource. + * Transforms a CaptureSearchResult into a Resource. * * @author Brad Tofel * @version $Date$, $Revision$ */ public interface ResourceStore { /** - * Transform a SearchResult into a Resource + * Transform a CaptureSearchResult into a Resource * - * @param result + * @param result CaptureSearchResult which should be retrieved * @return Resource object retrieved for the SearchResult - * @throws ResourceNotAvailableException + * @throws ResourceNotAvailableException if the resource was unavailable + * (down host, corrupted files, etc) */ public Resource retrieveResource(CaptureSearchResult result) throws ResourceNotAvailableException; + /** + * Release any resources used by this ResourceIndex cleanly + * @throws IOException for usual causes + */ public void shutdown() throws IOException; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResultURIConverter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResultURIConverter.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/ResultURIConverter.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -35,8 +35,8 @@ /** * return an absolute URL that will replay URL url at time datespec. * - * @param datespec - * @param url + * @param datespec 14-digit timestamp for the desired Resource + * @param url for the desired Resource * @return absolute replay URL */ public String makeReplayURI(final String datespec, final String url); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/Shutdownable.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/Shutdownable.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/Shutdownable.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -33,5 +33,9 @@ * @version $Date$, $Revision$ */ public interface Shutdownable { + /** + * Release any resources used by this ResourceIndex cleanly + * @throws IOException for usual causes + */ public void shutdown() throws IOException; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/UrlCanonicalizer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/UrlCanonicalizer.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/UrlCanonicalizer.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -26,6 +26,20 @@ import org.apache.commons.httpclient.URIException; +/** + * Interface for implementations that transform an input String URL into a + * canonical form, suitable for lookups in a ResourceIndex. URLs should be sent + * through the same canonicalizer they will be searched using, before being + * inserted into a ResourceIndex. + * @author brad + * + */ public interface UrlCanonicalizer { + /** + * @param url String representation of an URL, in as original, and + * unchanged form as possible. + * @return a lookup key appropriate for searching within a ResourceIndex. + * @throws URIException if the input url String is not a valid URL. + */ public String urlStringToKey(String url) throws URIException; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExternalExcluder.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExternalExcluder.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExternalExcluder.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -45,14 +45,14 @@ private ObjectFilter<CaptureSearchResult> filter = null; private final static String CONFIG_ID = "excluder-factory"; /** - * @param filter + * @param filter ObjectFilter responsible for excluding content */ public ExternalExcluder(ObjectFilter<CaptureSearchResult> filter) { this.filter = filter; } /** - * @param urlString - * @param timestamp + * @param urlString String URL that should be checked for blocking. + * @param timestamp String 14-digit timestamp to check for blocking. * @return true if the url-timestamp should not be shown to end users */ public boolean isExcluded(String urlString, String timestamp) { @@ -64,6 +64,7 @@ int ruling = filter.filterObject(sr); return (ruling != ObjectFilter.FILTER_INCLUDE); } + private static synchronized ExclusionFilterFactory getFactory(String configPath) { if(factory != null) { @@ -76,13 +77,17 @@ } /** - * @param configPath + * @param configPath String path to local Sprint XML configuration. This + * Spring config file must include a bean with id "excluder-factory" + * that implements + * org.archive.wayback.accesscontrol.ExclusionFilterFactory * @return an excluder fully configured via the XML Spring configuration * at configPath */ public static ExternalExcluder getExcluder(String configPath) { return new ExternalExcluder(getFactory(configPath).get()); } + /** * shutdown underlying resources. */ Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -46,6 +46,10 @@ private final static String POLICY_ROBOT = "robots"; + /** + * @param oracleUrl String URL prefix for the Oracle HTTP server + * @param accessGroup String group to use with requests to the Oracle + */ public OracleExclusionFilter(String oracleUrl, String accessGroup) { client = new AccessControlClient(oracleUrl); this.accessGroup = accessGroup; @@ -76,10 +80,8 @@ } } } catch (RobotsUnavailableException e) { - // TODO Auto-generated catch block e.printStackTrace(); } catch (RuleOracleUnavailableException e) { - // TODO Auto-generated catch block e.printStackTrace(); } return FILTER_EXCLUDE; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -28,6 +28,12 @@ import org.archive.wayback.core.CaptureSearchResult; import org.archive.wayback.util.ObjectFilter; +/** + * ExclusionFilterFactory implementation which connects to an Exclusion Oracle + * via HTTP to determine which SearchResults can be exposed + * @author brad + * + */ public class OracleExclusionFilterFactory implements ExclusionFilterFactory { private String oracleUrl = null; @@ -43,18 +49,30 @@ // no-op... yet.. } + /** + * @return String URL where Oracle HTTP server is located + */ public String getOracleUrl() { return oracleUrl; } + /** + * @param oracleUrl String URL where Oracle HTTP server is located + */ public void setOracleUrl(String oracleUrl) { this.oracleUrl = oracleUrl; } + /** + * @return String group to use with requests to the Oracle + */ public String getAccessGroup() { return accessGroup; } + /** + * @param accessGroup String group to use with requests to the Oracle + */ public void setAccessGroup(String accessGroup) { this.accessGroup = accessGroup; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -42,8 +42,9 @@ import org.archive.wayback.util.ObjectFilter; /** - * CaptureSearchResult Filter that uses a LiveWebCache to retrieve robots.txt documents - * from the live web, and filters SearchResults based on the rules therein. + * CaptureSearchResult Filter that uses a LiveWebCache to retrieve robots.txt + * documents from the live web, and filters SearchResults based on the rules + * therein. * * This class caches parsed RobotRules that are retrieved, so using the same * instance to filter multiple SearchResults from the same host will be more @@ -75,9 +76,10 @@ * robots.txt documents. filtering is based on userAgent, and cached * documents newer than maxCacheMS in the webCache are considered valid. * - * @param webCache - * @param userAgent - * @param maxCacheMS + * @param webCache LiveWebCache from which documents can be retrieved + * @param userAgent String user agent to use for requests to the live web. + * @param maxCacheMS long number of milliseconds to cache documents in the + * LiveWebCache */ public RobotExclusionFilter(LiveWebCache webCache, String userAgent, long maxCacheMS) { Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotRules.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotRules.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotRules.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -79,8 +79,8 @@ * Read rules from InputStream argument into this RobotRules, as a * side-effect, sets the bSyntaxErrors property. * - * @param is - * @throws IOException + * @param is InputStream containing the robots.txt document + * @throws IOException for usual reasons */ public void parse(InputStream is) throws IOException { @@ -161,8 +161,8 @@ * Checks first the specified ua UserAgent, if rules are present for it, * and then falls back to using rules for the '*' UserAgent. * - * @param path - * @param ua + * @param path String server relative path to check for access + * @param ua String user agent to check for access * @return boolean value where true indicates the path is blocked for ua */ public boolean blocksPathForUA(String path, String ua) { Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilter.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilter.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -47,7 +47,7 @@ private boolean lastCheckedExcluded = false; Map<String,Object> exclusionMap = null; /** - * @param map + * @param map where each String key is a SURT that is blocked. */ public StaticMapExclusionFilter(Map<String,Object> map) { exclusionMap = map; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilterFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilterFactory.java 2009-11-08 00:45:14 UTC (rev 2916) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilterFactory.java 2009-11-08 01:33:37 UTC (rev 2917) @@ -60,7 +60,7 @@ /** * load exclusion file and startup polling thread to check for updates - * @throws IOException + * @throws IOException if the exclusion file could not be read. */ public void init() throws IOException { reloadFile(); @@ -105,8 +105,8 @@ } /** - * @param wbRequest - * @return SearchResultFilter + * @return ObjectFilter which blocks CaptureSearchResults in the + * exclusion file. */ public ObjectFilter<CaptureSearchResult> get() { if(currentMap == null) { @@ -138,8 +138,8 @@ private int runInterval; /** - * @param service - * @param runInterval + * @param service ExclusionFactory which will be reloaded + * @param runInterval int number of seconds between reloads */ public CacheUpdaterThread(StaticMapExclusionFilterFactory service, int runInterval) { super("CacheUpdaterThread"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2009-11-08 02:11:04
|
Revision: 2919 http://archive-access.svn.sourceforge.net/archive-access/?rev=2919&view=rev Author: bradtofel Date: 2009-11-08 02:10:48 +0000 (Sun, 08 Nov 2009) Log Message: ----------- JAVADOC: updated javadoc for public methods Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java 2009-11-08 01:59:29 UTC (rev 2918) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/AccessControlSettingOperation.java 2009-11-08 02:10:48 UTC (rev 2919) @@ -28,6 +28,13 @@ import org.archive.wayback.core.WaybackRequest; import org.archive.wayback.util.operator.BooleanOperator; +/** + * BooleanOperator which tests a delegate operator, and sets an + * ExclusionFilterFactory on the WaybackRequest if the delegate is true. + * + * @author brad + * + */ public class AccessControlSettingOperation implements BooleanOperator<WaybackRequest> { private ExclusionFilterFactory factory = null; @@ -40,18 +47,33 @@ return true; } + /** + * @return ExclusionFilterFactory which will be set on operator matches + */ public ExclusionFilterFactory getFactory() { return factory; } + /** + * @param factory ExclusionFilterFactory which will be set on operator + * matches + */ public void setFactory(ExclusionFilterFactory factory) { this.factory = factory; } + /** + * @return the BooleanOperator delegate which determines if the factory + * is applied + */ public BooleanOperator<WaybackRequest> getOperator() { return operator; } + /** + * @param operator the BooleanOperator delegate which determines if the + * factory is applied + */ public void setOperator(BooleanOperator<WaybackRequest> operator) { this.operator = operator; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java 2009-11-08 01:59:29 UTC (rev 2918) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/HTTPAuthBooleanOperator.java 2009-11-08 02:10:48 UTC (rev 2919) @@ -29,6 +29,12 @@ import org.archive.wayback.core.WaybackRequest; import org.archive.wayback.util.operator.BooleanOperator; +/** + * BooleanOperator which returns true if the user has authenticated as one of + * a list of users with this server. + * @author brad + * + */ public class HTTPAuthBooleanOperator implements BooleanOperator<WaybackRequest> { private List<String> allowedUsers = null; public boolean isTrue(WaybackRequest value) { @@ -41,9 +47,15 @@ } return allowedUsers.contains(currentUser); } + /** + * @return the List of users that this operator matches against. + */ public List<String> getAllowedUsers() { return allowedUsers; } + /** + * @param allowedUsers the List of users that this operator matches against. + */ public void setAllowedUsers(List<String> allowedUsers) { this.allowedUsers = allowedUsers; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java 2009-11-08 01:59:29 UTC (rev 2918) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/authenticationcontrol/IPMatchesBooleanOperator.java 2009-11-08 02:10:48 UTC (rev 2919) @@ -32,15 +32,29 @@ import org.archive.wayback.util.IPRange; import org.archive.wayback.util.operator.BooleanOperator; +/** + * A BooleanOperator which results in true value if a users request originated + * from within a list of configured IP ranges. + * @author brad + * + */ public class IPMatchesBooleanOperator implements BooleanOperator<WaybackRequest> { private static final Logger LOGGER = Logger.getLogger(IPMatchesBooleanOperator .class.getName()); private List<IPRange> allowedRanges = null; + /** + * @return null. this is a placeholder for Spring's getter/setter + * examination + */ public List<String> getAllowedRanges() { return null; } + /** + * @param allowedRanges parses each String IPRange provided, added them to + * the list of IPRanges which this operator matches + */ public void setAllowedRanges(List<String> allowedRanges) { this.allowedRanges = new ArrayList<IPRange>(); for(String ip : allowedRanges) { Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java 2009-11-08 01:59:29 UTC (rev 2918) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/CaptureSearchResult.java 2009-11-08 02:10:48 UTC (rev 2919) @@ -100,7 +100,7 @@ * <li>"A" - noarchive</li> * <li>"F" - nofollow</li> * <li>"I" - noindex</li> - * @see http://noarchive.net/ + * @see "http://noarchive.net/" */ public static final String CAPTURE_ROBOT_FLAGS = "robotflags"; @@ -142,6 +142,11 @@ * If-Modified HTTP request headers. */ public static final String CAPTURE_DUPLICATE_HTTP = "http"; + /** + * @return the original URL which resulted in the capture. If it is not + * available, the urlKey and original Host will be used to reconstruct + * something possibly closer to the original URL than the urlKey + */ public String getOriginalUrl() { String url = get(CAPTURE_ORIGINAL_URL); if(url == null) { @@ -160,6 +165,10 @@ } return url; } + /** + * @param originalUrl as close to the original URL by which this Resource + * was captured as is possible + */ public void setOriginalUrl(String originalUrl) { put(CAPTURE_ORIGINAL_URL,originalUrl); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2009-12-01 23:19:29
|
Revision: 2934 http://archive-access.svn.sourceforge.net/archive-access/?rev=2934&view=rev Author: bradtofel Date: 2009-12-01 23:19:20 +0000 (Tue, 01 Dec 2009) Log Message: ----------- IOException(Exception) constructor not available in java 5. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlSAXRewriteReplayRenderer.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/AfterBodyStartTagJSPExecRule.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/BeforeBodyEndTagJSPExecRule.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlSAXRewriteReplayRenderer.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlSAXRewriteReplayRenderer.java 2009-12-01 20:54:41 UTC (rev 2933) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlSAXRewriteReplayRenderer.java 2009-12-01 23:19:20 UTC (rev 2934) @@ -100,7 +100,8 @@ url = new URL(result.getOriginalUrl()); } catch (MalformedURLException e1) { // TODO: this shouldn't happen... - throw new IOException(e1); + e1.printStackTrace(); + throw new IOException(e1.getMessage()); } // To make sure we get the length, we have to buffer it all up... @@ -132,7 +133,7 @@ delegator.handleParseComplete(context); } catch (ParserException e) { e.printStackTrace(); - throw new IOException(e); + throw new IOException(e.getMessage()); } // At this point, baos contains the utf-8 encoded bytes of our result: Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/AfterBodyStartTagJSPExecRule.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/AfterBodyStartTagJSPExecRule.java 2009-12-01 20:54:41 UTC (rev 2933) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/AfterBodyStartTagJSPExecRule.java 2009-12-01 23:19:20 UTC (rev 2934) @@ -79,7 +79,8 @@ try { super.emit(context, node); } catch (ServletException e) { - throw new IOException(e); + e.printStackTrace(); + throw new IOException(e.getMessage()); } } } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/BeforeBodyEndTagJSPExecRule.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/BeforeBodyEndTagJSPExecRule.java 2009-12-01 20:54:41 UTC (rev 2933) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/BeforeBodyEndTagJSPExecRule.java 2009-12-01 23:19:20 UTC (rev 2934) @@ -54,7 +54,8 @@ try { super.emit(context, node); } catch (ServletException e) { - throw new IOException(e); + e.printStackTrace(); + throw new IOException(e.getMessage()); } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-01-12 22:27:24
|
Revision: 2945 http://archive-access.svn.sourceforge.net/archive-access/?rev=2945&view=rev Author: bradtofel Date: 2010-01-12 22:27:18 +0000 (Tue, 12 Jan 2010) Log Message: ----------- FEATURE: Added identity flag to incoming requests - the intention being to allow clients to explicitly request a raw copy of archived docs. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/ReplayRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/IdentityRequestSelector.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java 2010-01-12 22:24:04 UTC (rev 2944) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/ArchivalUrlRequestParser.java 2010-01-12 22:27:18 UTC (rev 2945) @@ -59,6 +59,10 @@ */ public final static String IMG_CONTEXT = "im"; /** + * raw/identity context + */ + public final static String IDENTITY_CONTEXT = "id"; + /** * Charset detection strategy context - should be followed by an integer * indicating which strategy to use */ Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/ReplayRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/ReplayRequestParser.java 2010-01-12 22:24:04 UTC (rev 2944) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/requestparser/ReplayRequestParser.java 2010-01-12 22:27:18 UTC (rev 2945) @@ -124,6 +124,8 @@ wbRequest.setJSContext(true); } else if(flag.equals(ArchivalUrlRequestParser.IMG_CONTEXT)) { wbRequest.setIMGContext(true); + } else if(flag.equals(ArchivalUrlRequestParser.IDENTITY_CONTEXT)) { + wbRequest.setIdentityContext(true); } else if(flag.startsWith(ArchivalUrlRequestParser.CHARSET_MODE)) { String modeString = flag.substring( ArchivalUrlRequestParser.CHARSET_MODE.length()); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java 2010-01-12 22:24:04 UTC (rev 2944) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java 2010-01-12 22:27:18 UTC (rev 2945) @@ -262,6 +262,12 @@ public static final String REQUEST_IMAGE_CONTEXT = "imagecontext"; /** + * Request: Identity context requested (totally transparent) + */ + public static final String REQUEST_IDENTITY_CONTEXT = "identitycontext"; + + + /** * Request: Charset detection mode */ public static final String REQUEST_CHARSET_MODE = "charsetmode"; @@ -488,6 +494,7 @@ this.exclusionFilter = exclusionFilter; } + @Deprecated public ObjectFilter<CaptureSearchResult> getResultFilters() { ObjectFilterChain<CaptureSearchResult> tmpFilters = new ObjectFilterChain<CaptureSearchResult>(); @@ -772,6 +779,13 @@ return getBoolean(REQUEST_IMAGE_CONTEXT); } + public void setIdentityContext(boolean isIdentityContext) { + setBoolean(REQUEST_IDENTITY_CONTEXT,isIdentityContext); + } + public boolean isIdentityContext() { + return getBoolean(REQUEST_IDENTITY_CONTEXT); + } + public void setCharsetMode(int mode) { setInt(REQUEST_CHARSET_MODE,mode); } Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/IdentityRequestSelector.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/IdentityRequestSelector.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/IdentityRequestSelector.java 2010-01-12 22:27:18 UTC (rev 2945) @@ -0,0 +1,48 @@ +/* IdentityRequestSelector + * + * $Id$: + * + * Created on Dec 17, 2009. + * + * Copyright (C) 2006 Internet Archive. + * + * This file is part of Wayback. + * + * Wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * Wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with Wayback; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package org.archive.wayback.replay.selector; + +import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.core.Resource; +import org.archive.wayback.core.WaybackRequest; + +/** + * @author brad + * + */ +public class IdentityRequestSelector extends BaseReplayRendererSelector { + + /* (non-Javadoc) + * @see org.archive.wayback.replay.selector.BaseReplayRendererSelector#canHandle(org.archive.wayback.core.WaybackRequest, org.archive.wayback.core.CaptureSearchResult, org.archive.wayback.core.Resource) + */ + @Override + public boolean canHandle(WaybackRequest wbRequest, + CaptureSearchResult result, Resource resource) { + return wbRequest.isIdentityContext(); + } + + +} Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/IdentityRequestSelector.java ___________________________________________________________________ Added: svn:keywords + Author Date Revision Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-03-26 03:22:11
|
Revision: 3006 http://archive-access.svn.sourceforge.net/archive-access/?rev=3006&view=rev Author: bradtofel Date: 2010-03-26 03:22:05 +0000 (Fri, 26 Mar 2010) Log Message: ----------- FEATURE: Added new subclasses of AccessControlException, Robot and Administrative... Required defining the new abstract ExclusionFilter, which is aware of the ExclusionFilterGroup, so it can aprise the filtergroup of blocked and passed robots and admin filtering. All Exclusion-related Filters now have to extend the ExclusionFilter.. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/CompositeExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilter.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilterFactory.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/WindowFilterGroup.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/CompositeExclusionFilter.java Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AdminstrativeAccessControlException.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/RobotAccessControlException.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/ExclusionFilter.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/CompositeExclusionFilterFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/CompositeExclusionFilterFactory.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/CompositeExclusionFilterFactory.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -29,6 +29,7 @@ import org.archive.wayback.core.CaptureSearchResult; import org.archive.wayback.resourceindex.filters.CompositeExclusionFilter; +import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.util.ObjectFilter; /** @@ -54,7 +55,7 @@ /* (non-Javadoc) * @see org.archive.wayback.resourceindex.ExclusionFilterFactory#get() */ - public ObjectFilter<CaptureSearchResult> get() { + public ExclusionFilter get() { Iterator<ExclusionFilterFactory> itr = factories.iterator(); CompositeExclusionFilter filter = new CompositeExclusionFilter(); while(itr.hasNext()) { Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExclusionFilterFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExclusionFilterFactory.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/ExclusionFilterFactory.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -25,6 +25,7 @@ package org.archive.wayback.accesscontrol; import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.util.ObjectFilter; /** * @@ -37,7 +38,7 @@ * @return an ObjectFilter object that filters records based on * some set of exclusion rules */ - public ObjectFilter<CaptureSearchResult> get(); + public ExclusionFilter get(); /** * close any resources used by this ExclusionFilter system. */ Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilter.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -31,21 +31,25 @@ import org.archive.accesscontrol.RuleOracleUnavailableException; import org.archive.util.ArchiveUtils; import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.util.ObjectFilter; /** * @author brad * */ -public class OracleExclusionFilter implements ObjectFilter<CaptureSearchResult> { +public class OracleExclusionFilter extends ExclusionFilter { AccessControlClient client = null; private String accessGroup = null; private final static String POLICY_ALLOW = "allow"; private final static String POLICY_BLOCK = "block"; private final static String POLICY_ROBOT = "robots"; + private boolean notifiedRobotSeen = false; + private boolean notifiedRobotPassed = false; + private boolean notifiedAdminSeen = false; + private boolean notifiedAdminPassed = false; - /** * @param oracleUrl String URL prefix for the Oracle HTTP server * @param accessGroup String group to use with requests to the Oracle @@ -84,12 +88,32 @@ accessGroup); if(policy != null) { if(policy.equals(POLICY_ALLOW)) { + if(!notifiedAdminSeen) { + notifiedAdminSeen = true; + filterGroup.setSawAdministrative(); + } + if(!notifiedAdminPassed) { + notifiedAdminPassed = true; + filterGroup.setPassedAdministrative(); + } return FILTER_INCLUDE; } else if(policy.equals(POLICY_BLOCK)) { + if(!notifiedAdminSeen) { + notifiedAdminSeen = true; + filterGroup.setSawAdministrative(); + } return FILTER_EXCLUDE; } else if(policy.equals(POLICY_ROBOT)) { + if(!notifiedRobotSeen) { + notifiedRobotSeen = true; + filterGroup.setSawRobots(); + } return FILTER_INCLUDE; // if(robotFilter != null) { +// if(!notifiedRobotPassed) { +// notifiedRobotPassed = true; +// filterGroup.setPassedRobot(); +// } // return robotFilter.filterObject(o); // } else { // return FILTER_EXCLUDE; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/oracleclient/OracleExclusionFilterFactory.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -26,6 +26,7 @@ import org.archive.wayback.accesscontrol.ExclusionFilterFactory; import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.util.ObjectFilter; /** @@ -40,7 +41,7 @@ private String accessGroup = null; private String proxyHostPort = null; - public ObjectFilter<CaptureSearchResult> get() { + public ExclusionFilter get() { OracleExclusionFilter filter = new OracleExclusionFilter(oracleUrl, accessGroup, proxyHostPort); return filter; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilter.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilter.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -33,7 +33,7 @@ import org.apache.log4j.Logger; import org.archive.wayback.core.CaptureSearchResult; -import org.archive.wayback.util.ObjectFilter; +import org.archive.wayback.resourceindex.filters.ExclusionFilter; /** * SearchResultFilter which uses remote access control/exclusion service to @@ -43,7 +43,7 @@ * @author brad * @version $Date$, $Revision$ */ -public class RemoteExclusionFilter implements ObjectFilter<CaptureSearchResult> { +public class RemoteExclusionFilter extends ExclusionFilter { private static final Logger LOGGER = Logger.getLogger(RemoteExclusionFilter.class .getName()); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilterFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilterFactory.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/remote/RemoteExclusionFilterFactory.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -26,6 +26,7 @@ import org.archive.wayback.accesscontrol.ExclusionFilterFactory; import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.util.ObjectFilter; /** @@ -44,7 +45,7 @@ /* (non-Javadoc) * @see org.archive.wayback.resourceindex.ExclusionFilterFactory#get() */ - public ObjectFilter<CaptureSearchResult> get() { + public ExclusionFilter get() { return new RemoteExclusionFilter(exclusionUrlPrefix, exclusionUserAgent); } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilter.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -41,6 +41,7 @@ import org.archive.wayback.exception.LiveDocumentNotAvailableException; import org.archive.wayback.exception.LiveWebCacheUnavailableException; import org.archive.wayback.liveweb.LiveWebCache; +import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.util.ObjectFilter; /** @@ -58,7 +59,7 @@ * @author brad * @version $Date$, $Revision$ */ -public class RobotExclusionFilter implements ObjectFilter<CaptureSearchResult> { +public class RobotExclusionFilter extends ExclusionFilter { private final static Logger LOGGER = Logger.getLogger(RobotExclusionFilter.class.getName()); @@ -74,6 +75,8 @@ private String userAgent = null; private StringBuilder sb = null; private final static RobotRules emptyRules = new RobotRules(); + private boolean notifiedSeen = false; + private boolean notifiedPassed = false; /** * Construct a new RobotExclusionFilter that uses webCache to pull @@ -226,7 +229,10 @@ * @see org.archive.wayback.resourceindex.SearchResultFilter#filterSearchResult(org.archive.wayback.core.SearchResult) */ public int filterObject(CaptureSearchResult r) { - + if(!notifiedSeen) { + filterGroup.setSawRobots(); + notifiedSeen = true; + } int filterResult = ObjectFilter.FILTER_EXCLUDE; RobotRules rules = getRules(r); if(rules != null) { @@ -235,6 +241,10 @@ try { url = new URL(ArchiveUtils.addImpliedHttpIfNecessary(resultURL)); if(!rules.blocksPathForUA(url.getPath(), userAgent)) { + if(!notifiedPassed) { + filterGroup.setPassedRobots(); + notifiedPassed = true; + } filterResult = ObjectFilter.FILTER_INCLUDE; LOGGER.fine("ROBOT: ALLOWED("+resultURL+")"); } else { Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilterFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilterFactory.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/robotstxt/RobotExclusionFilterFactory.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -27,6 +27,7 @@ import org.archive.wayback.accesscontrol.ExclusionFilterFactory; import org.archive.wayback.core.CaptureSearchResult; import org.archive.wayback.liveweb.LiveWebCache; +import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.util.ObjectFilter; /** @@ -44,7 +45,7 @@ /* (non-Javadoc) * @see org.archive.wayback.resourceindex.ExclusionFilterFactory#get() */ - public ObjectFilter<CaptureSearchResult> get() { + public ExclusionFilter get() { return new RobotExclusionFilter(webCache,userAgent,maxCacheMS); } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilter.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilter.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -30,6 +30,7 @@ import org.apache.commons.httpclient.URIException; import org.apache.log4j.Logger; import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.surt.SURTTokenizer; import org.archive.wayback.util.ObjectFilter; @@ -39,12 +40,14 @@ * @author brad * @version $Date$, $Revision$ */ -public class StaticMapExclusionFilter implements ObjectFilter<CaptureSearchResult> { +public class StaticMapExclusionFilter extends ExclusionFilter { private static final Logger LOGGER = Logger.getLogger( StaticMapExclusionFilter.class.getName()); private String lastChecked = null; private boolean lastCheckedExcluded = false; + private boolean notifiedSeen = false; + private boolean notifiedPassed = false; Map<String,Object> exclusionMap = null; /** * @param map where each String key is a SURT that is blocked. @@ -77,18 +80,33 @@ * @see org.archive.wayback.resourceindex.SearchResultFilter#filterSearchResult(org.archive.wayback.core.SearchResult) */ public int filterObject(CaptureSearchResult r) { + if(!notifiedSeen) { + filterGroup.setSawAdministrative(); + notifiedSeen = true; + } String url = r.getOriginalUrl(); if(lastChecked != null) { if(lastChecked.equals(url)) { - return lastCheckedExcluded ? - ObjectFilter.FILTER_EXCLUDE : - ObjectFilter.FILTER_INCLUDE; + if(lastCheckedExcluded) { + return ObjectFilter.FILTER_EXCLUDE; + } else { + // don't need to: already did last time... + //filterGroup.setPassedAdministrative(); + return ObjectFilter.FILTER_INCLUDE; + } } } lastChecked = url; lastCheckedExcluded = isExcluded(url); - return lastCheckedExcluded ? - ObjectFilter.FILTER_EXCLUDE : - ObjectFilter.FILTER_INCLUDE; + if(lastCheckedExcluded) { + return ObjectFilter.FILTER_EXCLUDE; + } else { + if(!notifiedPassed) { + filterGroup.setPassedAdministrative(); + notifiedPassed = true; + } + return ObjectFilter.FILTER_INCLUDE; + } + } } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilterFactory.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilterFactory.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/accesscontrol/staticmap/StaticMapExclusionFilterFactory.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -33,6 +33,7 @@ import org.apache.log4j.Logger; import org.archive.wayback.accesscontrol.ExclusionFilterFactory; import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.surt.SURTTokenizer; import org.archive.wayback.util.CloseableIterator; import org.archive.wayback.util.ObjectFilter; @@ -110,7 +111,7 @@ * @return ObjectFilter which blocks CaptureSearchResults in the * exclusion file. */ - public ObjectFilter<CaptureSearchResult> get() { + public ExclusionFilter get() { if(currentMap == null) { return null; } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/core/WaybackRequest.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -36,6 +36,7 @@ import javax.servlet.http.HttpServletRequest; import org.archive.wayback.requestparser.OpenSearchRequestParser; +import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.resourceindex.filters.HostMatchFilter; import org.archive.wayback.resourceindex.filters.SchemeMatchFilter; import org.archive.wayback.util.ObjectFilter; @@ -84,7 +85,7 @@ * resultFilters, if these filters redact all results, then an * AccessControlException will be thrown. */ - private ObjectFilter<CaptureSearchResult> exclusionFilter = null; + private ExclusionFilter exclusionFilter = null; /** * custom CaptureSearchResult Filter to use for this specific request. Can @@ -486,11 +487,11 @@ this.accessPoint = accessPoint; } - public ObjectFilter<CaptureSearchResult> getExclusionFilter() { + public ExclusionFilter getExclusionFilter() { return exclusionFilter; } - public void setExclusionFilter(ObjectFilter<CaptureSearchResult> exclusionFilter) { + public void setExclusionFilter(ExclusionFilter exclusionFilter) { this.exclusionFilter = exclusionFilter; } Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AdminstrativeAccessControlException.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AdminstrativeAccessControlException.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AdminstrativeAccessControlException.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -0,0 +1,40 @@ +/* AdminstrativeAccessControlException + * + * $Id$: + * + * Created on Mar 25, 2010. + * + * Copyright (C) 2006 Internet Archive. + * + * This file is part of Wayback. + * + * Wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * Wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with Wayback; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package org.archive.wayback.exception; + +/** + * @author brad + * + */ +public class AdminstrativeAccessControlException extends AccessControlException { + + /** + * @param message + */ + public AdminstrativeAccessControlException(String message) { + super("Blocked Site Error",message); + } +} Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/AdminstrativeAccessControlException.java ___________________________________________________________________ Added: svn:keywords + Author Date Revision Id Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/RobotAccessControlException.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/RobotAccessControlException.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/RobotAccessControlException.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -0,0 +1,40 @@ +/* RobotAccessControlException + * + * $Id$: + * + * Created on Mar 25, 2010. + * + * Copyright (C) 2006 Internet Archive. + * + * This file is part of Wayback. + * + * Wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * Wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with Wayback; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package org.archive.wayback.exception; + +/** + * @author brad + * + */ +public class RobotAccessControlException extends AccessControlException { + + /** + * @param message + */ + public RobotAccessControlException(String message) { + super("Blocked By Robots",message); + } +} Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/exception/RobotAccessControlException.java ___________________________________________________________________ Added: svn:keywords + Author Date Revision Id Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroup.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroup.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/ExclusionCaptureFilterGroup.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -30,8 +30,11 @@ import org.archive.wayback.core.SearchResults; import org.archive.wayback.core.WaybackRequest; import org.archive.wayback.exception.AccessControlException; +import org.archive.wayback.exception.AdminstrativeAccessControlException; import org.archive.wayback.exception.ResourceNotInArchiveException; +import org.archive.wayback.exception.RobotAccessControlException; import org.archive.wayback.resourceindex.filters.CounterFilter; +import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.util.ObjectFilter; import org.archive.wayback.util.ObjectFilterChain; @@ -41,23 +44,27 @@ private CounterFilter preCounter = null; private CounterFilter postCounter = null; String requestUrl = null; + private boolean sawRobots = false; + private boolean passedRobots = false; + private boolean sawAdministrative = false; + private boolean passedAdministrative = false; public ExclusionCaptureFilterGroup(WaybackRequest request) { // checks an exclusion service for every matching record - ObjectFilter<CaptureSearchResult> exclusion = - request.getExclusionFilter(); + ExclusionFilter exclusion = request.getExclusionFilter(); chain = new ObjectFilterChain<CaptureSearchResult>(); if(exclusion != null) { - preCounter = new CounterFilter(); - // count how many results got to the ExclusionFilter: - chain.addFilter(preCounter); + exclusion.setFilterGroup(this); +// preCounter = new CounterFilter(); +// // count how many results got to the ExclusionFilter: +// chain.addFilter(preCounter); chain.addFilter(exclusion); // count how many results got past the ExclusionFilter: requestUrl = request.getRequestUrl(); } - postCounter = new CounterFilter(); - chain.addFilter(postCounter); +// postCounter = new CounterFilter(); +// chain.addFilter(postCounter); } public List<ObjectFilter<CaptureSearchResult>> getFilters() { @@ -66,20 +73,38 @@ public void annotateResults(SearchResults results) throws AccessControlException, ResourceNotInArchiveException { - if(postCounter.getNumMatched() == 0) { + if(sawRobots && !passedRobots) { + throw new RobotAccessControlException("The URL " + requestUrl + + " is blocked by the sites robots.txt file"); + } + if(sawAdministrative && !passedAdministrative) { + throw new AdminstrativeAccessControlException(requestUrl + + " is not available in the Wayback Machine."); + } - // nothing got to the counter after exclusions. If we have - // exclusions (detected by preCounter being non-null, and the - // preCounter passed any results, then they were all filtered by - // the exclusions filter. - if(preCounter != null && preCounter.getNumMatched() > 0) { - throw new AccessControlException("All results Excluded"); - } - ResourceNotInArchiveException e = - new ResourceNotInArchiveException("the URL " + requestUrl - + " is not in the archive."); - e.setCloseMatches(results.getCloseMatches()); - throw e; - } +// if(postCounter.getNumMatched() == 0) { +// +// // nothing got to the counter after exclusions. If we have +// // exclusions (detected by preCounter being non-null, and the +// // preCounter passed any results, then they were all filtered by +// // the exclusions filter. +// if(preCounter != null && preCounter.getNumMatched() > 0) { +// throw new AccessControlException("All results Excluded"); +// } +// } } + + public void setPassedRobots() { + passedRobots = true; + } + public void setSawRobots() { + sawRobots = true; + } + + public void setPassedAdministrative() { + passedAdministrative = true; + } + public void setSawAdministrative() { + sawAdministrative = true; + } } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/WindowFilterGroup.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/WindowFilterGroup.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filterfactory/WindowFilterGroup.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -29,6 +29,7 @@ import org.archive.wayback.core.SearchResults; import org.archive.wayback.core.WaybackRequest; import org.archive.wayback.exception.BadQueryException; +import org.archive.wayback.exception.ResourceNotInArchiveException; import org.archive.wayback.resourceindex.LocalResourceIndex; import org.archive.wayback.resourceindex.filters.WindowEndFilter; import org.archive.wayback.resourceindex.filters.WindowStartFilter; @@ -42,9 +43,10 @@ ObjectFilterChain<T> windowFilters; WindowStartFilter<T> startFilter; WindowEndFilter<T> endFilter; + private String requestUrl = null; public WindowFilterGroup(WaybackRequest request, LocalResourceIndex index) throws BadQueryException { - + requestUrl = request.getRequestUrl(); windowFilters = new ObjectFilterChain<T>(); // first grab all the info from the WaybackRequest, and validate it: resultsPerPage = request.getResultsPerPage(); @@ -71,13 +73,24 @@ } public void annotateResults(SearchResults results) - throws BadQueryException { + throws BadQueryException, ResourceNotInArchiveException { results.setFirstReturned(startResult); results.setNumRequested(resultsPerPage); + int startSeen = startFilter.getNumSeen(); + if(startSeen == 0) { + ResourceNotInArchiveException e = + new ResourceNotInArchiveException("the URL " + requestUrl + + " is not in the archive."); + e.setCloseMatches(results.getCloseMatches()); + throw e; + } + int numSeen = endFilter.getNumSeen(); if(numSeen == 0) { throw new BadQueryException("No results in requested window"); } + + // how many went by the filters: results.setMatchingCount(startFilter.getNumSeen()); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/CompositeExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/CompositeExclusionFilter.java 2010-03-24 01:08:53 UTC (rev 3005) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/CompositeExclusionFilter.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -28,6 +28,7 @@ import java.util.Iterator; import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.resourceindex.filterfactory.ExclusionCaptureFilterGroup; import org.archive.wayback.util.ObjectFilter; /** @@ -38,22 +39,29 @@ * @author brad * @version $Date$, $Revision$ */ -public class CompositeExclusionFilter implements ObjectFilter<CaptureSearchResult> { +public class CompositeExclusionFilter extends ExclusionFilter { + //implements ObjectFilter<CaptureSearchResult> { - private ArrayList<ObjectFilter<CaptureSearchResult>> filters = - new ArrayList<ObjectFilter<CaptureSearchResult>>(); + private ArrayList<ExclusionFilter> filters = + new ArrayList<ExclusionFilter>(); /** * @param filter to be added to the composite. */ - public void addComponent(ObjectFilter<CaptureSearchResult> filter) { + public void addComponent(ExclusionFilter filter) { filters.add(filter); } + public void setFilterGroup(ExclusionCaptureFilterGroup filterGroup) { + this.filterGroup = filterGroup; + for(ExclusionFilter filter : filters) { + filter.setFilterGroup(filterGroup); + } + } /* (non-Javadoc) * @see org.archive.wayback.resourceindex.SearchResultFilter#filterSearchResult(org.archive.wayback.core.SearchResult) */ public int filterObject(CaptureSearchResult r) { - Iterator<ObjectFilter<CaptureSearchResult>> itr = filters.iterator(); + Iterator<ExclusionFilter> itr = filters.iterator(); while(itr.hasNext()) { ObjectFilter<CaptureSearchResult> filter = itr.next(); if(filter == null) { Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/ExclusionFilter.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/ExclusionFilter.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/ExclusionFilter.java 2010-03-26 03:22:05 UTC (rev 3006) @@ -0,0 +1,41 @@ +/* ExclusionFilter + * + * $Id$: + * + * Created on Mar 25, 2010. + * + * Copyright (C) 2006 Internet Archive. + * + * This file is part of Wayback. + * + * Wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * Wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with Wayback; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package org.archive.wayback.resourceindex.filters; + +import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.resourceindex.filterfactory.ExclusionCaptureFilterGroup; +import org.archive.wayback.util.ObjectFilter; + +/** + * @author brad + * + */ +public abstract class ExclusionFilter implements ObjectFilter<CaptureSearchResult> { + protected ExclusionCaptureFilterGroup filterGroup; + public void setFilterGroup(ExclusionCaptureFilterGroup filterGroup) { + this.filterGroup = filterGroup; + } +} Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/filters/ExclusionFilter.java ___________________________________________________________________ Added: svn:keywords + Author Date Revision Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-04-02 02:53:50
|
Revision: 3009 http://archive-access.svn.sourceforge.net/archive-access/?rev=3009&view=rev Author: bradtofel Date: 2010-04-02 02:53:44 +0000 (Fri, 02 Apr 2010) Log Message: ----------- TWEAK: changed DatabaseException to IOException on initialization failure of BDBRecordSet and callers Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/bdb/BDBIndex.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/BDBResourceFileLocationDB.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/bdb/BDBRecordSet.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/bdb/BDBIndex.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/bdb/BDBIndex.java 2010-03-30 22:34:57 UTC (rev 3008) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourceindex/bdb/BDBIndex.java 2010-04-02 02:53:44 UTC (rev 3009) @@ -62,7 +62,7 @@ * @throws DatabaseException * @throws ConfigurationException */ - public void init() throws DatabaseException, ConfigurationException { + public void init() throws IOException, ConfigurationException { initializeDB(bdbPath,bdbName); } @@ -151,7 +151,7 @@ UrlCanonicalizer canonicalizer = new AggressiveUrlCanonicalizer(); try { index.initializeDB(path,name); - } catch (DatabaseException e) { + } catch (IOException e) { e.printStackTrace(); System.exit(1); } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/BDBResourceFileLocationDB.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/BDBResourceFileLocationDB.java 2010-03-30 22:34:57 UTC (rev 3008) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/BDBResourceFileLocationDB.java 2010-04-02 02:53:44 UTC (rev 3009) @@ -87,11 +87,7 @@ public void init() throws IOException { bdb = new BDBRecordSet(); - try { - bdb.initializeDB(bdbPath,bdbName); - } catch (DatabaseException e) { - throw wrapDBException(e); - } + bdb.initializeDB(bdbPath,bdbName); if(logPath == null) { throw new IOException("No logPath"); } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/bdb/BDBRecordSet.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/bdb/BDBRecordSet.java 2010-03-30 22:34:57 UTC (rev 3008) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/util/bdb/BDBRecordSet.java 2010-04-02 02:53:44 UTC (rev 3009) @@ -25,6 +25,7 @@ package org.archive.wayback.util.bdb; import java.io.File; +import java.io.IOException; import java.io.UnsupportedEncodingException; import java.util.Iterator; @@ -74,10 +75,10 @@ /** * @param thePath Directory where BDBJE files are stored * @param theDbName Name of files in thePath - * @throws DatabaseException + * @throws IOException for usual reasons, plus as database exceptions */ public void initializeDB(final String thePath, final String theDbName) - throws DatabaseException { + throws IOException { path = thePath; dbName = theDbName; @@ -88,7 +89,7 @@ File file = new File(path); if(!file.isDirectory()) { if(!file.mkdirs()) { - throw new DatabaseException("failed mkdirs(" + path + ")"); + throw new IOException("failed mkdirs(" + path + ")"); } } env = new Environment(file, environmentConfig); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-04-24 00:20:09
|
Revision: 3056 http://archive-access.svn.sourceforge.net/archive-access/?rev=3056&view=rev Author: bradtofel Date: 2010-04-24 00:20:03 +0000 (Sat, 24 Apr 2010) Log Message: ----------- INITIAL REV: Wayback-specific glue code to map CaptureSearchResults into partitions, and to map partitions into Graph, and HTML, (hopefully) simplifying .JSP pages wanting to use Partitions and Graphs. Added Paths: ----------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/CaptureSearchResultPartitionMap.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionPartitionMap.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionsToGraph.java Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/CaptureSearchResultPartitionMap.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/CaptureSearchResultPartitionMap.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/CaptureSearchResultPartitionMap.java 2010-04-24 00:20:03 UTC (rev 3056) @@ -0,0 +1,54 @@ +/* CaptureSearchResultPartitionMap + * + * $Id$: + * + * Created on Apr 8, 2010. + * + * Copyright (C) 2006 Internet Archive. + * + * This file is part of Wayback. + * + * Wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * Wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with Wayback; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package org.archive.wayback.partition; + +import java.util.Date; + +import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.util.partition.ElementPartitionMap; +import org.archive.wayback.util.partition.Partition; + +/** + * @author brad + * + */ +public class CaptureSearchResultPartitionMap + implements ElementPartitionMap<CaptureSearchResult> { + + public void addElementToPartition(CaptureSearchResult element, + Partition<CaptureSearchResult> partition) { + partition.add(element); + partition.addTotal(1); + if(element.isClosest()) { + partition.setContainsClosest(true); + } + } + + public Date elementToDate(CaptureSearchResult element) { + return element.getCaptureDate(); + } + +} Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/CaptureSearchResultPartitionMap.java ___________________________________________________________________ Added: svn:keywords + Author Date Revision Id Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionPartitionMap.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionPartitionMap.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionPartitionMap.java 2010-04-24 00:20:03 UTC (rev 3056) @@ -0,0 +1,60 @@ +/* PartitionPartitionMap + * + * $Id$: + * + * Created on Apr 8, 2010. + * + * Copyright (C) 2006 Internet Archive. + * + * This file is part of Wayback. + * + * Wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * Wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with Wayback; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package org.archive.wayback.partition; + +import java.util.Date; + +import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.util.partition.ElementPartitionMap; +import org.archive.wayback.util.partition.Partition; + +/** + * @author brad + * + */ +public class PartitionPartitionMap +implements ElementPartitionMap<Partition<CaptureSearchResult>> { + + /* (non-Javadoc) + * @see org.archive.wayback.util.partition.ElementPartitionMap#addElementToPartition(java.lang.Object, org.archive.wayback.util.partition.Partition) + */ + public void addElementToPartition(Partition<CaptureSearchResult> element, + Partition<Partition<CaptureSearchResult>> partition) { + partition.add(element); + partition.addTotal(element.getTotal()); + if(element.isContainsClosest()) { + partition.setContainsClosest(true); + } + } + + /* (non-Javadoc) + * @see org.archive.wayback.util.partition.ElementPartitionMap#elementToDate(java.lang.Object) + */ + public Date elementToDate(Partition<CaptureSearchResult> element) { + return element.getStart(); + } + +} Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionPartitionMap.java ___________________________________________________________________ Added: svn:keywords + Author Date Revision Id Added: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionsToGraph.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionsToGraph.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionsToGraph.java 2010-04-24 00:20:03 UTC (rev 3056) @@ -0,0 +1,567 @@ +/* PartitionsToGraph + * + * $Id$: + * + * Created on Apr 9, 2010. + * + * Copyright (C) 2006 Internet Archive. + * + * This file is part of Wayback. + * + * Wayback is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser Public License as published by + * the Free Software Foundation; either version 2.1 of the License, or + * any later version. + * + * Wayback is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser Public License for more details. + * + * You should have received a copy of the GNU Lesser Public License + * along with Wayback; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +package org.archive.wayback.partition; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.List; +import java.util.TimeZone; + +import org.archive.wayback.ResultURIConverter; +import org.archive.wayback.core.CaptureSearchResult; +import org.archive.wayback.util.StringFormatter; +import org.archive.wayback.util.Timestamp; +import org.archive.wayback.util.graph.Graph; +import org.archive.wayback.util.graph.GraphConfiguration; +import org.archive.wayback.util.graph.RegionData; +import org.archive.wayback.util.partition.Partition; +import org.archive.wayback.util.partition.PartitionSize; +import org.archive.wayback.util.partition.Partitioner; + +/** + * @author brad + * + */ +public class PartitionsToGraph { + + public final static int NAV_COUNT = 9; + + public final static int NAV_PREV_YEAR = 0; + public final static int NAV_PREV_MONTH = 1; + public final static int NAV_PREV_DAY = 2; + public final static int NAV_PREV_CAPTURE = 3; + public final static int NAV_CURRENT = 4; + public final static int NAV_NEXT_CAPTURE = 5; + public final static int NAV_NEXT_DAY = 6; + public final static int NAV_NEXT_MONTH = 7; + public final static int NAV_NEXT_YEAR = 8; + + + private static final TimeZone TZ_UTC = TimeZone.getTimeZone("UTC"); + + private static String joinInts(int[] a) { + StringBuilder sb = new StringBuilder(); + boolean first = true; + for(int i : a) { + if(first) { + sb.append(i); + first = false; + } else { + sb.append(",").append(i); + } + } + return sb.toString(); + } + private static void printAr(String name, int o[], int n[]) { + System.out.format("%s=========\nORIG(%s)\nNORM(%s)\n", + name,joinInts(o),joinInts(n)); + } + + private static int normalizeInt(int input, int localMax, int maxOutput) { + double ln = Math.log(localMax); + if(input == 0) { + return 0; + + } else if(input == 1) { + return 1; + } else { + double iln = Math.log(input); + double pct = iln / ln; + double num = pct * maxOutput; + int idx = (int) num; + System.out.format("%d - %f - %f - %f - %f : %d\n", + input,ln,iln,pct,num,idx); + if(input < idx) { + return input; + } else { + return idx; + } + } + } + + private static int[] normalizeTo(int input[], int max) { + int localMax = -1; + for(int i = 0; i < input.length; i++) { + if(input[i] > localMax) localMax = input[i]; + } + if(localMax < max) { + printAr("No normalization",input,input); + return input; + } + int normalized[] = new int[input.length]; + double ln = Math.log(localMax); + for(int i = 0; i < input.length; i++) { + if(input[i] == 0) { + normalized[i] = 0; + } else if(input[i] == 1) { + normalized[i] = 1; + } else { + double iln = Math.log(input[i]); + double pct = iln / ln; + double num = pct * max; + int idx = (int) num; + System.out.format("%d - %d - %f - %f - %f - %f : %d\n", + i,input[i],ln,iln,pct,num,idx); + if(input[i] < idx) { + normalized[i] = input[i]; + } else { + normalized[i] = idx; + } + } + } + printAr("NORMALIZED",input,normalized); + return normalized; + } + + public static Calendar getUTCCalendar() { + return Calendar.getInstance(TZ_UTC); + } + + public static Graph partsOfPartsToGraph(List<Partition<Partition<CaptureSearchResult>>> ppcs, + StringFormatter formatter, String formatKey, int width, int height) { + + Calendar cal = Calendar.getInstance(TZ_UTC); + // FIRST PASS TO CALCULATE MONTH DOMAIN MAX: + int maxValue = -1; + for(Partition<Partition<CaptureSearchResult>> ppc : ppcs) { + for(Partition<CaptureSearchResult> pc : ppc.list()) { + if(pc.getTotal() > maxValue) { + maxValue = pc.getTotal(); + } + } + } + + RegionData data[] = new RegionData[ppcs.size()]; + for(int y = 0; y < ppcs.size(); y++) { + int activeP = -1; + Partition<Partition<CaptureSearchResult>> ppc = ppcs.get(y); + String label = formatter.format(formatKey, ppc.getStart()); +// cal.setTime(ppc.getStart()); +// String label = String.valueOf(cal.get(Calendar.YEAR)); + List<Partition<CaptureSearchResult>> pcs = ppc.list(); + int count = pcs.size(); + int values[] = new int[count]; + for(int m = 0; m < count; m++) { + Partition<CaptureSearchResult> pc = pcs.get(m); + values[m] = normalizeInt(pc.getTotal(), maxValue, 15); + if(pc.isContainsClosest()) { + activeP = m; + } + } + data[y] = new RegionData(label, activeP, values); + } + GraphConfiguration config = new GraphConfiguration(); + return new Graph(width, height, data, config); + } + + public static List<Partition<Partition<CaptureSearchResult>>> reversePartsOfParts(List<Partition<Partition<CaptureSearchResult>>> parts) { + List<Partition<Partition<CaptureSearchResult>>> reversed = + new ArrayList<Partition<Partition<CaptureSearchResult>>>(); + for(Partition<Partition<CaptureSearchResult>> p : parts) { + reversed.add(0, p); + } + return reversed; + } + public static List<Partition<CaptureSearchResult>> reversePartsOfCaps(List<Partition<CaptureSearchResult>> parts) { + List<Partition<CaptureSearchResult>> reversed = + new ArrayList<Partition<CaptureSearchResult>>(); + for(Partition<CaptureSearchResult> p : parts) { + reversed.add(0, p); + } + return reversed; + } + public static List<CaptureSearchResult> reverseCaps(List<CaptureSearchResult> caps) { + List<CaptureSearchResult> reversed = + new ArrayList<CaptureSearchResult>(); + for(CaptureSearchResult cap : caps) { + reversed.add(0, cap); + } + return reversed; + } + + public static List<Partition<Partition<CaptureSearchResult>>> trimPartsOfParts(List<Partition<Partition<CaptureSearchResult>>> parts) { + int first = -1; + int last = -1; + for(int i = 0; i < parts.size(); i++) { + Partition<Partition<CaptureSearchResult>> p = parts.get(i); + if(p.getTotal() > 0) { + if(first == -1) { + first = i; + } + last = i; + } + } + return parts.subList(first, last+1); + } + public static List<Partition<CaptureSearchResult>> trimPartsOfCaps(List<Partition<CaptureSearchResult>> parts) { + int first = -1; + int last = -1; + for(int i = 0; i < parts.size(); i++) { + Partition<CaptureSearchResult> p = parts.get(i); + if(p.getTotal() > 0) { + if(first == -1) { + first = i; + } + last = i; + } + } + return parts.subList(first, last+1); + } + + public static Graph convertYearMonth(List<Partition<Partition<CaptureSearchResult>>> years, + int width, int height) { + + Calendar cal = Calendar.getInstance(TZ_UTC); + // FIRST PASS TO CALCULATE MONTH DOMAIN MAX: + int maxValue = -1; + for(Partition<Partition<CaptureSearchResult>> year : years) { + for(Partition<CaptureSearchResult> month : year.list()) { + if(month.getTotal() > maxValue) { + maxValue = month.getTotal(); + } + } + } + + RegionData yearRD[] = new RegionData[years.size()]; + for(int y = 0; y < years.size(); y++) { + int activeMonth = -1; + Partition<Partition<CaptureSearchResult>> year = years.get(y); + cal.setTime(year.getStart()); + String label = String.valueOf(cal.get(Calendar.YEAR)); + List<Partition<CaptureSearchResult>> months = year.list(); + if(months.size() != 12) { + throw new RuntimeException("Not 12 months..."); + } + int values[] = new int[12]; + for(int m = 0; m < 12; m++) { + Partition<CaptureSearchResult> month = months.get(m); + values[m] = normalizeInt(month.getTotal(), maxValue, 15); + if(month.isContainsClosest()) { + activeMonth = m; + } + } + yearRD[y] = new RegionData(label, activeMonth, values); + } + GraphConfiguration config = new GraphConfiguration(); + return new Graph(width, height, yearRD, config); + } + + public static String[] getTitles(CaptureSearchResult results[], + StringFormatter formatter, String property) { + int len = results.length; + String urls[] = new String[len]; + for(int i = 0; i < len; i++) { + String url = null; + if(results[i] != null) { + url = formatter.format(property, results[i].getCaptureDate()); + } + urls[i] = url; + } + return urls; + } + public static String[] getUrls(CaptureSearchResult results[], String suffix, + ResultURIConverter c) { + int len = results.length; + String urls[] = new String[len]; + for(int i = 0; i < len; i++) { + String url = null; + if(results[i] != null) { + if(suffix == null) { + url = c.makeReplayURI(results[i].getCaptureTimestamp(), + results[i].getOriginalUrl()); + } else { + url = c.makeReplayURI(results[i].getCaptureTimestamp() + + suffix, results[i].getOriginalUrl()); + } + } + urls[i] = url; + } + return urls; + } + public static String[] getUrls(CaptureSearchResult results[], + ResultURIConverter c) { + return getUrls(results,null,c); + } + + public static CaptureSearchResult[] getResults( + List<Partition<Partition<CaptureSearchResult>>> years) { + + int count = years.size(); + CaptureSearchResult results[] = new CaptureSearchResult[count]; + for(int i = 0; i < count; i++) { + Partition<Partition<CaptureSearchResult>> year = years.get(i); + CaptureSearchResult first = null; + if(year.getTotal() > 0) { + for(Partition<CaptureSearchResult> month : year.list()) { + if(month.getTotal() > 0) { + first = month.list().get(0); + break; + } + } + } + results[i] = first; + } + return results; + } + + + + public static String getFirstUrlMonth(Partition<CaptureSearchResult> month, + ResultURIConverter c) { + if(month.getTotal() > 0) { + CaptureSearchResult first = month.list().get(0); + return c.makeReplayURI(first.getCaptureTimestamp(), + first.getOriginalUrl()); + } + return null; + } + + public static String getLastUrlMonth(Partition<CaptureSearchResult> month, + ResultURIConverter c) { + if(month.getTotal() > 0) { + CaptureSearchResult last = month.list().get(month.list().size()-1); + return c.makeReplayURI(last.getCaptureTimestamp(), + last.getOriginalUrl()); + } + return null; + } + + public static String getFirstUrlYear(Partition<Partition<CaptureSearchResult>> year, + ResultURIConverter c) { + for(Partition<CaptureSearchResult> month : year.list()) { + String firstInMonth = getFirstUrlMonth(month,c); + if(firstInMonth != null) return firstInMonth; + } + return null; + } + public static String getLastUrlYear(Partition<Partition<CaptureSearchResult>> year, + ResultURIConverter c) { + List<Partition<CaptureSearchResult>> months = year.list(); + for(int i = months.size()-1; i >= 0; i--) { + String firstInMonth = getLastUrlMonth(months.get(i),c); + if(firstInMonth != null) return firstInMonth; + } + return null; + } + + + public static String[] getNavigatorLinks( + List<Partition<Partition<CaptureSearchResult>>> years, ResultURIConverter uc) { + String navs[] = new String[NAV_COUNT]; + for(int i = 0; i < NAV_COUNT; i++) { + navs[i] = null; + } + /* + * first traverse the years, grabbing: + * * the one *before* + * * the *current* + * * the one *after* + * + * the "active" year: + */ + + Partition<Partition<CaptureSearchResult>> prevYear = null; + Partition<Partition<CaptureSearchResult>> curYear = null; + Partition<Partition<CaptureSearchResult>> nextYear = null; + + for(Partition<Partition<CaptureSearchResult>> year : years) { + if(year.isContainsClosest()) { + curYear = year; + } else { + // have we seen the current one? + if(curYear == null) { + // no, track this as the "prev", and continue: + if(year.getTotal() > 0) { + prevYear = year; + } + } else { + // yes, this is the "next", remember and break: + if(year.getTotal() > 0) { + nextYear = year; + break; + } + } + } + } + if(prevYear != null) { + navs[NAV_PREV_YEAR] = getLastUrlYear(prevYear, uc); + } + if(nextYear != null) { + navs[NAV_NEXT_YEAR] = getFirstUrlYear(nextYear, uc); + } + // now on to months: + List<Partition<CaptureSearchResult>> months = curYear.list(); + + Partition<CaptureSearchResult> prevMonth = null; + Partition<CaptureSearchResult> curMonth = null; + Partition<CaptureSearchResult> nextMonth = null; + + for(Partition<CaptureSearchResult> month : months) { + if(month.isContainsClosest()) { + curMonth = month; + } else { + // have we seen the current one? + if(curMonth == null) { + // no, track this as the "prev", and continue: + if(month.getTotal() > 0) { + prevMonth = month; + } + } else { + // yes, this is the "next", remember and break: + if(month.getTotal() > 0) { + nextMonth = month; + break; + } + } + } + } + + if(prevMonth != null) { + navs[NAV_PREV_MONTH] = getLastUrlMonth(prevMonth, uc); + } else { + // assume whatever we found for prev Year is OK, even if null: + navs[NAV_PREV_MONTH] = navs[NAV_PREV_YEAR]; + } + if(nextMonth != null) { + navs[NAV_NEXT_MONTH] = getFirstUrlMonth(nextMonth, uc); + } else { + // assume whatever we found for next Year is OK, even if null: + navs[NAV_NEXT_MONTH] = navs[NAV_NEXT_YEAR]; + } + + // OK... now we're down to days... split the current month into days: + List<Partition<CaptureSearchResult>> days = splitToDays(curMonth); + + Partition<CaptureSearchResult> prevDay = null; + Partition<CaptureSearchResult> curDay = null; + Partition<CaptureSearchResult> nextDay = null; + + for(Partition<CaptureSearchResult> day : days) { + if(day.isContainsClosest()) { + curDay = day; + } else { + // have we seen the current one? + if(curDay == null) { + // no, track this as the "prev", and continue: + if(day.getTotal() > 0) { + prevDay = day; + } + } else { + // yes, this is the "next", remember and break: + if(day.getTotal() > 0) { + nextDay = day; + break; + } + } + } + } + + if(prevDay != null) { + navs[NAV_PREV_DAY] = getLastUrlMonth(prevDay, uc); + } else { + // assume whatever we found for prev Month is OK, even if null: + navs[NAV_PREV_DAY] = navs[NAV_PREV_MONTH]; + } + if(nextDay != null) { + navs[NAV_NEXT_DAY] = getFirstUrlMonth(nextDay, uc); + } else { + // assume whatever we found for next Month is OK, even if null: + navs[NAV_NEXT_DAY] = navs[NAV_NEXT_MONTH]; + } + + // FINALLY! We just need the next and prev links: + CaptureSearchResult prevResult = null; + CaptureSearchResult curResult = null; + CaptureSearchResult nextResult = null; + for(CaptureSearchResult result : curDay.list()) { + if(result.isClosest()) { + curResult = result; + } else { + // have we seen the current one? + if(curResult == null) { + // no, track this as the "prev", and continue: + prevResult = result; + } else { + // yes, this is the "next", remember and break: + nextResult = result; + break; + } + } + } + if(prevResult != null) { + navs[NAV_PREV_CAPTURE] = + uc.makeReplayURI(prevResult.getCaptureTimestamp(), + prevResult.getOriginalUrl()); + } else { + // assume whatever we found for prev Day is OK, even if null: + navs[NAV_PREV_CAPTURE] = navs[NAV_PREV_DAY]; + } + if(nextResult != null) { + navs[NAV_NEXT_CAPTURE] = + uc.makeReplayURI(nextResult.getCaptureTimestamp(), + nextResult.getOriginalUrl()); + } else { + // assume whatever we found for prev Day is OK, even if null: + navs[NAV_NEXT_CAPTURE] = navs[NAV_NEXT_DAY]; + } + + return navs; + } + + /** + * @param list + * @return + */ + private static List<Partition<CaptureSearchResult>> splitToDays( + Partition<CaptureSearchResult> month) { + CaptureSearchResultPartitionMap map = + new CaptureSearchResultPartitionMap(); + Partitioner<CaptureSearchResult> partitioner = + new Partitioner<CaptureSearchResult>(map); + PartitionSize daySize = Partitioner.daySize; + List<Partition<CaptureSearchResult>> days = partitioner.getRange(daySize, + month.getStart(), month.getEnd()); + partitioner.populate(days, month.iterator()); + return days; + } + + public static String[] getNavigators(StringFormatter formatter, CaptureSearchResult current) { + String navs[] = new String[NAV_COUNT]; + navs[NAV_PREV_YEAR] = formatter.format("graph.prevYear"); + navs[NAV_PREV_MONTH] = formatter.format("graph.prevMonth"); + navs[NAV_PREV_DAY] = formatter.format("graph.prevDay"); + navs[NAV_PREV_CAPTURE] = formatter.format("graph.prevCapture"); + + navs[NAV_CURRENT] = formatter.format("graph.current", current.getOriginalUrl(), + current.getCaptureDate()); + + navs[NAV_NEXT_CAPTURE] = formatter.format("graph.nextCapture"); + navs[NAV_NEXT_DAY] = formatter.format("graph.nextDay"); + navs[NAV_NEXT_MONTH] = formatter.format("graph.nextMonth"); + navs[NAV_NEXT_YEAR] = formatter.format("graph.nextYear"); + return navs; + } +} Property changes on: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/partition/PartitionsToGraph.java ___________________________________________________________________ Added: svn:keywords + Author Date Revision Id This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-04-27 22:47:45
|
Revision: 3081 http://archive-access.svn.sourceforge.net/archive-access/?rev=3081&view=rev Author: bradtofel Date: 2010-04-27 22:47:37 +0000 (Tue, 27 Apr 2010) Log Message: ----------- MAJOR REFACTOR of AccessPoint ServletContext linkage. Tons of code moved around, with a goal of not actually busting Wayback XML Spring configuration too badly.. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/ARCRecordingProxy.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/ARCUnwrappingProxy.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/BaseRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/OpenSearchRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/PathRequestParser.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/FileProxyServlet.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBServlet.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/LiveWebAccessPoint.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/ARCRecordingProxy.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/ARCRecordingProxy.java 2010-04-27 22:45:40 UTC (rev 3080) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/ARCRecordingProxy.java 2010-04-27 22:47:37 UTC (rev 3081) @@ -33,13 +33,13 @@ import org.apache.commons.httpclient.URIException; import org.apache.log4j.Logger; -import org.archive.wayback.webapp.ServletRequestContext; +import org.archive.wayback.util.webapp.AbstractRequestHandler; /** * @author brad * */ -public class ARCRecordingProxy extends ServletRequestContext { +public class ARCRecordingProxy extends AbstractRequestHandler { private final static String EXPIRES_HEADER = "Expires"; private long expiresMS = 60 * 60 * 1000; @@ -52,10 +52,7 @@ private ARCCacheDirectory arcCacheDir = null; private URLtoARCCacher cacher = null; - /* (non-Javadoc) - * @see org.archive.wayback.webapp.ServletRequestContext#handleRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) - */ - @Override + public boolean handleRequest(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws ServletException, IOException { Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/ARCUnwrappingProxy.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/ARCUnwrappingProxy.java 2010-04-27 22:45:40 UTC (rev 3080) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/liveweb/ARCUnwrappingProxy.java 2010-04-27 22:47:37 UTC (rev 3081) @@ -40,7 +40,7 @@ import org.apache.commons.httpclient.methods.GetMethod; import org.archive.io.arc.ARCRecord; import org.archive.wayback.util.ByteOp; -import org.archive.wayback.webapp.ServletRequestContext; +import org.archive.wayback.util.webapp.AbstractRequestHandler; /** * @@ -54,7 +54,7 @@ * @author brad * */ -public class ARCUnwrappingProxy extends ServletRequestContext { +public class ARCUnwrappingProxy extends AbstractRequestHandler { private MultiThreadedHttpConnectionManager connectionManager = null; private HostConfiguration hostConfiguration = null; @@ -66,13 +66,6 @@ hostConfiguration = new HostConfiguration(); } -// protected HttpClient http = new HttpClient( -// new MultiThreadedHttpConnectionManager()); - - /* (non-Javadoc) - * @see org.archive.wayback.webapp.ServletRequestContext#handleRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) - */ - @Override public boolean handleRequest(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws ServletException, IOException { @@ -81,7 +74,6 @@ if(query != null) { sb.append("?").append(query); } -// URL url = new URL(sb.toString()); HttpMethod method = new GetMethod(sb.toString()); // method.addRequestHeader("User-Agent", userAgent); boolean got200 = false; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/BaseRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/BaseRequestParser.java 2010-04-27 22:45:40 UTC (rev 3080) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/BaseRequestParser.java 2010-04-27 22:47:37 UTC (rev 3081) @@ -78,34 +78,6 @@ AccessPoint wbContext) throws BadQueryException, BetterRequestException; - protected static String getMapParam(Map<String,String[]> queryMap, - String field) { - String arr[] = queryMap.get(field); - if (arr == null || arr.length == 0) { - return null; - } - return arr[0]; - } - - protected static String getRequiredMapParam(Map<String,String[]> queryMap, - String field) - throws BadQueryException { - String value = getMapParam(queryMap,field); - if(value == null) { - throw new BadQueryException("missing field " + field); - } - if(value.length() == 0) { - throw new BadQueryException("empty field " + field); - } - return value; - } - - protected static String getMapParamOrEmpty(Map<String,String[]> map, - String param) { - String val = getMapParam(map,param); - return (val == null) ? "" : val; - } - /** * @return the maxRecords to use with this RequestParser, when not specified * by the client request Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java 2010-04-27 22:45:40 UTC (rev 3080) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/FormRequestParser.java 2010-04-27 22:47:37 UTC (rev 3081) @@ -59,7 +59,7 @@ * WaybackRequest object, except the Submit button argument. */ public WaybackRequest parse(HttpServletRequest httpRequest, - AccessPoint wbContext) { + AccessPoint accessPoint) { WaybackRequest wbRequest = null; @SuppressWarnings("unchecked") @@ -67,7 +67,7 @@ if(queryMap.size() > 0) { wbRequest = new WaybackRequest(); - String base = wbContext.translateRequestPath(httpRequest); + String base = accessPoint.translateRequestPath(httpRequest); if(base.startsWith(REPLAY_BASE)) { wbRequest.setReplayRequest(); } else if(base.startsWith(QUERY_BASE)) { @@ -88,7 +88,7 @@ continue; } // just jam everything else in: - String val = getMapParam(queryMap,key); + String val = AccessPoint.getMapParam(queryMap,key); wbRequest.put(key,val); } String partialTS = wbRequest.getReplayTimestamp(); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/OpenSearchRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/OpenSearchRequestParser.java 2010-04-27 22:45:40 UTC (rev 3080) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/OpenSearchRequestParser.java 2010-04-27 22:47:37 UTC (rev 3081) @@ -88,7 +88,7 @@ WaybackRequest wbRequest = null; @SuppressWarnings("unchecked") Map<String,String[]> queryMap = httpRequest.getParameterMap(); - String query = getMapParam(queryMap, SEARCH_QUERY); + String query = AccessPoint.getMapParam(queryMap, SEARCH_QUERY); if(query == null) { return null; } @@ -107,8 +107,8 @@ return null; } - String numResults = getMapParam(queryMap, SEARCH_RESULTS); - String startPage = getMapParam(queryMap, START_PAGE); + String numResults = AccessPoint.getMapParam(queryMap, SEARCH_RESULTS); + String startPage = AccessPoint.getMapParam(queryMap, START_PAGE); if (numResults != null) { int nr = Integer.parseInt(numResults); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/PathRequestParser.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/PathRequestParser.java 2010-04-27 22:45:40 UTC (rev 3080) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/requestparser/PathRequestParser.java 2010-04-27 22:47:37 UTC (rev 3081) @@ -33,7 +33,7 @@ /** * Subclass of RequestParser that acquires key request information from the - * path component following the wayback context. + * path component within the handling AccessPoint. * * @author brad * @version $Date$, $Revision$ @@ -41,43 +41,35 @@ public abstract class PathRequestParser extends WrappedRequestParser { /** - * @param wrapped + * @param wrapped the BaseRequestParser being wrapped */ public PathRequestParser(BaseRequestParser wrapped) { super(wrapped); } /** - * @param requestPath - * @param acessPoint - * @return WaybackRequest with information parsed from the requestPath, or - * null if information could not be extracted. - * @throws BetterRequestException - */ + * attempt to transform an incoming HttpServletRequest into a + * WaybackRequest object. returns null if there is missing information. + * + * @param requestPath the AccessPoint relative path as received by the + * AccessPoint + * @param accessPoint AccessPoint which is attempting to parse the request + * @return populated WaybackRequest object if successful, null otherwise. + * @throws BadQueryException if the request could match this AccessPoint, + * but is malformed: invalid datespec, URL, or flags + * @throws BetterRequestException if the request should be redirected to + * provide better user feedback (corrected URL/date in address bar) + */ public abstract WaybackRequest parse(String requestPath, - AccessPoint acessPoint) throws BetterRequestException; + AccessPoint accessPoint) throws BetterRequestException, + BadQueryException; - /* (non-Javadoc) - * @see org.archive.wayback.requestparser.BaseRequestParser#parse(javax.servlet.http.HttpServletRequest, org.archive.wayback.webapp.WaybackContext) - */ - @Override public WaybackRequest parse(HttpServletRequest httpRequest, - AccessPoint acessPoint) + AccessPoint accessPoint) throws BadQueryException, BetterRequestException { - String queryString = httpRequest.getQueryString(); - String origRequestPath = httpRequest.getRequestURI(); - - if (queryString != null) { - origRequestPath += "?" + queryString; - } - String contextPath = acessPoint.getContextPath(httpRequest); - if (!origRequestPath.startsWith(contextPath)) { - return null; - } - String requestPath = origRequestPath.substring(contextPath.length()); - - WaybackRequest wbRequest = parse(requestPath, acessPoint); + String requestPath = accessPoint.translateRequestPathQuery(httpRequest); + WaybackRequest wbRequest = parse(requestPath, accessPoint); if(wbRequest != null) { wbRequest.setResultsPerPage(getMaxRecords()); } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/FileProxyServlet.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/FileProxyServlet.java 2010-04-27 22:45:40 UTC (rev 3080) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/FileProxyServlet.java 2010-04-27 22:47:37 UTC (rev 3081) @@ -45,7 +45,7 @@ import org.archive.util.anvl.ANVLRecord; import org.archive.wayback.util.http.HttpRequestMessage; import org.archive.wayback.util.http.HttpResponse; -import org.archive.wayback.webapp.ServletRequestContext; +import org.archive.wayback.util.webapp.AbstractRequestHandler; /** * ServletRequestContext interface which uses a ResourceFileLocationDB to @@ -56,7 +56,7 @@ * @author brad * @version $Date$, $Revision$ */ -public class FileProxyServlet extends ServletRequestContext { +public class FileProxyServlet extends AbstractRequestHandler { private static final Logger LOGGER = Logger.getLogger(FileProxyServlet.class .getName()); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBServlet.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBServlet.java 2010-04-27 22:45:40 UTC (rev 3080) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/resourcestore/locationdb/ResourceFileLocationDBServlet.java 2010-04-27 22:47:37 UTC (rev 3081) @@ -34,7 +34,8 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.archive.wayback.webapp.ServletRequestContext; +import org.archive.wayback.exception.BadQueryException; +import org.archive.wayback.util.webapp.AbstractRequestHandler; /** * ServletRequestContext enabling remote HTTP GET/POST access to a local @@ -44,7 +45,7 @@ * @author brad * @version $Date$, $Revision$ */ -public class ResourceFileLocationDBServlet extends ServletRequestContext { +public class ResourceFileLocationDBServlet extends AbstractRequestHandler { protected static final String OPERATION_ARGUMENT = "operation"; protected static final String NAME_ARGUMENT = "name"; @@ -77,18 +78,22 @@ e.printStackTrace(); httpResponse.sendError(HttpServletResponse.SC_BAD_REQUEST, e.getMessage()); + } catch(BadQueryException e) { + e.printStackTrace(); + httpResponse.sendError(HttpServletResponse.SC_BAD_REQUEST, + e.getMessage()); } return true; } private String handleOperation(Map<String,String[]> queryMap) - throws ParseException { + throws ParseException, BadQueryException { - String operation = getRequiredMapParam(queryMap, OPERATION_ARGUMENT); + String operation = AbstractRequestHandler.getRequiredMapParam(queryMap, OPERATION_ARGUMENT); String message; try { if (operation.equals(LOOKUP_OPERATION)) { - String name = getRequiredMapParam(queryMap, NAME_ARGUMENT); + String name = AbstractRequestHandler.getRequiredMapParam(queryMap, NAME_ARGUMENT); message = NO_LOCATION_PREFIX + " " + name; String arcUrls[] = locationDB.nameToUrls(name); @@ -107,8 +112,8 @@ } else if (operation.equals(GETRANGE_OPERATION)) { - long start = Long.parseLong(getRequiredMapParam(queryMap, START_ARGUMENT)); - long end = Long.parseLong(getRequiredMapParam(queryMap, END_ARGUMENT)); + long start = Long.parseLong(AbstractRequestHandler.getRequiredMapParam(queryMap, START_ARGUMENT)); + long end = Long.parseLong(AbstractRequestHandler.getRequiredMapParam(queryMap, END_ARGUMENT)); Iterator<String> itr = locationDB.getNamesBetweenMarks(start,end); StringBuilder str = new StringBuilder(); str.append("OK "); @@ -120,8 +125,8 @@ } else { - String name = getRequiredMapParam(queryMap, NAME_ARGUMENT); - String url = getRequiredMapParam(queryMap, URL_ARGUMENT); + String name = AbstractRequestHandler.getRequiredMapParam(queryMap, NAME_ARGUMENT); + String url = AbstractRequestHandler.getRequiredMapParam(queryMap, URL_ARGUMENT); if (operation.equals(ADD_OPERATION)) { locationDB.addNameUrl(name, url); Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java 2010-04-27 22:45:40 UTC (rev 3080) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/AccessPoint.java 2010-04-27 22:47:37 UTC (rev 3081) @@ -40,7 +40,6 @@ import org.archive.wayback.ReplayRenderer; import org.archive.wayback.RequestParser; import org.archive.wayback.ResultURIConverter; -import org.archive.wayback.WaybackConstants; import org.archive.wayback.accesscontrol.ExclusionFilterFactory; import org.archive.wayback.core.CaptureSearchResult; import org.archive.wayback.core.CaptureSearchResults; @@ -58,7 +57,8 @@ import org.archive.wayback.exception.WaybackException; import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.util.operator.BooleanOperator; -import org.springframework.beans.factory.BeanNameAware; +import org.archive.wayback.util.webapp.AbstractRequestHandler; +import org.archive.wayback.util.webapp.ShutdownListener; /** * Retains all information about a particular Wayback configuration @@ -77,265 +77,38 @@ * @author brad * @version $Date$, $Revision$ */ -public class AccessPoint implements RequestContext, BeanNameAware { +public class AccessPoint extends AbstractRequestHandler +implements ShutdownListener { private static final Logger LOGGER = Logger.getLogger( AccessPoint.class.getName()); - private String liveWebPrefix = null; - - private boolean useServerName = false; - private boolean useAnchorWindow = false; - private boolean exactSchemeMatch = true; private boolean exactHostMatch = false; + private boolean exactSchemeMatch = true; + private boolean useAnchorWindow = false; + private boolean useServerName = false; - private int contextPort = 0; - private String contextName = null; - private String beanName = null; - private WaybackCollection collection = null; - private ReplayDispatcher replay = null; - private ExceptionRenderer exception = new BaseExceptionRenderer(); - private QueryRenderer query = null; - private RequestParser parser = null; - private ResultURIConverter uriConverter = null; - private Properties configs = null; - private ExclusionFilterFactory exclusionFactory = null; - private BooleanOperator<WaybackRequest> authentication = null; + private String liveWebPrefix = null; private String urlRoot = null; + private Locale locale = null; + + private Properties configs = null; + private List<String> filePatterns = null; private List<String> filePrefixes = null; - - /** - * @return List of file patterns that will be matched when querying the - * ResourceIndex - */ - public List<String> getFilePatterns() { - return filePatterns; - } - /** - * @param filePatterns List of file Patterns (regular expressions) that - * will be matched when querying the ResourceIndex - only SearchResults - * matching one of these patterns will be returned. - */ - public void setFilePatterns(List<String> filePatterns) { - this.filePatterns = filePatterns; - } + private WaybackCollection collection = null; + private ExceptionRenderer exception = new BaseExceptionRenderer(); + private QueryRenderer query = null; + private RequestParser parser = null; + private ReplayDispatcher replay = null; + private ResultURIConverter uriConverter = null; - /** - * @return List of file String prefixes that will be matched when querying - * the ResourceIndex - */ - public List<String> getFilePrefixes() { - return filePrefixes; - } - - /** - * @param filePrefixes List of String file prefixes that will be matched - * when querying the ResourceIndex - only SearchResults from files - * with a prefix matching one of those in this List will be returned. - */ - public void setFilePrefixes(List<String> filePrefixes) { - this.filePrefixes = filePrefixes; - } - - /** - * @return the contextName - */ - public String getContextName() { - return contextName; - } - - /** - * @return the replay - */ - public ReplayDispatcher getReplay() { - return replay; - } - - /** - * @return the query - */ - public QueryRenderer getQuery() { - return query; - } - - /** - * @return the parser - */ - public RequestParser getParser() { - return parser; - } - - /** - * @return the uriConverter - */ - public ResultURIConverter getUriConverter() { - return uriConverter; - } - - /** - * @return explicit Locale to use within this AccessPoint. - */ - public Locale getLocale() { - return locale; - } - - /** - * @param locale explicit Locale to use for requests within this - * AccessPoint. If not set, will attempt to use the one specified by - * each requests User Agent via HTTP headers - */ - public void setLocale(Locale locale) { - this.locale = locale; - } - - /** - * - */ - public AccessPoint() { - - } + private ExclusionFilterFactory exclusionFactory = null; + private BooleanOperator<WaybackRequest> authentication = null; - /* (non-Javadoc) - * @see org.springframework.beans.factory.BeanNameAware#setBeanName(java.lang.String) - */ - public void setBeanName(String beanName) { - this.beanName = beanName; - this.contextName = ""; - int idx = beanName.indexOf(":"); - if(idx > -1) { - contextPort = Integer.valueOf(beanName.substring(0,idx)); - contextName = beanName.substring(idx + 1); - } else { - try { - this.contextPort = Integer.valueOf(beanName); - } catch(NumberFormatException e) { - e.printStackTrace(); - } - } - } - /** - * @return the name of the bean in the Spring configuration which defined - * this AccessPoint. - */ - public String getBeanName() { - return beanName; - } - /** - * @param httpRequest HttpServletRequest which is being handled - * @return the prefix of paths received by this server that are handled by - * this WaybackContext, including the trailing '/' - */ - public String getContextPath(HttpServletRequest httpRequest) { - String httpContextPath = httpRequest.getContextPath(); - if(contextName.length() == 0) { - return httpContextPath + "/"; - } - return httpContextPath + "/" + contextName + "/"; - } - /** - * Remove any leading ServletContext and AccessPoint name path elements - * from the incoming request path, returning the result as a String - * - * @param httpRequest HttpServletRequest which is being handled - * @param includeQuery if true, include any query arguments - * @return the portion of the request following the path to this context - * without leading '/' - */ - protected String translateRequest(HttpServletRequest httpRequest, - boolean includeQuery) { - - String origRequestPath = httpRequest.getRequestURI(); - if(includeQuery) { - String queryString = httpRequest.getQueryString(); - if (queryString != null) { - origRequestPath += "?" + queryString; - } - } - String contextPath = getContextPath(httpRequest); - if (!origRequestPath.startsWith(contextPath)) { - if(contextPath.startsWith(origRequestPath)) { - // missing trailing '/', just omit: - return ""; - } - return null; - } - return origRequestPath.substring(contextPath.length()); - } - - /** - * Remove any leading ServletContext and AccessPoint name path elements - * from the incoming request path, returning the result as a String - - * @param httpRequest HttpServletRequest which is being handled - * @return the portion of the request following the path to this context, - * including any query information,without leading '/' - */ - public String translateRequestPathQuery(HttpServletRequest httpRequest) { - return translateRequest(httpRequest,true); - } - - /** - * @param httpRequest HttpServletRequest which is being handled - * @return the portion of the request following the path to this context, - * excluding any query information, without leading '/' - */ - public String translateRequestPath(HttpServletRequest httpRequest) { - return translateRequest(httpRequest,false); - } - - /** - * Construct an absolute URL that points to the root of the context that - * received the request, including a trailing "/". - * - * @return String absolute URL pointing to the Context root where the - * request was received. - */ - private String getAbsoluteContextPrefix(HttpServletRequest httpRequest, - boolean useRequestServer) { - - StringBuilder prefix = new StringBuilder(); - prefix.append(WaybackConstants.HTTP_URL_PREFIX); - String waybackPort = null; - if(useRequestServer) { - prefix.append(httpRequest.getLocalName()); - waybackPort = String.valueOf(httpRequest.getLocalPort()); - } else { - prefix.append(httpRequest.getServerName()); - waybackPort = String.valueOf(httpRequest.getServerPort()); - } - if (!waybackPort.equals(WaybackConstants.HTTP_DEFAULT_PORT)) { - prefix.append(":").append(waybackPort); - } - String contextPath = getContextPath(httpRequest); - prefix.append(contextPath); - return prefix.toString(); - } - - /** - * @param httpRequest HttpServletRequest which is being handled - * @return absolute URL pointing to the base of this WaybackContext, using - * Server and port information from the HttpServletRequest argument. - */ - public String getAbsoluteServerPrefix(HttpServletRequest httpRequest) { - return getAbsoluteContextPrefix(httpRequest, true); - } - - /** - * @param httpRequest HttpServletRequest which is being handled - * @return absolute URL pointing to the base of this WaybackContext, using - * Canonical server and port information. - */ - public String getAbsoluteLocalPrefix(HttpServletRequest httpRequest) { - if(urlRoot != null) { - return urlRoot; - } - return getAbsoluteContextPrefix(httpRequest, useServerName); - } - protected boolean dispatchLocal(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws ServletException, IOException { @@ -343,7 +116,7 @@ String translated = "/" + translateRequestPathQuery(httpRequest); WaybackRequest wbRequest = new WaybackRequest(); - wbRequest.setContextPrefix(getAbsoluteLocalPrefix(httpRequest)); + wbRequest.setContextPrefix(getUrlRoot()); wbRequest.setAccessPoint(this); wbRequest.fixup(httpRequest); UIResults uiResults = new UIResults(wbRequest,uriConverter); @@ -355,7 +128,7 @@ } return false; } - + /** * @param httpRequest HttpServletRequest which is being handled * @param httpResponse HttpServletResponse which is being handled @@ -371,25 +144,28 @@ boolean handled = false; try { - wbRequest = parser.parse(httpRequest, this); + wbRequest = getParser().parse(httpRequest, this); if(wbRequest != null) { handled = true; // TODO: refactor this code into RequestParser implementations wbRequest.setAccessPoint(this); - wbRequest.setContextPrefix(getAbsoluteLocalPrefix(httpRequest)); +// wbRequest.setContextPrefix(getAbsoluteLocalPrefix(httpRequest)); + wbRequest.setContextPrefix(getUrlRoot()); wbRequest.fixup(httpRequest); // end of refactor - if(authentication != null) { - if(!authentication.isTrue(wbRequest)) { - throw new AuthenticationControlException("Not authorized"); + if(getAuthentication() != null) { + if(!getAuthentication().isTrue(wbRequest)) { + throw new AuthenticationControlException( + "Unauthorized"); } } - if(exclusionFactory != null) { - ExclusionFilter exclusionFilter = exclusionFactory.get(); + if(getExclusionFactory() != null) { + ExclusionFilter exclusionFilter = + getExclusionFactory().get(); if(exclusionFilter == null) { throw new AdministrativeAccessControlException( "AccessControl list unavailable"); @@ -399,8 +175,8 @@ // TODO: refactor this into RequestParser implementations, so a // user could alter requests to change the behavior within a // single AccessPoint. For now, this is a simple way to expose - // the feature to configuration. - wbRequest.setExactScheme(exactSchemeMatch); + // the feature to configuration.g + wbRequest.setExactScheme(isExactSchemeMatch()); if(wbRequest.isReplayRequest()) { @@ -408,7 +184,7 @@ } else { - wbRequest.setExactHost(exactHostMatch); + wbRequest.setExactHost(isExactHostMatch()); handleQuery(wbRequest,httpRequest,httpResponse); } } else { @@ -422,20 +198,34 @@ } catch(WaybackException e) { boolean drawError = true; if(e instanceof ResourceNotInArchiveException) { - if(liveWebPrefix != null) { - String liveUrl = liveWebPrefix + wbRequest.getRequestUrl(); + if(getLiveWebPrefix() != null) { + String liveUrl = + getLiveWebPrefix() + wbRequest.getRequestUrl(); httpResponse.sendRedirect(liveUrl); drawError = false; } } if(drawError) { logNotInArchive(e,wbRequest); - exception.renderException(httpRequest, httpResponse, wbRequest, e, - uriConverter); + getException().renderException(httpRequest, httpResponse, + wbRequest, e, getUriConverter()); } } return handled; } + + private void logNotInArchive(WaybackException e, WaybackRequest r) { + // TODO: move this into ResourceNotInArchiveException constructor + if(e instanceof ResourceNotInArchiveException) { + String url = r.getRequestUrl(); + StringBuilder sb = new StringBuilder(100); + sb.append("NotInArchive\t"); + sb.append(getUrlRoot()).append("\t"); + sb.append(url); + + LOGGER.info(sb.toString()); + } + } private void handleReplay(WaybackRequest wbRequest, HttpServletRequest httpRequest, HttpServletResponse httpResponse) @@ -443,24 +233,31 @@ Resource resource = null; try { PerformanceLogger p = new PerformanceLogger("replay"); - SearchResults results = collection.getResourceIndex().query(wbRequest); + SearchResults results = + getCollection().getResourceIndex().query(wbRequest); p.queried(); if(!(results instanceof CaptureSearchResults)) { throw new ResourceNotAvailableException("Bad results..."); } - CaptureSearchResults captureResults = (CaptureSearchResults) results; + CaptureSearchResults captureResults = + (CaptureSearchResults) results; // TODO: check which versions are actually accessible right now? CaptureSearchResult closest = captureResults.getClosest(wbRequest, - useAnchorWindow); + isUseAnchorWindow()); closest.setClosest(true); - resource = collection.getResourceStore().retrieveResource(closest); + resource = + getCollection().getResourceStore().retrieveResource(closest); p.retrieved(); - ReplayRenderer renderer = replay.getRenderer(wbRequest, closest, resource); + ReplayRenderer renderer = + getReplay().getRenderer(wbRequest, closest, resource); + renderer.renderResource(httpRequest, httpResponse, wbRequest, - closest, resource, uriConverter, captureResults); + closest, resource, getUriConverter(), captureResults); + p.rendered(); - p.write(wbRequest.getReplayTimestamp() + " " + wbRequest.getRequestUrl()); + p.write(wbRequest.getReplayTimestamp() + " " + + wbRequest.getRequestUrl()); } finally { if(resource != null) { resource.close(); @@ -473,18 +270,19 @@ throws ServletException, IOException, WaybackException { PerformanceLogger p = new PerformanceLogger("query"); - SearchResults results = collection.getResourceIndex().query(wbRequest); + SearchResults results = + getCollection().getResourceIndex().query(wbRequest); p.queried(); if(results instanceof CaptureSearchResults) { CaptureSearchResults cResults = (CaptureSearchResults) results; cResults.markClosest(wbRequest); - query.renderCaptureResults(httpRequest,httpResponse,wbRequest, - cResults,uriConverter); + getQuery().renderCaptureResults(httpRequest,httpResponse,wbRequest, + cResults,getUriConverter()); } else if(results instanceof UrlSearchResults) { UrlSearchResults uResults = (UrlSearchResults) results; - query.renderUrlResults(httpRequest,httpResponse,wbRequest, - uResults,uriConverter); + getQuery().renderUrlResults(httpRequest,httpResponse,wbRequest, + uResults,getUriConverter()); } else { throw new WaybackException("Unknown index format"); } @@ -492,172 +290,199 @@ p.write(wbRequest.getRequestUrl()); } + /** * Release any resources associated with this AccessPoint, including * stopping any background processing threads - * - * @throws IOException per usual */ - public void shutdown() throws IOException { + public void shutdown() { if(collection != null) { - collection.shutdown(); + try { + collection.shutdown(); + } catch (IOException e) { + LOGGER.error("FAILED collection shutdown", e); + } } if(exclusionFactory != null) { exclusionFactory.shutdown(); } } - private void logNotInArchive(WaybackException e, WaybackRequest r) { - // TODO: move this into ResourceNotInArchiveException constructor - if(e instanceof ResourceNotInArchiveException) { - String url = r.getRequestUrl(); - StringBuilder sb = new StringBuilder(100); - sb.append("NotInArchive\t"); - sb.append(contextName).append("\t"); - sb.append(contextPort).append("\t"); - sb.append(url); - - LOGGER.info(sb.toString()); - } + /* + * ******************************************************************* + * ******************************************************************* + * + * ALL GETTER/SETTER BELOW HERE + * + * ******************************************************************* + * ******************************************************************* + */ + + /** + * @return the exactHostMatch + */ + public boolean isExactHostMatch() { + return exactHostMatch; } /** - * @param contextPort the contextPort to set + * @param exactHostMatch if true, then only SearchResults exactly matching + * the requested hostname will be returned from this AccessPoint. If + * false, then hosts which canonicalize to the same host as requested + * hostname will be returned (www.) */ - public void setContextPort(int contextPort) { - this.contextPort = contextPort; + public void setExactHostMatch(boolean exactHostMatch) { + this.exactHostMatch = exactHostMatch; } /** - * @param contextName the contextName to set + * @return the exactSchemeMatch */ - public void setContextName(String contextName) { - this.contextName = contextName; + public boolean isExactSchemeMatch() { + return exactSchemeMatch; } /** - * @param replay the replay to set + * @param exactSchemeMatch the exactSchemeMatch to set */ - public void setReplay(ReplayDispatcher replay) { - this.replay = replay; + public void setExactSchemeMatch(boolean exactSchemeMatch) { + this.exactSchemeMatch = exactSchemeMatch; } /** - * @param query the query to set + * @return true if this AccessPoint is configured to useAnchorWindow, that + * is, to replay documents only if they are within a certain proximity to + * the users requested AnchorDate */ - public void setQuery(QueryRenderer query) { - this.query = query; + public boolean isUseAnchorWindow() { + return useAnchorWindow; } /** - * @param parser the parser to set + * @param useAnchorWindow , when set to true, causes this AccessPoint to + * only replay documents if they are within a certain proximity to + * the users requested AnchorDate */ - public void setParser(RequestParser parser) { - this.parser = parser; + public void setUseAnchorWindow(boolean useAnchorWindow) { + this.useAnchorWindow = useAnchorWindow; } /** - * @param uriConverter the uriConverter to set + * @return the useServerName + * @deprecated no longer used, use urlPrefix */ - public void setUriConverter(ResultURIConverter uriConverter) { - this.uriConverter = uriConverter; + public boolean isUseServerName() { + return useServerName; } - /** - * @return the contextPort + * @param useServerName the useServerName to set + * @deprecated no longer used, use urlPrefix */ - public int getContextPort() { - return contextPort; + public void setUseServerName(boolean useServerName) { + this.useServerName = useServerName; } /** - * @return the configs + * @return the liveWebPrefix String to use, or null, if this AccessPoint + * does not use the Live Web to fill in documents missing from the archive */ - public Properties getConfigs() { - return configs; + public String getLiveWebPrefix() { + return liveWebPrefix; } /** - * @param configs the configs to set + * @param liveWebPrefix the String URL prefix to use to attempt to retrieve + * documents missing from the collection from the live web, on demand. */ - public void setConfigs(Properties configs) { - this.configs = configs; + public void setLiveWebPrefix(String liveWebPrefix) { + this.liveWebPrefix = liveWebPrefix; } /** - * @return the useServerName + * @return the String url prefix to use when generating self referencing + * URLs */ - public boolean isUseServerName() { - return useServerName; + public String getUrlRoot() { + return urlRoot; } /** - * @param useServerName the useServerName to set + * @param urlRoot explicit URL prefix to use when creating self referencing + * URLs */ - public void setUseServerName(boolean useServerName) { - this.useServerName = useServerName; + public void setUrlRoot(String urlRoot) { + this.urlRoot = urlRoot; } /** - * @return the useAnchorWindow + * @return explicit Locale to use within this AccessPoint. */ - public boolean isUseAnchorWindow() { - return useAnchorWindow; + public Locale getLocale() { + return locale; } /** - * @param useAnchorWindow the useAnchorWindow to set + * @param locale explicit Locale to use for requests within this + * AccessPoint. If not set, will attempt to use the one specified by + * each requests User Agent via HTTP headers */ - public void setUseAnchorWindow(boolean useAnchorWindow) { - this.useAnchorWindow = useAnchorWindow; + public void setLocale(Locale locale) { + this.locale = locale; } - + /** - * @return the exactSchemeMatch + * @return the generic customization Properties used with this AccessPoint, + * generally to tune the UI */ - public boolean isExactSchemeMatch() { - return exactSchemeMatch; + public Properties getConfigs() { + return configs; } /** - * @param exactSchemeMatch the exactSchemeMatch to set + * @param configs the generic customization Properties to use with this + * AccessPoint, generally used to tune the UI */ - public void setExactSchemeMatch(boolean exactSchemeMatch) { - this.exactSchemeMatch = exactSchemeMatch; + public void setConfigs(Properties configs) { + this.configs = configs; } /** - * @return the ExclusionFilterFactory in use with this AccessPoint + * @return List of file patterns that will be matched when querying the + * ResourceIndex */ - public ExclusionFilterFactory getExclusionFactory() { - return exclusionFactory; + public List<String> getFilePatterns() { + return filePatterns; } /** - * @param exclusionFactory all requests to this AccessPoint will create an - * exclusionFilter from this factory when handling requests + * @param filePatterns List of file Patterns (regular expressions) that + * will be matched when querying the ResourceIndex - only SearchResults + * matching one of these patterns will be returned. */ - public void setExclusionFactory(ExclusionFilterFactory exclusionFactory) { - this.exclusionFactory = exclusionFactory; + public void setFilePatterns(List<String> filePatterns) { + this.filePatterns = filePatterns; } /** - * @return the configured AuthenticationControl operator in use with this - * AccessPoint. + * @return List of file String prefixes that will be matched when querying + * the ResourceIndex */ - public BooleanOperator<WaybackRequest> getAuthentication() { - return authentication; + public List<String> getFilePrefixes() { + return filePrefixes; } /** - * @param authentication the BooleanOperator which determines if incoming - * requests are allowed to connect to this AccessPoint. + * @param filePrefixes List of String file prefixes that will be matched + * when querying the ResourceIndex - only SearchResults from files + * with a prefix matching one of those in this List will be returned. */ - public void setAuthentication(BooleanOperator<WaybackRequest> authentication) { - this.authentication = authentication; + public void setFilePrefixes(List<String> filePrefixes) { + this.filePrefixes = filePrefixes; } + + /** * @return the WaybackCollection used by this AccessPoint */ @@ -687,49 +512,97 @@ } /** - * @return the String url prefix to use when generating self referencing - * URLs + * @return the QueryRenderer to use with this AccessPoint */ - public String getUrlRoot() { - return urlRoot; + public QueryRenderer getQuery() { + return query; } + + /** + * @param query the QueryRenderer responsible for returning query data to + * clients. + */ + public void setQuery(QueryRenderer query) { + this.query = query; + } /** - * @param urlRoot explicit URL prefix to use when creating self referencing - * URLs + * @return the RequestParser used by this AccessPoint to attempt to + * translate incoming HttpServletRequest objects into WaybackRequest + * objects */ - public void setUrlRoot(String urlRoot) { - this.urlRoot = urlRoot; + public RequestParser getParser() { + return parser; } + + /** + * @param parser the RequestParser to use with this AccessPoint + */ + public void setParser(RequestParser parser) { + this.parser = parser; + } /** - * @return the exactHostMatch + * @return the ReplayDispatcher to use with this AccessPoint, responsible + * for returning an appropriate ReplayRenderer given the user request and + * the returned document type. */ - public boolean isExactHostMatch() { - return exactHostMatch; + public ReplayDispatcher getReplay() { + return replay; } /** - * @param exactHostMatch if true, then only SearchResults exactly matching - * the requested hostname will be returned from this AccessPoint. If - * false, then hosts which canonicalize to the same host as requested - * hostname will be returned (www.) + * @param replay the ReplayDispatcher to use with this AccessPoint. */ - public void setExactHostMatch(boolean exactHostMatch) { - this.exactHostMatch = exactHostMatch; + public void setReplay(ReplayDispatcher replay) { + this.replay = replay; } /** - * @return the liveWebPrefix + * @return the ResultURIConverter used to construct Replay URLs within this + * AccessPoint */ - public String getLiveWebPrefix() { - return liveWebPrefix; + public ResultURIConverter getUriConverter() { + return uriConverter; } /** - * @param liveWebPrefix the liveWebPrefix to set + * @param uriConverter the ResultURIConverter to use with this AccessPoint + * to construct Replay URLs */ - public void setLiveWebPrefix(String liveWebPrefix) { - this.liveWebPrefix = liveWebPrefix; + public void setUriConverter(ResultURIConverter uriConverter) { + this.uriConverter = uriConverter; } + + + /** + * @return the ExclusionFilterFactory in use with this AccessPoint + */ + public ExclusionFilterFactory getExclusionFactory() { + return exclusionFactory; + } + + /** + * @param exclusionFactory all requests to this AccessPoint will create an + * exclusionFilter from this factory when handling requests + */ + public void setExclusionFactory(ExclusionFilterFactory exclusionFactory) { + this.exclusionFactory = exclusionFactory; + } + + /** + * @return the configured AuthenticationControl BooleanOperator in use with + * this AccessPoint. + */ + public BooleanOperator<WaybackRequest> getAuthentication() { + return authentication; + } + + /** + * @param auth the BooleanOperator which determines if incoming + * requests are allowed to connect to this AccessPoint. + */ + public void setAuthentication(BooleanOperator<WaybackRequest> auth) { + this.authentication = auth; + } } Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/LiveWebAccessPoint.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/LiveWebAccessPoint.java 2010-04-27 22:45:40 UTC (rev 3080) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/webapp/LiveWebAccessPoint.java 2010-04-27 22:47:37 UTC (rev 3081) @@ -45,84 +45,34 @@ import org.archive.wayback.liveweb.LiveWebCache; import org.archive.wayback.resourceindex.filters.ExclusionFilter; import org.archive.wayback.resourcestore.resourcefile.ArcResource; -import org.springframework.beans.factory.BeanNameAware; +import org.archive.wayback.util.webapp.AbstractRequestHandler; /** * @author brad * - * AccessPoint subclass which allows no Queries, but makes all replay requests - * through a LiveWebCache + * RequestHandler which satisfies all incoming requests through a LiveWebCache, + * using an internal AccessPoint to rewrite replayed documents. * */ -public class LiveWebAccessPoint extends ServletRequestContext implements BeanNameAware { +public class LiveWebAccessPoint extends AbstractRequestHandler { private AccessPoint inner = null; private LiveWebCache cache = null; private RobotExclusionFilterFactory robotFactory = null; private long maxCacheMS = 86400000; - private String beanName = null; - private int contextPort = 0; - private String contextName = null; - public void setBeanName(String beanName) { - this.beanName = beanName; - this.contextName = ""; - int idx = beanName.indexOf(":"); - if(idx > -1) { - contextPort = Integer.valueOf(beanName.substring(0,idx)); - contextName = beanName.substring(idx + 1); - } else { - try { - this.contextPort = Integer.valueOf(beanName); - } catch(NumberFormatException e) { - e.printStackTrace(); - } - } - } - /** - * @param httpRequest HttpServletRequest which is being handled - * @return the prefix of paths received by this server that are handled by - * this WaybackContext, including the trailing '/' - */ - public String getContextPath(HttpServletRequest httpRequest) { - String httpContextPath = httpRequest.getContextPath(); - if(contextName.length() == 0) { - return httpContextPath + "/"; - } - return httpContextPath + "/" + contextName + "/"; - } - - - protected String translateRequest(HttpServletRequest httpRequest, - boolean includeQuery) { - - String origRequestPath = httpRequest.getRequestURI(); - if(includeQuery) { - String queryString = httpRequest.getQueryString(); - if (queryString != null) { - origRequestPath += "?" + queryString; - } - } - String contextPath = getContextPath(httpRequest); - if (!origRequestPath.startsWith(contextPath)) { - if(contextPath.startsWith(origRequestPath)) { - // missing trailing '/', just omit: - return ""; - } - return null; - } - return origRequestPath.substring(contextPath.length()); - } - public boolean handleRequest(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws ServletException, IOException { - String urlString = translateRequest(httpRequest,true); + String urlString = translateRequestPathQuery(httpRequest); + boolean handled = true; WaybackRequest wbRequest = new WaybackRequest(); wbRequest.setAccessPoint(inner); - wbRequest.setContextPrefix(inner.getAbsoluteServerPrefix(httpRequest)); - wbRequest.setServerPrefix(inner.getAbsoluteServerPrefix(httpRequest)); + + wbRequest.setContextPrefix(inner.getUrlRoot()); + wbRequest.setServerPrefix(inner.getUrlRoot()); + wbRequest.setLiveWebRequest(true); wbRequest.setRequestUrl(urlString); URL url = null; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <bra...@us...> - 2010-05-18 23:19:10
|
Revision: 3111 http://archive-access.svn.sourceforge.net/archive-access/?rev=3111&view=rev Author: bradtofel Date: 2010-05-18 23:19:04 +0000 (Tue, 18 May 2010) Log Message: ----------- BUGFIX: needed to add 'CDATA' to legal HEAD tags. Modified Paths: -------------- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/FastArchivalUrlReplayParseEventHandler.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/AfterBodyStartTagJSPExecRule.java Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/FastArchivalUrlReplayParseEventHandler.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/FastArchivalUrlReplayParseEventHandler.java 2010-05-18 23:06:38 UTC (rev 3110) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/archivalurl/FastArchivalUrlReplayParseEventHandler.java 2010-05-18 23:19:04 UTC (rev 3111) @@ -64,8 +64,8 @@ private String jspInsertPath = "/WEB-INF/replay/DisclaimChooser.jsp"; - private final String[] okHeadTags = { "!DOCTYPE", "HTML", "HEAD", "BASE", - "LINK", "META", "TITLE", "STYLE", "SCRIPT", "BODY" }; + private final String[] okHeadTags = { "![CDATA[*", "!DOCTYPE", "HTML", "HEAD", "BASE", + "LINK", "META", "TITLE", "STYLE", "SCRIPT" }; private HashMap<String, Object> okHeadTagMap = null; private final static String FRAMESET_TAG = "FRAMESET"; private final static String BODY_TAG = "BODY"; Modified: trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/AfterBodyStartTagJSPExecRule.java =================================================================== --- trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/AfterBodyStartTagJSPExecRule.java 2010-05-18 23:06:38 UTC (rev 3110) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/html/rules/AfterBodyStartTagJSPExecRule.java 2010-05-18 23:19:04 UTC (rev 3111) @@ -61,7 +61,8 @@ public class AfterBodyStartTagJSPExecRule extends JSPExecRule implements ReplayParseEventDelegatorVisitor, OpenTagHandler { private final String[] okHeadTags = { - "HTML","HEAD","BASE","LINK","META","TITLE","STYLE","SCRIPT","BODY" + "![CDATA[*", "!DOCTYPE","HTML","HEAD","BASE","LINK","META","TITLE", + "STYLE","SCRIPT" }; private final static String FRAMESET_TAG = "FRAMESET"; private final static String FERRET_DONE_KEY = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |