Author: sshafroi
Date: 2008-11-25 16:09:00 +0100 (Tue, 25 Nov 2008)
New Revision: 6985

Added:
   branches/2.18/query-api/src/main/java/no/sesat/search/query/BinaryClause.java
Removed:
   
branches/2.18/query-api/src/main/java/no/sesat/search/query/BinaryOperatorClause.java
Modified:
   
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/ExactMatchQueryTransformer.java
   
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/LowercaseQueryTransformer.java
   
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/RegexpQueryTransformer.java
   
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/TokenMaskQueryTransformer.java
   branches/2.18/query-api/src/main/java/no/sesat/search/query/AndClause.java
   
branches/2.18/query-api/src/main/java/no/sesat/search/query/DefaultOperatorClause.java
   branches/2.18/query-api/src/main/java/no/sesat/search/query/OrClause.java
   
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/ChildFinder.java
   
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/Counter.java
   
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/ForestFinder.java
   
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/ParentFinder.java
   
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/PredicateCollector.java
   
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/PredicateFinder.java
   
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/WhoWhereSplitter.java
   
branches/2.18/query-api/src/main/java/no/sesat/search/query/parser/alt/AbstractAlternation.java
   
branches/2.18/query-api/src/main/java/no/sesat/search/query/parser/alt/FullnameAlternation.java
   
branches/2.18/query-api/src/main/java/no/sesat/search/query/parser/alt/RotationAlternation.java
   
branches/2.18/query-transform-control-spi/src/main/java/no/sesat/search/query/transform/DefaultInitialisationQueryTransformer.java
   
branches/2.18/query-transform-control-spi/src/main/java/no/sesat/search/query/transform/SynonymQueryTransformer.java
   
branches/2.18/search-command-control-spi/src/main/java/no/sesat/search/mode/command/querybuilder/AbstractQueryBuilder.java
   
branches/2.18/search-command-control-spi/src/main/java/no/sesat/search/mode/command/querybuilder/BaseFilterBuilder.java
Log:
rename class, before 2.18 is written in stone.




Modified: 
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/ExactMatchQueryTransformer.java
===================================================================
--- 
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/ExactMatchQueryTransformer.java
   2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/ExactMatchQueryTransformer.java
   2008-11-25 15:09:00 UTC (rev 6985)
@@ -20,7 +20,7 @@
 import java.util.Map;
 import no.sesat.search.query.AndNotClause;
 import no.sesat.search.query.Clause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.NotClause;
 import no.sesat.search.query.UnaryClause;
@@ -91,7 +91,7 @@
      *
      * @param clause The clause to prefix.
      */
-    public void visitImpl(final BinaryOperatorClause clause) {
+    public void visitImpl(final BinaryClause clause) {
 
         // remember what visitingLast was
         final Boolean original = visitingLast;

Modified: 
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/LowercaseQueryTransformer.java
===================================================================
--- 
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/LowercaseQueryTransformer.java
    2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/LowercaseQueryTransformer.java
    2008-11-25 15:09:00 UTC (rev 6985)
@@ -21,7 +21,7 @@
 import java.util.regex.Pattern;
 import java.util.regex.Matcher;
 import no.sesat.search.query.Clause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.UnaryClause;
 import org.apache.log4j.Logger;
@@ -57,7 +57,7 @@
      *
      * @param clause The clause to prefix.
      */
-    public void visitImpl(final BinaryOperatorClause clause) {
+    public void visitImpl(final BinaryClause clause) {
         clause.getFirstClause().accept(this);
         clause.getSecondClause().accept(this);
     }

Modified: 
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/RegexpQueryTransformer.java
===================================================================
--- 
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/RegexpQueryTransformer.java
       2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/RegexpQueryTransformer.java
       2008-11-25 15:09:00 UTC (rev 6985)
@@ -21,7 +21,7 @@
 import java.util.regex.Pattern;
 import java.util.regex.Matcher;
 import no.sesat.search.query.Clause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.UnaryClause;
 import org.apache.log4j.Logger;
@@ -80,7 +80,7 @@
      *
      * @param clause The clause to prefix.
      */
-    public void visitImpl(final BinaryOperatorClause clause) {
+    public void visitImpl(final BinaryClause clause) {
         clause.getFirstClause().accept(this);
         clause.getSecondClause().accept(this);
     }

Modified: 
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/TokenMaskQueryTransformer.java
===================================================================
--- 
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/TokenMaskQueryTransformer.java
    2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/generic.sesam/query-transform-control/src/main/java/no/sesat/search/query/transform/TokenMaskQueryTransformer.java
    2008-11-25 15:09:00 UTC (rev 6985)
@@ -22,7 +22,7 @@
 import java.util.Set;
 import no.sesat.search.query.Clause;
 import no.sesat.search.query.DefaultOperatorClause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.PhraseClause;
 import no.sesat.search.query.token.TokenEvaluationEngine;
@@ -66,7 +66,7 @@
     }
 
     /** TODO comment me. **/
-    protected void visitImpl(final BinaryOperatorClause clause) {
+    protected void visitImpl(final BinaryClause clause) {
 
         clause.getFirstClause().accept(this);
 

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/AndClause.java
===================================================================
--- branches/2.18/query-api/src/main/java/no/sesat/search/query/AndClause.java  
2008-11-25 15:03:37 UTC (rev 6984)
+++ branches/2.18/query-api/src/main/java/no/sesat/search/query/AndClause.java  
2008-11-25 15:09:00 UTC (rev 6985)
@@ -27,6 +27,6 @@
  * @version $Id$
  *
  */
-public interface AndClause extends BinaryOperatorClause{
+public interface AndClause extends BinaryClause{
 
 }

Added: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/BinaryClause.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/BinaryClause.java   
                            (rev 0)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/BinaryClause.java   
    2008-11-25 15:09:00 UTC (rev 6985)
@@ -0,0 +1,38 @@
+/* Copyright (2005-2008) Schibsted Søk AS
+ * This file is part of SESAT.
+ *
+ *   SESAT is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU Affero General Public License as published 
by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   SESAT is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU Affero General Public License for more details.
+ *
+ *   You should have received a copy of the GNU Affero General Public License
+ *   along with SESAT.  If not, see <http://www.gnu.org/licenses/>.
+ * DoubleOperatorClause.java
+ *
+ * Created on 11 January 2006, 14:16
+ *
+ */
+
+package no.sesat.search.query;
+
+
+/** An operation clause. A join between two other clauses.
+ *
+ * @version $Id: OperationClause.java 3359 2006-08-03 08:13:22Z mickw $
+ *
+ */
+public interface BinaryClause extends UnaryClause {
+    /**
+     * Get the second clause.
+     *
+     * @return the second clause.
+     */
+    Clause getSecondClause();
+
+}

Deleted: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/BinaryOperatorClause.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/BinaryOperatorClause.java
       2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/BinaryOperatorClause.java
       2008-11-25 15:09:00 UTC (rev 6985)
@@ -1,38 +0,0 @@
-/* Copyright (2005-2008) Schibsted Søk AS
- * This file is part of SESAT.
- *
- *   SESAT is free software: you can redistribute it and/or modify
- *   it under the terms of the GNU Affero General Public License as published 
by
- *   the Free Software Foundation, either version 3 of the License, or
- *   (at your option) any later version.
- *
- *   SESAT is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Affero General Public License for more details.
- *
- *   You should have received a copy of the GNU Affero General Public License
- *   along with SESAT.  If not, see <http://www.gnu.org/licenses/>.
- * DoubleOperatorClause.java
- *
- * Created on 11 January 2006, 14:16
- *
- */
-
-package no.sesat.search.query;
-
-
-/** An operation clause. A join between two other clauses.
- *
- * @version $Id: OperationClause.java 3359 2006-08-03 08:13:22Z mickw $
- *
- */
-public interface BinaryOperatorClause extends UnaryClause {
-    /**
-     * Get the second clause.
-     *
-     * @return the second clause.
-     */
-    Clause getSecondClause();
-
-}

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/DefaultOperatorClause.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/DefaultOperatorClause.java
      2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/DefaultOperatorClause.java
      2008-11-25 15:09:00 UTC (rev 6985)
@@ -25,6 +25,6 @@
  * @version $Id$
  *
  */
-public interface DefaultOperatorClause extends BinaryOperatorClause {
+public interface DefaultOperatorClause extends BinaryClause {
 
 }

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/OrClause.java
===================================================================
--- branches/2.18/query-api/src/main/java/no/sesat/search/query/OrClause.java   
2008-11-25 15:03:37 UTC (rev 6984)
+++ branches/2.18/query-api/src/main/java/no/sesat/search/query/OrClause.java   
2008-11-25 15:09:00 UTC (rev 6985)
@@ -28,6 +28,6 @@
  * @version $Id$
  *
  */
-public interface OrClause extends BinaryOperatorClause {
+public interface OrClause extends BinaryClause {
 
 }

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/ChildFinder.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/ChildFinder.java
 2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/ChildFinder.java
 2008-11-25 15:09:00 UTC (rev 6985)
@@ -17,7 +17,7 @@
 package no.sesat.search.query.finder;
 
 import no.sesat.search.query.Clause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.UnaryClause;
 import no.sesat.search.query.parser.*;
@@ -46,7 +46,7 @@
         return found;
     }
 
-    protected void visitImpl(final BinaryOperatorClause clause) {
+    protected void visitImpl(final BinaryClause clause) {
         if (!found) { // still looking
             clause.getFirstClause().accept(this);
             clause.getSecondClause().accept(this);

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/Counter.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/Counter.java 
    2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/Counter.java 
    2008-11-25 15:09:00 UTC (rev 6985)
@@ -18,7 +18,7 @@
 
 import java.io.Serializable;
 import no.sesat.search.query.Clause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.UnaryClause;
 import no.sesat.search.query.XorClause;
@@ -70,7 +70,7 @@
      *
      * @param clause
      */
-    protected void visitImpl(final BinaryOperatorClause clause) {
+    protected void visitImpl(final BinaryClause clause) {
         clause.getFirstClause().accept(this);
         clause.getSecondClause().accept(this);
     }

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/ForestFinder.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/ForestFinder.java
        2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/ForestFinder.java
        2008-11-25 15:09:00 UTC (rev 6985)
@@ -20,7 +20,7 @@
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.UnaryClause;
 import no.sesat.search.query.XorClause;
@@ -39,7 +39,7 @@
     private static final Logger LOG = Logger.getLogger(ForestFinder.class);
     private static final String DEBUG_COUNT_TO = " trees in forest ";
     private boolean searching = false;
-    private final List<BinaryOperatorClause> roots = new 
ArrayList<BinaryOperatorClause>();
+    private final List<BinaryClause> roots = new ArrayList<BinaryClause>();
 
     private static final String ERR_CANNOT_CALL_VISIT_DIRECTLY
             = "visit(object) can't be called directly on this visitor!";
@@ -49,7 +49,7 @@
      * @param root
      * @return
      */
-    public synchronized List<BinaryOperatorClause> findForestRoots(final 
UnaryClause root) {
+    public synchronized List<BinaryClause> findForestRoots(final UnaryClause 
root) {
 
         if (searching) {
             throw new IllegalStateException(ERR_CANNOT_CALL_VISIT_DIRECTLY);
@@ -58,7 +58,7 @@
         roots.clear();
         visit(root);
         searching = false;
-        return Collections.unmodifiableList(new 
ArrayList<BinaryOperatorClause>(roots));
+        return Collections.unmodifiableList(new 
ArrayList<BinaryClause>(roots));
     }
 
 
@@ -85,9 +85,9 @@
      *
      * @param clause
      */
-    protected void visitImpl(final BinaryOperatorClause clause) {
+    protected void visitImpl(final BinaryClause clause) {
 
-        final BinaryOperatorClause forestDepth = forestWalk(clause);
+        final BinaryClause forestDepth = forestWalk(clause);
         clause.getFirstClause().accept(this);
         forestDepth.getSecondClause().accept(this);
     }
@@ -103,7 +103,7 @@
     /** Returns the deepest tree in the forest.
      * And adds the forest to the roots if it contains more than one tree.
      **/
-    private <T extends BinaryOperatorClause> T forestWalk(final T clause){
+    private <T extends BinaryClause> T forestWalk(final T clause){
 
         int count = 1;
         T forestDepth = clause;

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/ParentFinder.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/ParentFinder.java
        2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/ParentFinder.java
        2008-11-25 15:09:00 UTC (rev 6985)
@@ -23,7 +23,7 @@
 import java.util.List;
 import java.util.Map;
 import no.sesat.search.query.Clause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.UnaryClause;
 import no.sesat.search.query.parser.AbstractReflectionVisitor;
@@ -135,7 +135,7 @@
         innerCache.put(child, new ArrayList<UnaryClause>(parents));
     }
 
-    private synchronized <T extends BinaryOperatorClause> void 
findParentsImpl(final Clause root, final Clause child) {
+    private synchronized <T extends BinaryClause> void findParentsImpl(final 
Clause root, final Clause child) {
 
         this.child = child;
         if (searching || child == null) {
@@ -177,7 +177,7 @@
      *
      * @param clause
      */
-    protected void visitImpl(final BinaryOperatorClause clause) {
+    protected void visitImpl(final BinaryClause clause) {
 
         if (!singleMode || parents.size() == 0) {
 

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/PredicateCollector.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/PredicateCollector.java
  2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/PredicateCollector.java
  2008-11-25 15:09:00 UTC (rev 6985)
@@ -26,7 +26,7 @@
 import java.util.HashSet;
 import java.util.Set;
 import no.sesat.search.query.AndNotClause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.Query;
 import no.sesat.search.query.XorClause;
 import no.sesat.search.query.parser.AbstractReflectionVisitor;
@@ -74,7 +74,7 @@
 
 
     /** TODO comment me. **/
-    protected void visitImpl(final BinaryOperatorClause clause) {
+    protected void visitImpl(final BinaryClause clause) {
 
         clause.getFirstClause().accept(this);
         collect(clause);

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/PredicateFinder.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/PredicateFinder.java
     2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/PredicateFinder.java
     2008-11-25 15:09:00 UTC (rev 6985)
@@ -26,7 +26,7 @@
 import java.util.HashSet;
 import java.util.Set;
 import no.sesat.search.query.AndNotClause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.XorClause;
 import no.sesat.search.query.parser.AbstractReflectionVisitor;
 import no.sesat.search.query.Clause;
@@ -105,7 +105,7 @@
     /** TODO comment me. *
      * @param clause
      */
-    protected void visitImpl(final BinaryOperatorClause clause) {
+    protected void visitImpl(final BinaryClause clause) {
 
         if(null == firstClause){
             evaluate(clause);

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/WhoWhereSplitter.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/WhoWhereSplitter.java
    2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/finder/WhoWhereSplitter.java
    2008-11-25 15:09:00 UTC (rev 6985)
@@ -30,7 +30,7 @@
 import no.sesat.search.query.AndNotClause;
 import no.sesat.search.query.Clause;
 import no.sesat.search.query.DefaultOperatorClause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.NotClause;
 import no.sesat.search.query.UnaryClause;
@@ -235,7 +235,7 @@
      *
      * @param clause
      */
-    protected void visitImpl(final BinaryOperatorClause clause) {
+    protected void visitImpl(final BinaryClause clause) {
 
         if(validQuery){
             clause.getFirstClause().accept(this);
@@ -316,7 +316,7 @@
             }
         }
 
-        protected void visitImpl(final BinaryOperatorClause clause) {
+        protected void visitImpl(final BinaryClause clause) {
 
             if(!(hasCompany && hasFullname) && !multipleCompany && 
!multipleFullname){
                 clause.getFirstClause().accept(this);

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/parser/alt/AbstractAlternation.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/parser/alt/AbstractAlternation.java
     2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/parser/alt/AbstractAlternation.java
     2008-11-25 15:09:00 UTC (rev 6985)
@@ -26,7 +26,7 @@
 import no.sesat.search.query.AndNotClause;
 import no.sesat.search.query.Clause;
 import no.sesat.search.query.DefaultOperatorClause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.NotClause;
 import no.sesat.search.query.UnaryClause;
 import no.sesat.search.query.OrClause;
@@ -80,7 +80,7 @@
      * @param clause
      * @return
      */
-    protected <T extends BinaryOperatorClause> T leftOpChild(final T clause){
+    protected <T extends BinaryClause> T leftOpChild(final T clause){
 
         final Clause c = leftChild(clause);
         return clause.getClass().isAssignableFrom(c.getClass()) ? (T) c : null;
@@ -101,7 +101,7 @@
      * @param clause
      * @return
      */
-    protected <T extends BinaryOperatorClause> T rightOpChild(final T clause){
+    protected <T extends BinaryClause> T rightOpChild(final T clause){
 
         final Clause c = rightChild(clause);
         return clause.getClass().isAssignableFrom(c.getClass()) ? (T) c : null;
@@ -111,7 +111,7 @@
      * @param clause
      * @return
      */
-    protected Clause rightChild(final BinaryOperatorClause clause) {
+    protected Clause rightChild(final BinaryClause clause) {
 
         final Clause c = clause.getSecondClause();
         LOG.trace("rightChild -->" + c);
@@ -161,10 +161,10 @@
      * @return the root clause where the originalChild has been replaced with 
the newChild.
      */
     protected UnaryClause replaceDescendant(
-            final BinaryOperatorClause root,
-            final BinaryOperatorClause newChild,
-            final BinaryOperatorClause originalChild,
-            final BinaryOperatorClause originalParent){
+            final BinaryClause root,
+            final BinaryClause newChild,
+            final BinaryClause originalChild,
+            final BinaryClause originalParent){
 
         // pre-condition check: originalParent must be found under root 
somewhere
         if(new ChildFinder().childExists(root, originalParent)){
@@ -213,11 +213,11 @@
 
         final Clause rightChild;
 
-        if(originalParent instanceof BinaryOperatorClause){
+        if(originalParent instanceof BinaryClause){
 
-            rightChild = rightChild((BinaryOperatorClause)originalParent) == 
originalChild
+            rightChild = rightChild((BinaryClause)originalParent) == 
originalChild
                             ? newChild
-                            : rightChild((BinaryOperatorClause)originalParent);
+                            : rightChild((BinaryClause)originalParent);
         }else{
             rightChild = null;
         }

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/parser/alt/FullnameAlternation.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/parser/alt/FullnameAlternation.java
     2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/parser/alt/FullnameAlternation.java
     2008-11-25 15:09:00 UTC (rev 6985)
@@ -25,7 +25,7 @@
 import java.util.Set;
 import no.sesat.search.query.Clause;
 import no.sesat.search.query.DefaultOperatorClause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.OrClause;
 import no.sesat.search.query.PhraseClause;
 import no.sesat.search.query.XorClause;
@@ -157,13 +157,13 @@
                 LOG.debug("XorClause created " + xorClause);
 
                 // replace fullname with the new xorClause
-                final BinaryOperatorClause fullnameParent = result == fullname
+                final BinaryClause fullnameParent = result == fullname
                         ? doFullname
-                        : (BinaryOperatorClause) 
context.getParentFinder().getParent(result, fullname);
+                        : (BinaryClause) 
context.getParentFinder().getParent(result, fullname);
 
                 result = result == fullname
                         ? xorClause
-                        : replaceDescendant((BinaryOperatorClause)result, 
xorClause, doFullname, fullnameParent);
+                        : replaceDescendant((BinaryClause)result, xorClause, 
doFullname, fullnameParent);
                 LOG.debug("Updated root to " + result);
             }
         }

Modified: 
branches/2.18/query-api/src/main/java/no/sesat/search/query/parser/alt/RotationAlternation.java
===================================================================
--- 
branches/2.18/query-api/src/main/java/no/sesat/search/query/parser/alt/RotationAlternation.java
     2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-api/src/main/java/no/sesat/search/query/parser/alt/RotationAlternation.java
     2008-11-25 15:09:00 UTC (rev 6985)
@@ -28,7 +28,7 @@
 import java.util.Map;
 import java.util.Map.Entry;
 import no.sesat.search.query.Clause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.UnaryClause;
 import no.sesat.search.query.XorClause;
 import no.sesat.search.query.XorClause.Hint;
@@ -156,17 +156,17 @@
 
 
     /** mappings from the newly rotated clause to the same original clause **/
-    private final Map<BinaryOperatorClause,BinaryOperatorClause> 
originalFromNew
-            = new HashMap<BinaryOperatorClause,BinaryOperatorClause>();
+    private final Map<BinaryClause,BinaryClause> originalFromNew
+            = new HashMap<BinaryClause,BinaryClause>();
     /** mappings from the original clause to the same newly rotated clause **/
-    private final Map<BinaryOperatorClause,BinaryOperatorClause> 
newFromOriginal
-            = new HashMap<BinaryOperatorClause,BinaryOperatorClause>();
+    private final Map<BinaryClause,BinaryClause> newFromOriginal
+            = new HashMap<BinaryClause,BinaryClause>();
     /** mappings from the newly rotated clause to the same unrotated clause **/
-    private final Map<BinaryOperatorClause,BinaryOperatorClause> 
beforeRotationFromNew
-            = new HashMap<BinaryOperatorClause,BinaryOperatorClause>();
+    private final Map<BinaryClause,BinaryClause> beforeRotationFromNew
+            = new HashMap<BinaryClause,BinaryClause>();
     /** mappings from the original to the unrotated clause */
-    private final Map<BinaryOperatorClause,BinaryOperatorClause> 
beforeRotationFromOriginal
-            = new HashMap<BinaryOperatorClause,BinaryOperatorClause>();
+    private final Map<BinaryClause,BinaryClause> beforeRotationFromOriginal
+            = new HashMap<BinaryClause,BinaryClause>();
 
     // Static --------------------------------------------------------
 
@@ -197,17 +197,17 @@
             // TODO handle forests hidden behind SingleOperatorClauses (NOT 
and ANDNO)
             //  although queries rarely start with such clauses.
             // XXX This implementation only handles forests that exist down 
the right branch only.
-            if(originalRoot instanceof BinaryOperatorClause){
+            if(originalRoot instanceof BinaryClause){
 
                 LOG.debug(DEBUG_STARTING_ROTATIONS);
-                BinaryOperatorClause root = (BinaryOperatorClause) 
originalRoot;
+                BinaryClause root = (BinaryClause) originalRoot;
 
-                final List<BinaryOperatorClause> forestRoots = new 
ForestFinder().findForestRoots(root);
+                final List<BinaryClause> forestRoots = new 
ForestFinder().findForestRoots(root);
                 LOG.debug(DEBUG_FOUND_FORESTS + forestRoots.size());
 
-                for(BinaryOperatorClause clause : forestRoots){
+                for(BinaryClause clause : forestRoots){
 
-                    final LinkedList<? extends BinaryOperatorClause> rotations 
= createForestRotation(clause);
+                    final LinkedList<? extends BinaryClause> rotations = 
createForestRotation(clause);
 
                     final XorClause result = createXorClause(rotations);
                     // search in root for all occurances of clause and 
'replaceDescendant' on each.
@@ -215,9 +215,9 @@
                         root = result;
                     }else{
                         // search in root for all occurances of clause and 
'replaceDescendant' on each.
-                        final List<BinaryOperatorClause> parents = 
parents(root, clause);
-                        for(BinaryOperatorClause clauseParent : parents){
-                            root = 
(BinaryOperatorClause)replaceDescendant(root, result, clause, clauseParent);
+                        final List<BinaryClause> parents = parents(root, 
clause);
+                        for(BinaryClause clauseParent : parents){
+                            root = (BinaryClause)replaceDescendant(root, 
result, clause, clauseParent);
                         }
                     }
 
@@ -255,9 +255,9 @@
         final T clause = super.createOperatorClause(left, right, 
replacementFor);
 
         // update our mappings between rotations
-        if(replacementFor instanceof BinaryOperatorClause && clause instanceof 
BinaryOperatorClause){
-            final BinaryOperatorClause rf = 
(BinaryOperatorClause)replacementFor;
-            final BinaryOperatorClause c = (BinaryOperatorClause)clause;
+        if(replacementFor instanceof BinaryClause && clause instanceof 
BinaryClause){
+            final BinaryClause rf = (BinaryClause)replacementFor;
+            final BinaryClause c = (BinaryClause)clause;
             originalFromNew.put(c, rf);
             newFromOriginal.put(rf, c);
             beforeRotationFromNew.put(c, beforeRotationFromOriginal.get(rf));
@@ -273,7 +273,7 @@
 
     // Private -------------------------------------------------------
 
-    private <T extends BinaryOperatorClause> LinkedList<T> 
createForestRotation(
+    private <T extends BinaryClause> LinkedList<T> createForestRotation(
             final T oForestRoot) {
 
         LOG.debug("==== STARTING ROTATION ON " + oForestRoot + " ====");
@@ -301,7 +301,7 @@
 
             // clear mappings
             beforeRotationFromOriginal.clear();
-            for (Entry<BinaryOperatorClause,BinaryOperatorClause> entry : 
beforeRotationFromNew.entrySet()) {
+            for (Entry<BinaryClause,BinaryClause> entry : 
beforeRotationFromNew.entrySet()) {
 
                 // reverse key to values in each entry
                 // entry.getValue() is NOT new!!
@@ -340,7 +340,7 @@
     }
 
 
-    private <T extends BinaryOperatorClause> T rotate(
+    private <T extends BinaryClause> T rotate(
             final T oForestRoot, // from original
             final T oIterate,  // from original
             final T rTop,  // from last rotation
@@ -395,7 +395,7 @@
             // loop rebuilding the tree, only replacing old instances with new 
instances.
         final T rForestRoot = (T) beforeRotationFromOriginal.get(oForestRoot);
         if(beforeRotationFromNew.size() != beforeRotationFromOriginal.size()){
-            nOrphan = replaceDescendant(rForestRoot, (BinaryOperatorClause) 
nOrphan, rTop, parent(rForestRoot,rTop)); // XXX last argument needs to be from 
orginal branch
+            nOrphan = replaceDescendant(rForestRoot, (BinaryClause) nOrphan, 
rTop, parent(rForestRoot,rTop)); // XXX last argument needs to be from orginal 
branch
         }
         return (T) nOrphan;
     }

Modified: 
branches/2.18/query-transform-control-spi/src/main/java/no/sesat/search/query/transform/DefaultInitialisationQueryTransformer.java
===================================================================
--- 
branches/2.18/query-transform-control-spi/src/main/java/no/sesat/search/query/transform/DefaultInitialisationQueryTransformer.java
  2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-transform-control-spi/src/main/java/no/sesat/search/query/transform/DefaultInitialisationQueryTransformer.java
  2008-11-25 15:09:00 UTC (rev 6985)
@@ -17,7 +17,7 @@
  */
 package no.sesat.search.query.transform;
 
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.UnaryClause;
 import no.sesat.search.query.transform.AbstractQueryTransformer;
@@ -65,7 +65,7 @@
         clause.getFirstClause().accept(this);
     }
 
-    protected void visitImpl(final BinaryOperatorClause clause) {
+    protected void visitImpl(final BinaryClause clause) {
 
         clause.getFirstClause().accept(this);
         clause.getSecondClause().accept(this);

Modified: 
branches/2.18/query-transform-control-spi/src/main/java/no/sesat/search/query/transform/SynonymQueryTransformer.java
===================================================================
--- 
branches/2.18/query-transform-control-spi/src/main/java/no/sesat/search/query/transform/SynonymQueryTransformer.java
        2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/query-transform-control-spi/src/main/java/no/sesat/search/query/transform/SynonymQueryTransformer.java
        2008-11-25 15:09:00 UTC (rev 6985)
@@ -35,7 +35,7 @@
 import java.util.Set;
 
 import no.sesat.search.query.DefaultOperatorClause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.UnaryClause;
 import no.sesat.search.query.Query;
@@ -113,7 +113,7 @@
     }
 
     /** TODO comment me. **/
-    protected void visitImpl(final BinaryOperatorClause clause) {
+    protected void visitImpl(final BinaryClause clause) {
 
         LOG.trace("visitImpl(" + clause + ')');
 

Modified: 
branches/2.18/search-command-control-spi/src/main/java/no/sesat/search/mode/command/querybuilder/AbstractQueryBuilder.java
===================================================================
--- 
branches/2.18/search-command-control-spi/src/main/java/no/sesat/search/mode/command/querybuilder/AbstractQueryBuilder.java
  2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/search-command-control-spi/src/main/java/no/sesat/search/mode/command/querybuilder/AbstractQueryBuilder.java
  2008-11-25 15:09:00 UTC (rev 6985)
@@ -21,7 +21,7 @@
 import java.util.regex.Pattern;
 import no.sesat.search.mode.config.querybuilder.QueryBuilderConfig;
 import no.sesat.search.query.Clause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.NotClause;
 import no.sesat.search.query.UnaryClause;
@@ -139,8 +139,8 @@
 
         boolean result = false;
 
-        if(clause instanceof BinaryOperatorClause){
-            final BinaryOperatorClause c = (BinaryOperatorClause)clause;
+        if(clause instanceof BinaryClause){
+            final BinaryClause c = (BinaryClause)clause;
             result = isEmptyLeaf(c.getFirstClause()) && 
isEmptyLeaf(c.getSecondClause());
 
         }else if(clause instanceof UnaryClause){

Modified: 
branches/2.18/search-command-control-spi/src/main/java/no/sesat/search/mode/command/querybuilder/BaseFilterBuilder.java
===================================================================
--- 
branches/2.18/search-command-control-spi/src/main/java/no/sesat/search/mode/command/querybuilder/BaseFilterBuilder.java
     2008-11-25 15:03:37 UTC (rev 6984)
+++ 
branches/2.18/search-command-control-spi/src/main/java/no/sesat/search/mode/command/querybuilder/BaseFilterBuilder.java
     2008-11-25 15:09:00 UTC (rev 6985)
@@ -21,7 +21,7 @@
 import no.sesat.search.mode.config.querybuilder.QueryBuilderConfig;
 import no.sesat.search.query.AndNotClause;
 import no.sesat.search.query.Clause;
-import no.sesat.search.query.BinaryOperatorClause;
+import no.sesat.search.query.BinaryClause;
 import no.sesat.search.query.LeafClause;
 import no.sesat.search.query.NotClause;
 import no.sesat.search.query.PhraseClause;
@@ -152,7 +152,7 @@
         }
     }
 
-    protected void visitImpl(final BinaryOperatorClause clause) {
+    protected void visitImpl(final BinaryClause clause) {
         clause.getFirstClause().accept(this);
         clause.getSecondClause().accept(this);
     }

_______________________________________________
Kernel-commits mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-commits

Reply via email to