Comment.
[cql-java-moved-to-github.git] / src / org / z3950 / zing / cql / CQLRelation.java
index 6e4ec9b..e695fcd 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: CQLRelation.java,v 1.15 2007-06-27 22:39:55 mike Exp $
+// $Id: CQLRelation.java,v 1.18 2007-06-29 15:24:39 mike Exp $
 
 package org.z3950.zing.cql;
 import java.util.Vector;
@@ -8,7 +8,7 @@ import java.lang.StringBuffer;
 /**
  * Represents a relation between a CQL index and term.
  *
- * @version    $Id: CQLRelation.java,v 1.15 2007-06-27 22:39:55 mike Exp $
+ * @version    $Id: CQLRelation.java,v 1.18 2007-06-29 15:24:39 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
      * (<TT>&lt;=</TT>, <TT>&gt</TT>, <I>etc.</I>), the text
      * relations <TT>any</TT>, <TT>all</TT> and <TT>exact</TT>, the
-     * server-choice relation <TT>scr</TT> and profiled relations of
+     * old server-choice relation <TT>scr</TT> and profiled relations of
      * the form <TT><I>prefix</I>.<I>name</I></TT>.
      */
+    // ### 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 <TT>relevant</TT>,
      * <TT>fuzzy</TT>, <TT>stem</TT> and <TT>phonetic</TT>.  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;
     }
 
     /**