1 // $Id: CQLRelation.java,v 1.19 2007-07-03 13:40:58 mike Exp $
3 package org.z3950.zing.cql;
5 import java.util.Properties;
8 * Represents a relation between a CQL index and term.
10 * @version $Id: CQLRelation.java,v 1.19 2007-07-03 13:40:58 mike Exp $
12 public class CQLRelation extends CQLNode {
16 * Creates a new CQLRelation with the specified base relation.
17 * Typical base relations include the usual six ordering relations
18 * (<TT><=</TT>, <TT>></TT>, <I>etc.</I>), the text
19 * relations <TT>any</TT>, <TT>all</TT> and <TT>exact</TT>, the
20 * old server-choice relation <TT>scr</TT> and profiled relations of
21 * the form <TT><I>prefix</I>.<I>name</I></TT>.
23 // ### Seems wrong: a modifier set should not have a base, a
25 public CQLRelation(String base) {
26 ms = new ModifierSet(base);
30 * Returns the base relation with which the CQLRelation was
33 public String getBase() {
38 * Returns an array of the modifiers associated with a CQLRelation.
40 * An array of Modifier objects.
42 public List<Modifier> getModifiers() {
43 return ms.getModifiers();
47 public String toXCQL(int level, List<CQLPrefix> prefixes,
48 List<ModifierSet> sortkeys) {
50 throw new Error("CQLRelation.toXCQL() called with sortkeys");
52 return ms.toXCQL(level, "relation");
56 public String toCQL() {
61 public String toPQF(Properties config) throws PQFTranslationException {
62 throw new Error("CQLRelation.toPQF() can never be called");
66 public byte[] toType1BER(Properties config) {
67 throw new Error("CQLRelation.toType1BER() can never be called");