+ String res = quotedTerm;
+
+ if (!qualifier.equalsIgnoreCase("srw.serverChoice")) {
+ // ### We don't always need spaces around `relation'.
+ res = quotedQualifier + " " + relation.toCQL() + " " + quotedTerm;
+ }
+
+ return res;
+ }
+
+ public String toPQF(Properties config)
+ throws UnknownQualifierException, UnknownRelationException {
+ Vector attrs = new Vector();
+
+ if (qualifier != null) {
+ String s = config.getProperty(qualifier);
+ if (s == null)
+ throw new UnknownQualifierException(qualifier);
+ attrs.add(s);
+ } else {
+ // ### get a default access point from properties?
+ }
+
+ if (relation != null) {
+ String rel = relation.getBase();
+ // ### handle "any" and "all"
+ String s = config.getProperty("cql-java.relation." + rel);
+ if (s == null)
+ throw new UnknownRelationException(rel);
+ attrs.add(s);
+ } else {
+ // ### get a default relation from properties?
+ }
+
+ // ### handle position attributes
+ // ### handle structure attributes
+ // ### handle "always" attributes
+
+ // ### should split Vector elements on spaces
+ String s = "";
+ for (int i = 0; i < attrs.size(); i++) {
+ s += "@attr " + (String) attrs.get(i) + " ";
+ }