X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Forg%2Fz3950%2Fzing%2Fcql%2FCQLRelation.java;h=570afffd94d906969e9b29c4f37ed1bffc7b5eb0;hb=f57d48d060411f662eea823b97cc45038bda0def;hp=49e9f6337881502182a4db5d1ee706dbeaf56c5f;hpb=d463b3e1051ac2986b613ba361b37309a391ef93;p=cql-java-moved-to-github.git
diff --git a/src/org/z3950/zing/cql/CQLRelation.java b/src/org/z3950/zing/cql/CQLRelation.java
index 49e9f63..570afff 100644
--- a/src/org/z3950/zing/cql/CQLRelation.java
+++ b/src/org/z3950/zing/cql/CQLRelation.java
@@ -1,4 +1,4 @@
-// $Id: CQLRelation.java,v 1.14 2007-06-27 22:14:46 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;
@@ -6,9 +6,9 @@ import java.util.Properties;
import java.lang.StringBuffer;
/**
- * Represents a relation between a CQL qualifier and term.
+ * Represents a relation between a CQL index and term.
*
- * @version $Id: CQLRelation.java,v 1.14 2007-06-27 22:14:46 mike Exp $
+ * @version $Id: CQLRelation.java,v 1.19 2007-07-03 13:40:58 mike Exp $
*/
public class CQLRelation extends CQLNode {
ModifierSet ms;
@@ -18,9 +18,11 @@ public class CQLRelation extends CQLNode {
* Typical base relations include the usual six ordering relations
* (<=, >, etc.), the text
* relations any, all and exact, the
- * server-choice relation scr and profiled relations of
+ * old server-choice relation scr and profiled relations of
* the form prefix.name.
*/
+ // ### Seems wrong: a modifier set should not have a base, a
+ // relation should
public CQLRelation(String base) {
ms = new ModifierSet(base);
}
@@ -34,14 +36,14 @@ public class CQLRelation extends CQLNode {
}
/**
- * Adds a new relation modifier to the specified CQLRelation.
+ * Sets the modifiers of the specified CQLRelation.
* Typical relation modifiers include relevant,
* fuzzy, stem and phonetic. On the
* whole, these modifiers have a meaningful interpretation only
* for the text relations.
*/
- public void addModifier(String modifier) {
- ms.addModifier(modifier, null, null);
+ public void setModifiers(ModifierSet ms) {
+ this.ms = ms;
}
/**
@@ -53,7 +55,10 @@ public class CQLRelation extends CQLNode {
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");
}