From 76ed46db970535e663f8efa818fce1c0cb7c36b5 Mon Sep 17 00:00:00 2001 From: mike Date: Mon, 9 Dec 2002 17:01:03 +0000 Subject: [PATCH] Support srw.resultSet in toPQF(). NOT yet in toType1() --- Changes | 10 ++++++---- src/org/z3950/zing/cql/CQLTermNode.java | 10 ++++++++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Changes b/Changes index 2c1a35d..06d0cee 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,4 @@ -$Id: Changes,v 1.25 2002-12-09 16:56:07 mike Exp $ +$Id: Changes,v 1.26 2002-12-09 17:01:03 mike Exp $ Revision history for the CQL-Java package. See the bottom of this file for a list of things still to do. @@ -24,9 +24,9 @@ See the bottom of this file for a list of things still to do. difference to anything: in particular, file-names such as "cql-java.jar" remain the same. - Recreate last-in-field support - - ### Add srw.resultSet support to the toPFQ() method. - - ### Fix term-to-PQF translation to omit empty properties - (for the broken Korean server) + - Add srw.resultSet support to the toPFQ() method. I've not + attempted this for the toType1() method: Ralph will have to + do it. 0.4 Thu Nov 21 10:09:26 2002 - Add support for the new "phonetic" relation modifier, @@ -118,6 +118,8 @@ See the bottom of this file for a list of things still to do. followed by a TT_WORD. The problem here is that I don't think it's actually possible to fix this without throwing out StreamTokenizer and rolling our own, which we absolutely + - Fix term-to-PQF translation to omit empty properties + (for the broken Korean server) - Write "package.html" file for the javadoc documentation. - Some niceties for the cql-decompiling back-end: * Don't emit redundant parentheses. diff --git a/src/org/z3950/zing/cql/CQLTermNode.java b/src/org/z3950/zing/cql/CQLTermNode.java index 87a651d..4890737 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.14 2002-12-09 16:55:19 mike Exp $ +// $Id: CQLTermNode.java,v 1.15 2002-12-09 17:01:03 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 a qualifier without a * relation or vice versa. * - * @version $Id: CQLTermNode.java,v 1.14 2002-12-09 16:55:19 mike Exp $ + * @version $Id: CQLTermNode.java,v 1.15 2002-12-09 17:01:03 mike Exp $ */ public class CQLTermNode extends CQLNode { private String qualifier; @@ -134,6 +134,12 @@ public class CQLTermNode extends CQLNode { } public String toPQF(Properties config) throws PQFTranslationException { + if (qualifier.equals("srw.resultSet")) { + // Special case: ignore relation, modifiers, wildcards, etc. + // ### Parallel code is required in toType1() + return "@set " + maybeQuote(term); + } + Vector attrs = getAttrs(config); String attr, s = ""; -- 1.7.10.4