From: Brad <bra...@us...> - 2005-11-16 03:11:38
|
Update of /cvsroot/archive-access/archive-access/projects/wayback/src/java/org/archive/wayback/exception In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30992/src/java/org/archive/wayback/exception Modified Files: WaybackException.java BadQueryException.java Added Files: ConfigurationException.java BetterRequestException.java ResourceNotInArchiveException.java ResourceIndexNotAvailableException.java ResourceNotAvailableException.java Log Message: Massive overhaul decomposing into three main categories of changes: 1) All internal datatypes are now extensible (currently Properties, but should be Maps) including: a) WaybackRequest(was WBRequest) b) SearchResults (was ResourceResults) c) SearchResult (was ResourceResult) d) Resource so that there is no longer an assumption of Archival URL queries, or "CDX-style" index results. This will put more responsiblility on the UI components to interrogate SearchResults to decide how to render, but should enable extension to data returned from Indexes, as well as allow far more flexibility in queries, predominantly geared towards free-text searching. This is still somewhat clunky, as there are no convenience accessor methods, so all users refer to constants when interacting with them. 2) Major cleanup of servlet and filter interaction with servlet container. ReplayUI and QueryUI are now just plain old servlets, and filters can be optionally added to allow non-CGI argument requests to be coerced into standard WaybackRequest objects. 3) Alternate "Proxy" Replay mode is now functional, and some work has been done towards an alternate Nutch ResourceIndex. Currently the web.xml contains example configurations for both Proxy and Archival Url replay modes, but the Proxy related configurations are commented out. Proxy mode *requires* changing the servlet context to ROOT. ArchivalUrl replay mode works as ROOT context and as any (I think) other context. There are some cosmetic double-slashe issues to work out. Index: BadQueryException.java =================================================================== RCS file: /cvsroot/archive-access/archive-access/projects/wayback/src/java/org/archive/wayback/exception/BadQueryException.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BadQueryException.java 19 Oct 2005 01:22:36 -0000 1.2 --- BadQueryException.java 16 Nov 2005 03:11:29 -0000 1.3 *************** *** 43,55 **** */ public BadQueryException(String message) { ! super(message); } ! ! /** ! * @param args ! */ ! public static void main(String[] args) { ! } - } --- 43,50 ---- */ public BadQueryException(String message) { ! super(message,"Bad Query"); } ! public BadQueryException(String message, String details) { ! super(message,"Bad Query",details); } } --- NEW FILE: ResourceNotInArchiveException.java --- package org.archive.wayback.exception; public class ResourceNotInArchiveException extends WaybackException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor * * @param message */ public ResourceNotInArchiveException(String message) { super(message,"Not in Archive"); } public ResourceNotInArchiveException(String message,String details) { super(message,"Not in Archive",details); } } --- NEW FILE: ResourceIndexNotAvailableException.java --- package org.archive.wayback.exception; public class ResourceIndexNotAvailableException extends WaybackException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor * * @param message */ public ResourceIndexNotAvailableException(String message) { super(message,"Index not available"); } public ResourceIndexNotAvailableException(String message, String details) { super(message,"Index not available",details); } } --- NEW FILE: BetterRequestException.java --- /* BetterRequestException * * $Id: BetterRequestException.java,v 1.1 2005/11/16 03:11:29 bradtofel Exp $ * * Created on 6:42:01 PM Oct 31, 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.exception; /** * * * @author brad * @version $Date: 2005/11/16 03:11:29 $, $Revision: 1.1 $ */ public class BetterRequestException extends WaybackException { /** * */ private static final long serialVersionUID = 1L; private String betterURI; /** * Constructor * * @param message */ public BetterRequestException(String betterURI) { super("Better URI for query"); this.betterURI = betterURI; } /** * @return Returns the betterURI. */ public String getBetterURI() { return betterURI; } } Index: WaybackException.java =================================================================== RCS file: /cvsroot/archive-access/archive-access/projects/wayback/src/java/org/archive/wayback/exception/WaybackException.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WaybackException.java 19 Oct 2005 01:22:36 -0000 1.2 --- WaybackException.java 16 Nov 2005 03:11:29 -0000 1.3 *************** *** 36,40 **** */ private static final long serialVersionUID = 1L; ! /** * Constructor --- 36,43 ---- */ private static final long serialVersionUID = 1L; ! private String message = ""; ! private String title = "Wayback Exception"; ! private String details = ""; ! /** * Constructor *************** *** 44,55 **** public WaybackException(String message) { super(message); } ! /** ! * @param args */ ! public static void main(String[] args) { } } --- 47,85 ---- public WaybackException(String message) { super(message); + this.message = message; } ! ! public WaybackException(String message, String title) { ! super(message); ! this.message = message; ! this.title= title; ! } ! ! public WaybackException(String message, String title, String details) { ! super(message); ! this.message = message; ! this.title= title; ! this.details = details; ! } ! /** ! * @return Returns the title. */ ! public String getTitle() { ! return title; ! } + /** + * @return Returns the message. + */ + public String getMessage() { + return message; } + /** + * @return Returns the details. + */ + public String getDetails() { + return details; + } } --- NEW FILE: ResourceNotAvailableException.java --- package org.archive.wayback.exception; public class ResourceNotAvailableException extends WaybackException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor * * @param message */ public ResourceNotAvailableException(String message) { super(message,"Resource not available"); } public ResourceNotAvailableException(String message,String details) { super(message,"Resource not available",details); } } --- NEW FILE: ConfigurationException.java --- /* ConfigurationException * * $Id: ConfigurationException.java,v 1.1 2005/11/16 03:11:29 bradtofel Exp $ * * Created on 6:35:13 PM Oct 31, 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.exception; /** * * * @author brad * @version $Date: 2005/11/16 03:11:29 $, $Revision: 1.1 $ */ public class ConfigurationException extends WaybackException { /** * */ private static final long serialVersionUID = 1L; /** * Constructor * * @param message */ public ConfigurationException(String message) { super(message,"Configuration Error"); } public ConfigurationException(String message, String details) { super(message,"Configuration Error",details); } } |