Tweak spacing.
[cql-java-moved-to-github.git] / README
diff --git a/README b/README
index d0b3d9f..6d123c7 100644 (file)
--- 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