1 // $Id: CQLRelation.java,v 1.19 2007-07-03 13:40:58 mike Exp $
3 package org.z3950.zing.cql;
4 import java.util.Vector;
5 import java.util.Properties;
6 import java.lang.StringBuffer;
9 * Represents a relation between a CQL index and term.
11 * @version $Id: CQLRelation.java,v 1.19 2007-07-03 13:40:58 mike Exp $
13 public class CQLRelation extends CQLNode {
17 * Creates a new CQLRelation with the specified base relation.
18 * Typical base relations include the usual six ordering relations
19 * (<TT><=</TT>, <TT>></TT>, <I>etc.</I>), the text
20 * relations <TT>any</TT>, <TT>all</TT> and <TT>exact</TT>, the
21 * old server-choice relation <TT>scr</TT> and profiled relations of
22 * the form <TT><I>prefix</I>.<I>name</I></TT>.
24 // ### Seems wrong: a modifier set should not have a base, a
26 public CQLRelation(String base) {
27 ms = new ModifierSet(base);
31 * Returns the base relation with which the CQLRelation was
34 public String getBase() {
39 * Returns an array of the modifiers associated with a CQLRelation.
41 * An array of Modifier objects.
43 public Vector<Modifier> getModifiers() {
44 return ms.getModifiers();
47 public String toXCQL(int level, Vector prefixes, Vector sortkeys) {
49 throw new Error("CQLRelation.toXCQL() called with sortkeys");
51 return ms.toXCQL(level, "relation");
54 public String toCQL() {
58 public String toPQF(Properties config) throws PQFTranslationException {
59 throw new Error("CQLRelation.toPQF() can never be called");
62 public byte[] toType1BER(Properties config) {
63 throw new Error("CQLRelation.toType1BER() can never be called");