From: <bra...@us...> - 2009-05-20 02:30:39
|
Revision: 2722 http://archive-access.svn.sourceforge.net/archive-access/?rev=2722&view=rev Author: bradtofel Date: 2009-05-20 02:30:31 +0000 (Wed, 20 May 2009) Log Message: ----------- INITIAL REV: new ReplayRendererSelector implementations which trigger when WaybackRequest context flags are set. Added Paths: ----------- 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/IMGRequestSelector.java trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/JSRequestSelector.java Added: 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/CSSRequestSelector.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/CSSRequestSelector.java 2009-05-20 02:30:31 UTC (rev 2722) @@ -0,0 +1,48 @@ +/* CSSRequestSelector + * + * $Id$ + * + * Created on 2:13:12 PM Feb 12, 2009. + * + * Copyright (C) 2009 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 + * @version $Date$, $Revision$ + */ + +public class CSSRequestSelector 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.isCSSContext(); + } +} Added: 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/IMGRequestSelector.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/IMGRequestSelector.java 2009-05-20 02:30:31 UTC (rev 2722) @@ -0,0 +1,48 @@ +/* IMGRequestSelector + * + * $Id$ + * + * Created on 4:02:56 PM Apr 10, 2009. + * + * Copyright (C) 2009 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 + * @version $Date$, $Revision$ + */ + +public class IMGRequestSelector 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.isIMGContext(); + } +} \ No newline at end of file Added: 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/JSRequestSelector.java (rev 0) +++ trunk/archive-access/projects/wayback/wayback-core/src/main/java/org/archive/wayback/replay/selector/JSRequestSelector.java 2009-05-20 02:30:31 UTC (rev 2722) @@ -0,0 +1,49 @@ +/* JSRequestSelector + * + * $Id$ + * + * Created on 2:14:14 PM Feb 12, 2009. + * + * Copyright (C) 2009 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 + * @version $Date$, $Revision$ + */ + +public class JSRequestSelector 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.isJSContext(); + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |