X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Forg%2Fz3950%2Fzing%2Fcql%2FCQLAndNode.java;h=90d54a17bf19f5cf61aa9113fb1ecb6d4a96e9c4;hb=57b8aeb26a6aacaa478e6886ade3e40ca6eae2bb;hp=f46456dce6a48df9e97f9a272fce06196ae5cb0c;hpb=437ea0b3a09e884447853d42f879010cd0cc391e;p=cql-java-moved-to-github.git diff --git a/src/org/z3950/zing/cql/CQLAndNode.java b/src/org/z3950/zing/cql/CQLAndNode.java index f46456d..90d54a1 100644 --- a/src/org/z3950/zing/cql/CQLAndNode.java +++ b/src/org/z3950/zing/cql/CQLAndNode.java @@ -1,15 +1,17 @@ -// $Id: CQLAndNode.java,v 1.2 2002-10-25 16:01:26 mike Exp $ +// $Id: CQLAndNode.java,v 1.6 2002-12-05 17:14:52 mike Exp $ package org.z3950.zing.cql; /** - * Represents an AND node in a CQL parse-tree ... - * ### + * Represents an AND node in a CQL parse-tree. * - * @version $Id: CQLAndNode.java,v 1.2 2002-10-25 16:01:26 mike Exp $ + * @version $Id: CQLAndNode.java,v 1.6 2002-12-05 17:14:52 mike Exp $ */ public class CQLAndNode extends CQLBooleanNode { + /** + * Creates a new AND node with the specified left- and right-hand sides. + */ public CQLAndNode(CQLNode left, CQLNode right) { this.left = left; this.right = right; @@ -18,4 +20,14 @@ public class CQLAndNode extends CQLBooleanNode { String op() { return "and"; } + + // ### Too much code duplication here with OR and NOT + byte[] opType1() { + byte[] op = new byte[5]; + putTag(CONTEXT, 46, CONSTRUCTED, op, 0); // Operator + putLen(2, op, 2); + putTag(CONTEXT, 0, PRIMITIVE, op, 3); // and + putLen(0, op, 4); + return op; + } }