X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=README;h=6d123c7ecdf6b33a6f9c403f092bf65429b21eb1;hb=8ac74dfaa036a225b07e57f1ac61ea868b3df6e4;hp=d0b3d9f2ad9c297536f68a79aa1de1d4178458ac;hpb=99c44fee61010958478dea758d7b1322cd7a9ae6;p=cql-java-moved-to-github.git diff --git a/README b/README index d0b3d9f..6d123c7 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -$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 @@ -33,10 +33,18 @@ Library: 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