You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by ju...@apache.org on 2002/01/23 14:50:27 UTC
cvs commit: jakarta-slide/src/share/org/apache/slide/search InvalidQueryException.java Search.java SearchImpl.java SearchLanguage.java SearchQueryResult.java
juergen 02/01/23 05:50:27
Modified: src/share/org/apache/slide/search InvalidQueryException.java
Search.java SearchImpl.java SearchLanguage.java
SearchQueryResult.java
Log:
Throwing some different exceptions
Revision Changes Path
1.2 +16 -14 jakarta-slide/src/share/org/apache/slide/search/InvalidQueryException.java
Index: InvalidQueryException.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/InvalidQueryException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InvalidQueryException.java 23 Jul 2001 05:38:41 -0000 1.1
+++ InvalidQueryException.java 23 Jan 2002 13:50:27 -0000 1.2
@@ -1,13 +1,13 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/InvalidQueryException.java,v 1.1 2001/07/23 05:38:41 remm Exp $
- * $Revision: 1.1 $
- * $Date: 2001/07/23 05:38:41 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/InvalidQueryException.java,v 1.2 2002/01/23 13:50:27 juergen Exp $
+ * $Revision: 1.2 $
+ * $Date: 2002/01/23 13:50:27 $
*
* ====================================================================
*
* The Apache Software License, Version 1.1
*
- * Copyright (c) 1999 The Apache Software Foundation. All rights
+ * Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -15,7 +15,7 @@
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
@@ -23,15 +23,15 @@
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
- * any, must include the following acknowlegement:
- * "This product includes software developed by the
+ * any, must include the following acknowlegement:
+ * "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
- * from this software without prior written permission. For written
+ * from this software without prior written permission. For written
* permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache"
@@ -59,17 +59,19 @@
*
* [Additional notices, if required by prior licensing conditions]
*
- */
+ */
package org.apache.slide.search;
/**
- * Generic search exception.
- *
+ * Generic search exception. Unprocessable entity. The query could not be
+ * executed. The text/xml request entity may have been wellformed / valid but
+ * may have contained an unsupported or unimplemented query operator.
+ *
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
-public class InvalidQueryException extends SearchException {
+public class InvalidQueryException extends BadQueryException {
// ----------------------------------------------------------- Constructors
@@ -77,11 +79,11 @@
/**
* Constructor.
- *
+ *
* @param message Exception message
*/
public InvalidQueryException(String message) {
- super(message);
+ super(message);
}
-
+
}
1.4 +5 -5 jakarta-slide/src/share/org/apache/slide/search/Search.java
Index: Search.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/Search.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Search.java 8 Jan 2002 14:29:33 -0000 1.3
+++ Search.java 23 Jan 2002 13:50:27 -0000 1.4
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/Search.java,v 1.3 2002/01/08 14:29:33 juergen Exp $
- * $Revision: 1.3 $
- * $Date: 2002/01/08 14:29:33 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/Search.java,v 1.4 2002/01/23 13:50:27 juergen Exp $
+ * $Revision: 1.4 $
+ * $Date: 2002/01/23 13:50:27 $
*
* ====================================================================
*
@@ -74,7 +74,7 @@
* Search helper.
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public interface Search {
@@ -113,5 +113,5 @@
* @throws InvalidQueryException
*
*/
- SearchLanguage getLanguage (String grammarUri) throws InvalidQueryException;
+ SearchLanguage getLanguage (String grammarUri) throws BadQueryException;
}
1.4 +7 -6 jakarta-slide/src/share/org/apache/slide/search/SearchImpl.java
Index: SearchImpl.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/SearchImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SearchImpl.java 8 Jan 2002 14:29:33 -0000 1.3
+++ SearchImpl.java 23 Jan 2002 13:50:27 -0000 1.4
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/SearchImpl.java,v 1.3 2002/01/08 14:29:33 juergen Exp $
- * $Revision: 1.3 $
- * $Date: 2002/01/08 14:29:33 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/SearchImpl.java,v 1.4 2002/01/23 13:50:27 juergen Exp $
+ * $Revision: 1.4 $
+ * $Date: 2002/01/23 13:50:27 $
*
* ====================================================================
*
@@ -62,6 +62,7 @@
*/
package org.apache.slide.search;
+import org.apache.slide.search.basicsearch.*;
import java.util.HashMap;
import java.util.Map;
@@ -80,7 +81,7 @@
* Search helper.
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public final class SearchImpl implements Search {
@@ -158,11 +159,11 @@
public SearchLanguage getLanguage (String grammarUri)
- throws InvalidQueryException
+ throws BadQueryException
{
SearchLanguage result =(SearchLanguage) GRAMMAR_BY_URI.get (grammarUri);
if (result == null)
- throw new InvalidQueryException ("grammar not found: " + grammarUri);
+ throw new BadQueryException ("grammar not found: " + grammarUri);
return result;
}
1.3 +6 -6 jakarta-slide/src/share/org/apache/slide/search/SearchLanguage.java
Index: SearchLanguage.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/SearchLanguage.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SearchLanguage.java 8 Jan 2002 14:29:33 -0000 1.2
+++ SearchLanguage.java 23 Jan 2002 13:50:27 -0000 1.3
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/SearchLanguage.java,v 1.2 2002/01/08 14:29:33 juergen Exp $
- * $Revision: 1.2 $
- * $Date: 2002/01/08 14:29:33 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/SearchLanguage.java,v 1.3 2002/01/23 13:50:27 juergen Exp $
+ * $Revision: 1.3 $
+ * $Date: 2002/01/23 13:50:27 $
*
* ====================================================================
*
@@ -69,7 +69,7 @@
* Base class for a search language.
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.2 $
+ * @version $Revision: 1.3 $
*/
public abstract class SearchLanguage {
@@ -95,14 +95,14 @@
* Generate a query object from a String.
*/
public abstract SearchQuery parseQuery(String queryString)
- throws InvalidQueryException;
+ throws BadQueryException;
/**
* Generate a query object from a DOM Element.
*/
public abstract SearchQuery parseQuery(Element queryElement)
- throws InvalidQueryException;
+ throws BadQueryException;
}
1.2 +8 -6 jakarta-slide/src/share/org/apache/slide/search/SearchQueryResult.java
Index: SearchQueryResult.java
===================================================================
RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/SearchQueryResult.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SearchQueryResult.java 19 Jul 2001 05:47:25 -0000 1.1
+++ SearchQueryResult.java 23 Jan 2002 13:50:27 -0000 1.2
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/SearchQueryResult.java,v 1.1 2001/07/19 05:47:25 remm Exp $
- * $Revision: 1.1 $
- * $Date: 2001/07/19 05:47:25 $
+ * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/search/SearchQueryResult.java,v 1.2 2002/01/23 13:50:27 juergen Exp $
+ * $Revision: 1.2 $
+ * $Date: 2002/01/23 13:50:27 $
*
* ====================================================================
*
@@ -63,7 +63,8 @@
package org.apache.slide.search;
-import java.util.Enumeration;
+import java.util.Set;
+import java.util.HashSet;
import org.apache.slide.common.*;
import org.apache.slide.structure.*;
import org.apache.slide.authenticate.CredentialsToken;
@@ -73,9 +74,10 @@
* Search query result.
*
* @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
-public abstract class SearchQueryResult {
+public class SearchQueryResult extends HashSet {
+
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>