directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: rev 47556 - incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db
Date Thu, 30 Sep 2004 05:42:15 GMT
Author: akarasulu
Date: Wed Sep 29 22:42:13 2004
New Revision: 47556

Added:
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/ExpressionEnumerator.java
      - copied, changed from rev 47553, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/EnumeratorImpl.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/ExpressionEvaluator.java
      - copied, changed from rev 47550, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/EvaluatorImpl.java
Removed:
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/EnumeratorImpl.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/EvaluatorImpl.java
Modified:
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/ConjunctionEnumerator.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/DisjunctionEnumerator.java
   incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/LeafEvaluator.java
Log:
Commit changes ...

  o some formatting
  o moved EvaluatorImpl to ExpressionEvaluator
  o moved EnumeratorImpl to EnumeratorImpl



Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/ConjunctionEnumerator.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/ConjunctionEnumerator.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/ConjunctionEnumerator.java
Wed Sep 29 22:42:13 2004
@@ -58,8 +58,7 @@
     /**
      * @see org.apache.eve.db.Enumerator#enumerate(ExprNode)
      */
-    public NamingEnumeration enumerate( final ExprNode node )
-        throws NamingException
+    public NamingEnumeration enumerate( final ExprNode node ) throws NamingException
     {
         int minIndex = 0;
         int minValue = Integer.MAX_VALUE;

Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/DisjunctionEnumerator.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/DisjunctionEnumerator.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/DisjunctionEnumerator.java
Wed Sep 29 22:42:13 2004
@@ -53,18 +53,15 @@
     /**
      * @see Enumerator#enumerate(ExprNode)
      */
-    public NamingEnumeration enumerate( ExprNode node )
-        throws NamingException
+    public NamingEnumeration enumerate( ExprNode node ) throws NamingException
     {
         ArrayList children = ( ( BranchNode ) node ).getChildren();
-        NamingEnumeration [] childEnumerations = 
-            new NamingEnumeration [children.size()];
+        NamingEnumeration [] childEnumerations = new NamingEnumeration [children.size()];
 
         // Recursively create NamingEnumerations for each child expression node
         for ( int ii = 0; ii < childEnumerations.length; ii++ ) 
         {
-            childEnumerations[ii] =
-                enumerator.enumerate( ( ExprNode ) children.get( ii ) );
+            childEnumerations[ii] = enumerator.enumerate( ( ExprNode ) children.get( ii )
);
         }
 
         return new DisjunctionEnumeration( childEnumerations );

Copied: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/ExpressionEnumerator.java
(from rev 47553, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/EnumeratorImpl.java)
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/EnumeratorImpl.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/ExpressionEnumerator.java
Wed Sep 29 22:42:13 2004
@@ -37,7 +37,7 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class EnumeratorImpl implements Enumerator
+public class ExpressionEnumerator implements Enumerator
 {
     /** The database used by this enumerator */
     private Database db = null;
@@ -51,19 +51,25 @@
     private DisjunctionEnumerator disjunctionEnumerator;
     /** Enumerator flyweight for evaulating filter negation assertions */
     private NegationEnumerator negationEnumerator;
-    /** Evaluator dependency on a LeafNode evaluator */
-    private LeafEvaluator evaluator;
+    /** Evaluator dependency on a LeafNode leafEvaluator */
+    private LeafEvaluator leafEvaluator;
 
 
-    public EnumeratorImpl( Database db, Evaluator topEvaluator,
-                           LeafEvaluator leafEvaluator )
+    public ExpressionEnumerator( Database db,
+                           LeafEvaluator leafEvaluator,
+                           ScopeEnumerator scopeEnumerator,
+                           NegationEnumerator negationEnumerator,
+                           SubstringEnumerator substringEnumerator,
+                           ConjunctionEnumerator conjunctionEnumerator,
+                           DisjunctionEnumerator disjunctionEnumerator )
     {
         this.db = db;
-        scopeEnumerator = new ScopeEnumerator();
-        substringEnumerator = new SubstringEnumerator();
-        conjunctionEnumerator = new ConjunctionEnumerator( this, topEvaluator );
-        disjunctionEnumerator = new DisjunctionEnumerator( this );
-        negationEnumerator = new NegationEnumerator();
+        this.leafEvaluator = leafEvaluator;
+        this.scopeEnumerator = scopeEnumerator;
+        this.negationEnumerator = negationEnumerator;
+        this.substringEnumerator = substringEnumerator;
+        this.conjunctionEnumerator = conjunctionEnumerator;
+        this.disjunctionEnumerator = disjunctionEnumerator;
     }
 
 
@@ -234,7 +240,7 @@
             public boolean assertCandidate( IndexRecord record ) 
                 throws NamingException
             {
-                return evaluator.evaluate( node, record );
+                return leafEvaluator.evaluate( node, record );
             }
         };
         

Copied: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/ExpressionEvaluator.java
(from rev 47550, incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/EvaluatorImpl.java)
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/EvaluatorImpl.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/ExpressionEvaluator.java
Wed Sep 29 22:42:13 2004
@@ -31,7 +31,7 @@
  * @author <a href="mailto:directory-dev@incubator.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class EvaluatorImpl implements Evaluator
+public class ExpressionEvaluator implements Evaluator
 {
     /** Leaf Evaluator flyweight use for leaf filter assertions */
     private LeafEvaluator leafEvaluator;
@@ -42,7 +42,7 @@
      *
      * @param leafEvaluator handles leaf node evaluation.
      */
-    public EvaluatorImpl( LeafEvaluator leafEvaluator )
+    public ExpressionEvaluator( LeafEvaluator leafEvaluator )
     {
         this.leafEvaluator = leafEvaluator;
     }

Modified: incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/LeafEvaluator.java
==============================================================================
--- incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/LeafEvaluator.java
(original)
+++ incubator/directory/eve/trunk/backend/core/src/java/org/apache/eve/db/LeafEvaluator.java
Wed Sep 29 22:42:13 2004
@@ -57,12 +57,20 @@
     private ScopeEvaluator scopeEvaluator;
 
 
-
+    /**
+     * Creates a leaf expression node evaluator.
+     *
+     * @param db
+     * @param scopeEvaluator
+     * @param normalizerRegistry
+     * @param comparatorRegistry
+     * @param substringEvaluator
+     */
     public LeafEvaluator( Database db,
-                              ScopeEvaluator scopeEvaluator,
-                              NormalizerRegistry normalizerRegistry,
-                              ComparatorRegistry comparatorRegistry,
-                              SubstringEvaluator substringEvaluator )
+                          ScopeEvaluator scopeEvaluator,
+                          NormalizerRegistry normalizerRegistry,
+                          ComparatorRegistry comparatorRegistry,
+                          SubstringEvaluator substringEvaluator )
     {
         this.db = db;
         this.scopeEvaluator = scopeEvaluator;

Mime
View raw message