Towards 0.2 --
[cql-java-moved-to-github.git] / src / org / z3950 / zing / cql / CQLRelation.java
1 // $Id: CQLRelation.java,v 1.3 2002-11-06 00:05:58 mike Exp $
2
3 package org.z3950.zing.cql;
4 import java.util.Vector;
5 import java.lang.StringBuffer;
6
7 /**
8  * Represents a relation between a CQL qualifier and term.
9  * ##
10  *
11  * @version     $Id: CQLRelation.java,v 1.3 2002-11-06 00:05:58 mike Exp $
12  */
13 public class CQLRelation extends CQLNode {
14     ModifierSet ms;
15
16     public CQLRelation(String base) {
17         ms = new ModifierSet(base);
18     }
19
20     public String getBase() {
21         return ms.getBase();
22     }
23
24     public void addModifier(String modifier) {
25         ms.addModifier(null, modifier);
26     }
27
28     // ### should have a public method to retrieve all modifiers
29
30     public String toXCQL(int level) {
31         return ms.toXCQL(level, "relation");
32     }
33
34     public String toCQL() {
35         return ms.toCQL();
36     }
37
38     public String toPQF(Properties config)
39         throws UnknownQualifierException, UnknownRelationException {
40         throw Error("CQLRelation.toPQF() can never be called");
41     }
42 }