From 543c38e1270ac8def3eeb9cb56abab2f34728ee5 Mon Sep 17 00:00:00 2001 From: mike Date: Wed, 27 Jun 2007 22:44:40 +0000 Subject: [PATCH] UnknownQualifierException becomes UnknownIndexException --- src/org/z3950/zing/cql/CQLParser.java | 6 +++--- src/org/z3950/zing/cql/CQLTermNode.java | 7 +++---- src/org/z3950/zing/cql/Makefile | 4 ++-- src/org/z3950/zing/cql/UnknownIndexException.java | 10 +++++----- 4 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/org/z3950/zing/cql/CQLParser.java b/src/org/z3950/zing/cql/CQLParser.java index 304d7b5..5361037 100644 --- a/src/org/z3950/zing/cql/CQLParser.java +++ b/src/org/z3950/zing/cql/CQLParser.java @@ -1,4 +1,4 @@ -// $Id: CQLParser.java,v 1.27 2007-06-27 22:39:55 mike Exp $ +// $Id: CQLParser.java,v 1.28 2007-06-27 22:44:40 mike Exp $ package org.z3950.zing.cql; import java.io.IOException; @@ -12,7 +12,7 @@ import java.io.FileNotFoundException; /** * Compiles CQL strings into parse trees of CQLNode subtypes. * - * @version $Id: CQLParser.java,v 1.27 2007-06-27 22:39:55 mike Exp $ + * @version $Id: CQLParser.java,v 1.28 2007-06-27 22:44:40 mike Exp $ * @see http://zing.z3950.org/cql/index.html */ @@ -439,7 +439,7 @@ public class CQLParser { } catch (IOException ex) { System.err.println("Can't render query: " + ex.getMessage()); System.exit(5); - } catch (UnknownQualifierException ex) { + } catch (UnknownIndexException ex) { System.err.println("Unknown index: " + ex.getMessage()); System.exit(6); } catch (UnknownRelationException ex) { diff --git a/src/org/z3950/zing/cql/CQLTermNode.java b/src/org/z3950/zing/cql/CQLTermNode.java index fc310ed..87511fc 100644 --- a/src/org/z3950/zing/cql/CQLTermNode.java +++ b/src/org/z3950/zing/cql/CQLTermNode.java @@ -1,4 +1,4 @@ -// $Id: CQLTermNode.java,v 1.25 2007-06-27 22:39:55 mike Exp $ +// $Id: CQLTermNode.java,v 1.26 2007-06-27 22:44:40 mike Exp $ package org.z3950.zing.cql; import java.util.Properties; @@ -12,7 +12,7 @@ import java.util.Vector; * these must be provided - you can't have an index without a * relation or vice versa. * - * @version $Id: CQLTermNode.java,v 1.25 2007-06-27 22:39:55 mike Exp $ + * @version $Id: CQLTermNode.java,v 1.26 2007-06-27 22:44:40 mike Exp $ */ public class CQLTermNode extends CQLNode { private String index; @@ -31,7 +31,6 @@ public class CQLTermNode extends CQLNode { } public String getIndex() { return index; } - public String getQualifier() { return getIndex(); } // for legacy applications public CQLRelation getRelation() { return relation; } public String getTerm() { return term; } @@ -91,7 +90,7 @@ public class CQLTermNode extends CQLNode { attr = config.getProperty("index." + index); if (attr == null) - throw new UnknownQualifierException(index); + throw new UnknownIndexException(index); attrs.add(attr); String rel = relation.getBase(); diff --git a/src/org/z3950/zing/cql/Makefile b/src/org/z3950/zing/cql/Makefile index a74101d..68087c1 100644 --- a/src/org/z3950/zing/cql/Makefile +++ b/src/org/z3950/zing/cql/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.15 2007-06-27 17:01:47 mike Exp $ +# $Id: Makefile,v 1.16 2007-06-27 22:44:40 mike Exp $ # # Your Java compiler will require that this source directory is on the # classpath. The best way to do that is just to add the CQL-Java @@ -14,7 +14,7 @@ OBJ = Utils.class \ CQLParser.class CQLLexer.class CQLGenerator.class \ CQLParseException.class MissingParameterException.class \ PQFTranslationException.class \ - UnknownQualifierException.class UnknownRelationException.class \ + UnknownIndexException.class UnknownRelationException.class \ UnknownRelationModifierException.class UnknownPositionException.class ../../../../../lib/cql-java.jar: $(OBJ) diff --git a/src/org/z3950/zing/cql/UnknownIndexException.java b/src/org/z3950/zing/cql/UnknownIndexException.java index 28178a0..b4201d3 100644 --- a/src/org/z3950/zing/cql/UnknownIndexException.java +++ b/src/org/z3950/zing/cql/UnknownIndexException.java @@ -1,4 +1,4 @@ -// $Id: UnknownIndexException.java,v 1.1 2007-06-27 22:41:41 mike Exp $ +// $Id: UnknownIndexException.java,v 1.2 2007-06-27 22:44:40 mike Exp $ package org.z3950.zing.cql; import java.lang.Exception; @@ -12,15 +12,15 @@ import java.lang.Exception; * that, because the PQF configuration doesn't know about a relation, * we throw one of these babies. * - * @version $Id: UnknownIndexException.java,v 1.1 2007-06-27 22:41:41 mike Exp $ + * @version $Id: UnknownIndexException.java,v 1.2 2007-06-27 22:44:40 mike Exp $ */ -public class UnknownQualifierException extends PQFTranslationException { +public class UnknownIndexException extends PQFTranslationException { /** - * Creates a new UnknownQualifierException. + * Creates a new UnknownIndexException. * @param s * The index for which there was no PQF configuration. */ - public UnknownQualifierException(String s) { + public UnknownIndexException(String s) { super(s); } } -- 1.7.10.4