-$Id: Changes,v 1.26 2002-12-09 17:01:03 mike Exp $
+$Id: Changes,v 1.27 2002-12-11 17:14:20 mike Exp $
Revision history for the CQL-Java package.
See the bottom of this file for a list of things still to do.
0.5 (IN PROGRESS, currently at RC1)
- Add an extra back-end method,
- byte[] toType1(Properties config)
+ byte[] toType1BER(Properties config)
which generates an opaque BER-encoded PDU suitable for
forwarding to Z39.50 server as a pasrt of a searchRequest
APDU. This was contributed by Ralph Levan <levan@oclc.org>
difference to anything: in particular, file-names such as
"cql-java.jar" remain the same.
- Recreate last-in-field support
- - Add srw.resultSet support to the toPFQ() method. I've not
- attempted this for the toType1() method: Ralph will have to
- do it.
+ - Add srw.resultSet support to the toPFQ() method.
0.4 Thu Nov 21 10:09:26 2002
- Add support for the new "phonetic" relation modifier,
-// $Id: CQLBooleanNode.java,v 1.12 2002-12-05 17:14:52 mike Exp $
+// $Id: CQLBooleanNode.java,v 1.13 2002-12-11 17:14:20 mike Exp $
package org.z3950.zing.cql;
import java.util.Properties;
/**
* Represents a boolean node in a CQL parse-tree.
*
- * @version $Id: CQLBooleanNode.java,v 1.12 2002-12-05 17:14:52 mike Exp $
+ * @version $Id: CQLBooleanNode.java,v 1.13 2002-12-11 17:14:20 mike Exp $
*/
public abstract class CQLBooleanNode extends CQLNode {
CQLBooleanNode() {} // prevent javadoc from documenting this
abstract String op();
- public byte[] toType1(Properties config) throws PQFTranslationException {
- System.out.println("in CQLBooleanNode.toType101(): PQF=" +
+ public byte[] toType1BER(Properties config) throws PQFTranslationException {
+ System.out.println("in CQLBooleanNode.toType1BER(): PQF=" +
toPQF(config));
- byte[] rpn1 = left.toType1(config);
- byte[] rpn2 = right.toType1(config);
+ byte[] rpn1 = left.toType1BER(config);
+ byte[] rpn2 = right.toType1BER(config);
byte[] op = opType1();
byte[] rpnStructure = new byte[rpn1.length+rpn2.length+op.length+4];
-// $Id: CQLNode.java,v 1.19 2002-12-09 16:29:44 mike Exp $
+// $Id: CQLNode.java,v 1.20 2002-12-11 17:14:20 mike Exp $
package org.z3950.zing.cql;
import java.util.Properties;
/**
* Represents a node in a CQL parse-tree.
*
- * @version $Id: CQLNode.java,v 1.19 2002-12-09 16:29:44 mike Exp $
+ * @version $Id: CQLNode.java,v 1.20 2002-12-11 17:14:20 mike Exp $
*/
public abstract class CQLNode {
CQLNode() {} // prevent javadoc from documenting this
* <A href="ftp://ftp.rsasecurity.com/pub/pkcs/ascii/layman.asc"
* >ftp://ftp.rsasecurity.com/pub/pkcs/ascii/layman.asc</A>
*/
- abstract public byte[] toType1(Properties config)
+ abstract public byte[] toType1BER(Properties config)
throws PQFTranslationException;
// ANS.1 classes
public static final byte[] makeQuery(CQLNode root, Properties properties)
throws PQFTranslationException {
- byte[] rpnStructure = root.toType1(properties);
+ byte[] rpnStructure = root.toType1BER(properties);
byte[] qry = new byte[rpnStructure.length+100];
int offset = 0;
offset = putTag(CONTEXT, 1, CONSTRUCTED, qry, offset);
-// $Id: CQLPrefixNode.java,v 1.4 2002-12-05 17:14:52 mike Exp $
+// $Id: CQLPrefixNode.java,v 1.5 2002-12-11 17:14:20 mike Exp $
package org.z3950.zing.cql;
import java.lang.String;
/**
* Represents a prefix node in a CQL parse-tree.
*
- * @version $Id: CQLPrefixNode.java,v 1.4 2002-12-05 17:14:52 mike Exp $
+ * @version $Id: CQLPrefixNode.java,v 1.5 2002-12-11 17:14:20 mike Exp $
*/
public class CQLPrefixNode extends CQLNode {
/**
return subtree.toPQF(config);
}
- public byte[] toType1(Properties config) throws PQFTranslationException {
+ public byte[] toType1BER(Properties config) throws PQFTranslationException {
// See comment on toPQF()
- return subtree.toType1(config);
+ return subtree.toType1BER(config);
}
}
-// $Id: CQLRelation.java,v 1.9 2002-12-06 12:34:45 mike Exp $
+// $Id: CQLRelation.java,v 1.10 2002-12-11 17:14:20 mike Exp $
package org.z3950.zing.cql;
import java.util.Vector;
/**
* Represents a relation between a CQL qualifier and term.
*
- * @version $Id: CQLRelation.java,v 1.9 2002-12-06 12:34:45 mike Exp $
+ * @version $Id: CQLRelation.java,v 1.10 2002-12-11 17:14:20 mike Exp $
*/
public class CQLRelation extends CQLNode {
ModifierSet ms;
throw new Error("CQLRelation.toPQF() can never be called");
}
- public byte[] toType1(Properties config) {
- throw new Error("CQLRelation.toType1() can never be called");
+ public byte[] toType1BER(Properties config) {
+ throw new Error("CQLRelation.toType1BER() can never be called");
}
}
-// $Id: CQLTermNode.java,v 1.16 2002-12-11 00:30:02 mike Exp $
+// $Id: CQLTermNode.java,v 1.17 2002-12-11 17:14:20 mike Exp $
package org.z3950.zing.cql;
import java.util.Properties;
* these must be provided - you can't have a qualifier without a
* relation or vice versa.
*
- * @version $Id: CQLTermNode.java,v 1.16 2002-12-11 00:30:02 mike Exp $
+ * @version $Id: CQLTermNode.java,v 1.17 2002-12-11 17:14:20 mike Exp $
*/
public class CQLTermNode extends CQLNode {
private String qualifier;
public String toPQF(Properties config) throws PQFTranslationException {
if (qualifier.equals("srw.resultSet")) {
// Special case: ignore relation, modifiers, wildcards, etc.
- // There's parallel code in toType1()
+ // There's parallel code in toType1BER()
return "@set " + maybeQuote(term);
}
return str;
}
- public byte[] toType1(Properties config) throws PQFTranslationException {
+ public byte[] toType1BER(Properties config) throws PQFTranslationException {
if (qualifier.equals("srw.resultSet")) {
// Special case: ignore relation, modifiers, wildcards, etc.
// There's parallel code in toPQF()
text = text.substring(0, len-1);
String attr, attrList, term = maybeQuote(text);
- System.out.println("in CQLTermNode.toType101(): PQF=" + toPQF(config));
+ System.out.println("in CQLTermNode.toType1BER(): PQF=" + toPQF(config));
byte[] operand = new byte[text.length()+100];
int i, j, offset, type, value;
offset = putTag(CONTEXT, 0, CONSTRUCTED, operand, 0); // op