X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Forg%2Fz3950%2Fzing%2Fcql%2FCQLAndNode.java;h=90d54a17bf19f5cf61aa9113fb1ecb6d4a96e9c4;hb=f3c88fe15ee06a671407a0368e449db991526802;hp=57cde127c43c145fb3a08a17f4b2a35b3a87732e;hpb=f8154c71944186a9b64ddb782082a2026c5a912f;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 57cde12..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.4 2002-10-31 22:22:01 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. - * ## * - * @version $Id: CQLAndNode.java,v 1.4 2002-10-31 22:22:01 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; + } }