-$Id: README,v 1.2 2002-10-24 16:06:34 mike Exp $
+$Id: README,v 1.3 2002-10-25 07:38:16 mike Exp $
cql-java -- a free CQL compiler for Java
import org.z3950.zing.cql.*
+ // Building a parse-tree by hand
+ CQLNode n1 = new CQLTermNode("dc.author", "=", "kernighan");
+ CQLNode n2 = new CQLTermNode("dc.title", "all", "elements style");
+ CQLNode root = new CQLAndNode(n1, n2);
+ System.out.println(root.toXCQL(3));
+
+ // Parsing a CQL query
CQLParser parser = new CQLParser();
CQLNode root = parser.parse("title=dinosaur");
- print root.toXCQL();
- print root.toPQF(qualSet);
+ System.out.println(root.toXCQL(0));
+ System.out.println(root.toCQL());
+ System.out.println(root.toPQF(qualSet));
// ... where `qualSet' specifies CQL-qualfier => Z-attr mapping