From 0fe13ae749022e30156e04543432b1b5f280ef8f Mon Sep 17 00:00:00 2001 From: mike Date: Tue, 3 Jul 2007 16:03:00 +0000 Subject: [PATCH] toXCQL() renders sort-keys, if any. --- src/org/z3950/zing/cql/CQLBooleanNode.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/org/z3950/zing/cql/CQLBooleanNode.java b/src/org/z3950/zing/cql/CQLBooleanNode.java index 9462914..ec0608c 100644 --- a/src/org/z3950/zing/cql/CQLBooleanNode.java +++ b/src/org/z3950/zing/cql/CQLBooleanNode.java @@ -1,4 +1,4 @@ -// $Id: CQLBooleanNode.java,v 1.17 2007-07-03 13:40:13 mike Exp $ +// $Id: CQLBooleanNode.java,v 1.18 2007-07-03 16:03:00 mike Exp $ package org.z3950.zing.cql; import java.util.Properties; @@ -8,7 +8,7 @@ import java.util.Vector; /** * Represents a boolean node in a CQL parse-tree. * - * @version $Id: CQLBooleanNode.java,v 1.17 2007-07-03 13:40:13 mike Exp $ + * @version $Id: CQLBooleanNode.java,v 1.18 2007-07-03 16:03:00 mike Exp $ */ public abstract class CQLBooleanNode extends CQLNode { /** @@ -32,10 +32,8 @@ public abstract class CQLBooleanNode extends CQLNode { this.ms = ms; } - public String toXCQL(int level, Vector prefixes, Vector sortkeys) { - if (sortkeys != null) - throw new Error("CQLBooleanNode.toXCQL() called with sortkeys"); - + public String toXCQL(int level, Vector prefixes, + Vector sortkeys) { return (indent(level) + "\n" + renderPrefixes(level+1, prefixes) + ms.toXCQL(level+1, "boolean") + @@ -45,6 +43,7 @@ public abstract class CQLBooleanNode extends CQLNode { indent(level+1) + "\n" + right.toXCQL(level+2) + indent(level+1) + "\n" + + renderSortKeys(level+1, sortkeys) + indent(level) + "\n"); } -- 1.7.10.4