@@ -13,11 +13,12 @@ public abstract class CQLBooleanNode extends CQLNode {
1313 public CQLBoolean getOperator () {
1414 return operator ;
1515 }
16-
16+
1717 private CQLNode left ;
1818
1919 /**
2020 * The root of a parse-tree representing the left-hand side.
21+ *
2122 * @return the left operand of this boolean node
2223 */
2324 public CQLNode getLeftOperand () {
@@ -28,6 +29,7 @@ public CQLNode getLeftOperand() {
2829
2930 /**
3031 * The root of a parse-tree representing the right-hand side.
32+ *
3133 * @return the right operand of this boolean node
3234 */
3335 public CQLNode getRightOperand () {
@@ -38,32 +40,33 @@ public CQLNode getRightOperand() {
3840
3941 /**
4042 * The set of modifiers that are applied to this boolean.
43+ *
4144 * @return a list of Modifier objects, which may be empty.
4245 */
4346 public List <Modifier > getModifiers () {
4447 return ms .getModifiers ();
4548 }
4649
4750 protected CQLBooleanNode (CQLNode left , CQLNode right , ModifierSet ms , CQLBoolean operator ) {
48- this .left = left ;
49- this .right = right ;
50- this .ms = ms ;
51+ this .left = left ;
52+ this .right = right ;
53+ this .ms = ms ;
5154 this .operator = operator ;
5255 }
5356
5457 @ Override
5558 public void traverse (CQLNodeVisitor visitor ) {
56- visitor .onBooleanNodeStart (this );
57- left .traverse (visitor );
58- visitor .onBooleanNodeOp (this );
59- right .traverse (visitor );
60- visitor .onBooleanNodeEnd (this );
59+ visitor .onBooleanNodeStart (this );
60+ left .traverse (visitor );
61+ visitor .onBooleanNodeOp (this );
62+ right .traverse (visitor );
63+ visitor .onBooleanNodeEnd (this );
6164 }
6265
6366 @ Override
6467 void toXCQLInternal (XCQLBuilder b , int level ,
65- List <CQLPrefix > prefixes , List <ModifierSet > sortkeys ) {
66- b .indent (level ).append ("<triple>\n " );
68+ List <CQLPrefix > prefixes , List <ModifierSet > sortkeys ) {
69+ b .indent (level ).append ("<triple>\n " );
6770 renderPrefixes (b , level + 1 , prefixes );
6871 ms .toXCQLInternal (b , level + 1 , "boolean" , "value" );
6972 b .indent (level + 1 ).append ("<leftOperand>\n " );
@@ -78,35 +81,37 @@ void toXCQLInternal(XCQLBuilder b, int level,
7881
7982 @ Override
8083 public String toCQL () {
81- // ### We don't always need parens around the operands
82- return ("(" + left .toCQL () + ")" +
83- " " + ms .toCQL () + " " +
84- "(" + right .toCQL () + ")" );
84+ // ### We don't always need parens around the operands
85+ return ("(" + left .toCQL () + ")" +
86+ " " + ms .toCQL () + " " +
87+ "(" + right .toCQL () + ")" );
8588 }
8689
8790 @ Override
8891 public String toPQF (Properties config ) throws PQFTranslationException {
89- return ("@" + opPQF () +
90- " " + left .toPQF (config ) +
91- " " + right .toPQF (config ));
92+ return ("@" + opPQF () +
93+ " " + left .toPQF (config ) +
94+ " " + right .toPQF (config ));
9295 }
9396
9497 // represents the operation for PQF: overridden for CQLProxNode
95- String opPQF () { return ms .getBase (); }
98+ String opPQF () {
99+ return ms .getBase ();
100+ }
96101
97102 @ Override
98103 public byte [] toType1BER (Properties config ) throws PQFTranslationException {
99104 System .out .println ("in CQLBooleanNode.toType1BER(): PQF=" +
100- toPQF (config ));
105+ toPQF (config ));
101106 byte [] rpn1 = left .toType1BER (config );
102107 byte [] rpn2 = right .toType1BER (config );
103108 byte [] op = opType1 ();
104- byte [] rpnStructure = new byte [rpn1 .length + rpn2 .length + op .length + 4 ];
105-
106- // rpnRpnOp
109+ byte [] rpnStructure = new byte [rpn1 .length + rpn2 .length + op .length + 4 ];
110+
111+ // rpnRpnOp
107112 int offset = putTag (CONTEXT , 1 , CONSTRUCTED , rpnStructure , 0 );
108113
109- rpnStructure [offset ++] = (byte )(0x80 & 0xff ); // indefinite length
114+ rpnStructure [offset ++] = (byte ) (0x80 & 0xff ); // indefinite length
110115 System .arraycopy (rpn1 , 0 , rpnStructure , offset , rpn1 .length );
111116 offset += rpn1 .length ;
112117 System .arraycopy (rpn2 , 0 , rpnStructure , offset , rpn2 .length );
0 commit comments