projects
/
cql-java-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Finish (more or less) to CQL-to-PQF translator.
[cql-java-moved-to-github.git]
/
src
/
org
/
z3950
/
zing
/
cql
/
CQLRelation.java
diff --git
a/src/org/z3950/zing/cql/CQLRelation.java
b/src/org/z3950/zing/cql/CQLRelation.java
index
f82b91e
..
0d98674
100644
(file)
--- a/
src/org/z3950/zing/cql/CQLRelation.java
+++ b/
src/org/z3950/zing/cql/CQLRelation.java
@@
-1,4
+1,4
@@
-// $Id: CQLRelation.java,v 1.4 2002-11-06 00:14:32 mike Exp $
+// $Id: CQLRelation.java,v 1.5 2002-11-06 20:13:45 mike Exp $
package org.z3950.zing.cql;
import java.util.Vector;
package org.z3950.zing.cql;
import java.util.Vector;
@@
-7,9
+7,8
@@
import java.lang.StringBuffer;
/**
* Represents a relation between a CQL qualifier and term.
/**
* Represents a relation between a CQL qualifier and term.
- * ##
*
*
- * @version $Id: CQLRelation.java,v 1.4 2002-11-06 00:14:32 mike Exp $
+ * @version $Id: CQLRelation.java,v 1.5 2002-11-06 20:13:45 mike Exp $
*/
public class CQLRelation extends CQLNode {
ModifierSet ms;
*/
public class CQLRelation extends CQLNode {
ModifierSet ms;
@@
-26,7
+25,15
@@
public class CQLRelation extends CQLNode {
ms.addModifier(null, modifier);
}
ms.addModifier(null, modifier);
}
- // ### should have a public method to retrieve all modifiers
+ public String[] getModifiers() {
+ Vector[] v = ms.getModifiers();
+ int n = v.length;
+ String[] s = new String[n];
+ for (int i = 0; i < n; i++) {
+ s[i] = (String) v[i].get(1);
+ }
+ return s;
+ }
public String toXCQL(int level) {
return ms.toXCQL(level, "relation");
public String toXCQL(int level) {
return ms.toXCQL(level, "relation");
@@
-36,8
+43,7
@@
public class CQLRelation extends CQLNode {
return ms.toCQL();
}
return ms.toCQL();
}
- public String toPQF(Properties config)
- throws UnknownQualifierException, UnknownRelationException {
- throw Error("CQLRelation.toPQF() can never be called");
+ public String toPQF(Properties config) throws PQFTranslationException {
+ throw new Error("CQLRelation.toPQF() can never be called");
}
}
}
}