-// $Id: CQLBooleanNode.java,v 1.16 2007-06-29 12:52:45 mike Exp $
+// $Id: CQLBooleanNode.java,v 1.17 2007-07-03 13:40:13 mike Exp $
package org.z3950.zing.cql;
import java.util.Properties;
/**
* Represents a boolean node in a CQL parse-tree.
*
- * @version $Id: CQLBooleanNode.java,v 1.16 2007-06-29 12:52:45 mike Exp $
+ * @version $Id: CQLBooleanNode.java,v 1.17 2007-07-03 13:40:13 mike Exp $
*/
public abstract class CQLBooleanNode extends CQLNode {
/**
this.ms = ms;
}
- public String toXCQL(int level, Vector prefixes) {
- // ### Should this use CQLNode.toXCQL(level+2, prefixes)?
+ public String toXCQL(int level, Vector prefixes, Vector sortkeys) {
+ if (sortkeys != null)
+ throw new Error("CQLBooleanNode.toXCQL() called with sortkeys");
+
return (indent(level) + "<triple>\n" +
renderPrefixes(level+1, prefixes) +
ms.toXCQL(level+1, "boolean") +
-// $Id: CQLPrefixNode.java,v 1.8 2007-06-27 22:39:55 mike Exp $
+// $Id: CQLPrefixNode.java,v 1.9 2007-07-03 13:40:41 mike Exp $
package org.z3950.zing.cql;
import java.lang.String;
/**
* Represents a prefix node in a CQL parse-tree.
*
- * @version $Id: CQLPrefixNode.java,v 1.8 2007-06-27 22:39:55 mike Exp $
+ * @version $Id: CQLPrefixNode.java,v 1.9 2007-07-03 13:40:41 mike Exp $
*/
public class CQLPrefixNode extends CQLNode {
/**
this.subtree = subtree;
}
- public String toXCQL(int level, Vector<CQLPrefix> prefixes) {
-// String maybeName = "";
-// if (prefix.name != null)
-// maybeName = indent(level+1) + "<name>" + prefix.name + "</name>\n";
-//
-// return (indent(level) + "<prefix>\n" + maybeName +
-// indent(level+1) +
-// "<identifier>" + prefix.identifier + "</identifier>\n" +
-// subtree.toXCQL(level+1, prefixes) +
-// indent(level) + "</prefix>\n");
- Vector<CQLPrefix> tmp = new Vector<CQLPrefix>(prefixes);
+ public String toXCQL(int level, Vector<CQLPrefix> prefixes,
+ Vector<ModifierSet> sortkeys) {
+ if (sortkeys != null)
+ throw new Error("CQLPrefixNode.toXCQL() called with sortkeys");
+
+ Vector<CQLPrefix> tmp = (prefixes == null ?
+ new Vector<CQLPrefix>() :
+ new Vector<CQLPrefix>(prefixes));
tmp.add(prefix);
return subtree.toXCQL(level, tmp);
}
-// $Id: CQLRelation.java,v 1.18 2007-06-29 15:24:39 mike Exp $
+// $Id: CQLRelation.java,v 1.19 2007-07-03 13:40:58 mike Exp $
package org.z3950.zing.cql;
import java.util.Vector;
/**
* Represents a relation between a CQL index and term.
*
- * @version $Id: CQLRelation.java,v 1.18 2007-06-29 15:24:39 mike Exp $
+ * @version $Id: CQLRelation.java,v 1.19 2007-07-03 13:40:58 mike Exp $
*/
public class CQLRelation extends CQLNode {
ModifierSet ms;
return ms.getModifiers();
}
- public String toXCQL(int level, Vector prefixes) {
+ public String toXCQL(int level, Vector prefixes, Vector sortkeys) {
+ if (sortkeys != null)
+ throw new Error("CQLRelation.toXCQL() called with sortkeys");
+
return ms.toXCQL(level, "relation");
}