directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r640664 - in /directory/sandbox/akarasulu/bigbang/apacheds: ./ btree-base/src/main/java/org/apache/directory/server/xdbm/search/ core/src/main/java/org/apache/directory/server/core/partition/impl/btree/ core/src/main/java/org/apache/directo...
Date Tue, 25 Mar 2008 01:21:24 GMT
Author: akarasulu
Date: Mon Mar 24 18:21:22 2008
New Revision: 640664

URL: http://svn.apache.org/viewvc?rev=640664&view=rev
Log:
changing module organization ...

 o created new xdbm-search module to contain the default search engine
   implementation which was previously in the core
 o using org.apache.directory.server.xdbm.search as package base for all search
   engine related interfaces and implementations
 o moved SearchEngine and Optimizer interfaces with slight changes to remove
   JNDI dependence (still depends on SearchControls tho) into btree-base which
   will be renamed to xdbm once we're done
 o added xdbm-search to apacheds/pom.xml


Added:
    directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/
    directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/Optimizer.java
  (contents, props changed)
      - copied, changed from r640646, directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/Optimizer.java
    directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java
  (contents, props changed)
      - copied, changed from r640646, directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SearchEngine.java
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/   (with props)
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/pom.xml
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/main/java/org/apache/directory/server/xdbm/search/impl/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/org/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/org/apache/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/org/apache/directory/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/org/apache/directory/server/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/org/apache/directory/server/xdbm/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/java/org/apache/directory/server/xdbm/search/impl/
    directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/src/test/resources/
Removed:
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/Optimizer.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SearchEngine.java
Modified:
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/NoOpOptimizer.java
    directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
    directory/sandbox/akarasulu/bigbang/apacheds/pom.xml

Copied: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/Optimizer.java
(from r640646, directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/Optimizer.java)
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/Optimizer.java?p2=directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/Optimizer.java&p1=directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/Optimizer.java&r1=640646&r2=640664&rev=640664&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/Optimizer.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/Optimizer.java
Mon Mar 24 18:21:22 2008
@@ -17,7 +17,7 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.server.core.partition.impl.btree;
+package org.apache.directory.server.xdbm.search;
 
 
 import javax.naming.NamingException;

Propchange: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/Optimizer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/Optimizer.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Mar 24 18:21:22 2008
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Copied: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java
(from r640646, directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SearchEngine.java)
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java?p2=directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java&p1=directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SearchEngine.java&r1=640646&r2=640664&rev=640664&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/SearchEngine.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java
Mon Mar 24 18:21:22 2008
@@ -17,16 +17,16 @@
  *  under the License. 
  *  
  */
-package org.apache.directory.server.core.partition.impl.btree;
+package org.apache.directory.server.xdbm.search;
 
 
 import org.apache.directory.shared.ldap.constants.JndiPropertyConstants;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.server.xdbm.IndexEntry;
+import org.apache.directory.server.core.cursor.Cursor;
 
-import javax.naming.Name;
-import javax.naming.NamingEnumeration;
-import javax.naming.NamingException;
 import javax.naming.directory.SearchControls;
 
 
@@ -37,7 +37,7 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public interface SearchEngine
+public interface SearchEngine<E>
 {
     /**
      * @todo put this in the right place
@@ -84,8 +84,10 @@
      * @return enumeration over SearchResults
      * @throws Exception if the search fails
      */
-    NamingEnumeration<IndexRecord> search( Name base, AliasDerefMode aliasDerefMode,
ExprNode filter,
-                              SearchControls searchCtls ) throws Exception;
+    Cursor<IndexEntry<Long,E>> search( LdapDN base,
+                                       AliasDerefMode aliasDerefMode,
+                                       ExprNode filter,
+                                       SearchControls searchCtls ) throws Exception;
 
 
     /**

Propchange: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: directory/sandbox/akarasulu/bigbang/apacheds/btree-base/src/main/java/org/apache/directory/server/xdbm/search/SearchEngine.java
------------------------------------------------------------------------------
--- svn:keywords (added)
+++ svn:keywords Mon Mar 24 18:21:22 2008
@@ -0,0 +1,4 @@
+Rev
+Revision
+Date
+Id

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java?rev=640664&r1=640663&r2=640664&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/BTreePartition.java
Mon Mar 24 18:21:22 2008
@@ -40,9 +40,9 @@
 import org.apache.directory.server.core.partition.Partition;
 import org.apache.directory.server.core.partition.impl.btree.gui.PartitionViewer;
 import org.apache.directory.server.schema.registries.Registries;
-import org.apache.directory.server.xdbm.ForwardIndexEntry;
-import org.apache.directory.server.xdbm.Index;
-import org.apache.directory.server.xdbm.IndexNotFoundException;
+import org.apache.directory.server.xdbm.*;
+import org.apache.directory.server.xdbm.search.Optimizer;
+import org.apache.directory.server.xdbm.search.SearchEngine;
 import org.apache.directory.shared.ldap.exception.LdapContextNotEmptyException;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.message.AttributesImpl;

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java?rev=640664&r1=640663&r2=640664&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultOptimizer.java
Mon Mar 24 18:21:22 2008
@@ -42,6 +42,8 @@
 import org.apache.directory.shared.ldap.filter.SimpleNode;
 import org.apache.directory.shared.ldap.filter.SubstringNode;
 import org.apache.directory.server.xdbm.Index;
+import org.apache.directory.server.xdbm.search.Optimizer;
+import org.apache.directory.server.xdbm.Store;
 
 
 /**
@@ -53,14 +55,14 @@
 public class DefaultOptimizer implements Optimizer
 {
     /** the database this optimizer operates on */
-    private BTreePartition db;
+    private Store db;
 
     /**
      * Creates an optimizer on a database.
      *
      * @param db the database this optimizer works for.
      */
-    public DefaultOptimizer(BTreePartition db)
+    public DefaultOptimizer( Store db )
     {
         this.db = db;
     }
@@ -72,7 +74,7 @@
      * index on the attribute does not exist an IndexNotFoundException will be
      * thrown.
      *
-     * @see Optimizer#annotate(ExprNode)
+     * @see org.apache.directory.server.xdbm.search.Optimizer#annotate(ExprNode)
      */
     public void annotate( ExprNode node ) throws Exception
     {

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java?rev=640664&r1=640663&r2=640664&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/DefaultSearchEngine.java
Mon Mar 24 18:21:22 2008
@@ -31,8 +31,9 @@
 import org.apache.directory.shared.ldap.filter.ScopeNode;
 import org.apache.directory.shared.ldap.message.AliasDerefMode;
 import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.server.xdbm.ForwardIndexEntry;
-import org.apache.directory.server.xdbm.IndexEntry;
+import org.apache.directory.server.xdbm.*;
+import org.apache.directory.server.xdbm.search.Optimizer;
+import org.apache.directory.server.xdbm.search.SearchEngine;
 
 
 /**
@@ -47,7 +48,7 @@
     /** the Optimizer used by this DefaultSearchEngine */
     private final Optimizer optimizer;
     /** the Database this DefaultSearchEngine operates on */
-    private BTreePartition db;
+    private Store db;
     /** Evaluator flyweight used for filter expression assertions */
     private ExpressionEvaluator evaluator;
     /** Enumerator flyweight that creates enumerations on filter expressions */
@@ -66,7 +67,7 @@
      * @param evaluator an expression evaluator
      * @param optimizer an optimizer to use during search
      */
-    public DefaultSearchEngine( BTreePartition db, ExpressionEvaluator evaluator,
+    public DefaultSearchEngine( Store db, ExpressionEvaluator evaluator,
         ExpressionEnumerator enumerator, Optimizer optimizer )
     {
         this.db = db;
@@ -87,7 +88,7 @@
     }
 
 
-    public NamingEnumeration<IndexRecord> search( Name base, AliasDerefMode aliasDerefMode,
ExprNode filter, SearchControls searchCtls )
+    public NamingEnumeration<IndexEntry> search( Name base, AliasDerefMode aliasDerefMode,
ExprNode filter, SearchControls searchCtls )
         throws Exception
     {
         Name effectiveBase;
@@ -131,7 +132,7 @@
 
 
     /**
-     * @see SearchEngine#evaluate(ExprNode, Long)
+     * @see org.apache.directory.server.xdbm.search.SearchEngine#evaluate(ExprNode, Long)
      */
     public boolean evaluate( ExprNode ilter, Long id ) throws NamingException
     {

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/NoOpOptimizer.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/NoOpOptimizer.java?rev=640664&r1=640663&r2=640664&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/NoOpOptimizer.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/NoOpOptimizer.java
Mon Mar 24 18:21:22 2008
@@ -23,6 +23,8 @@
 
 import org.apache.directory.shared.ldap.filter.BranchNode;
 import org.apache.directory.shared.ldap.filter.ExprNode;
+import org.apache.directory.server.xdbm.search.Optimizer;
+
 
 /**
  * A do nothing optimizer which labels all nodes with <code>

Modified: directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java?rev=640664&r1=640663&r2=640664&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
(original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/core/src/main/java/org/apache/directory/server/core/partition/impl/btree/gui/EntryNode.java
Mon Mar 24 18:21:22 2008
@@ -35,7 +35,7 @@
 import org.apache.directory.server.core.partition.impl.btree.BTreePartition;
 import org.apache.directory.server.xdbm.ForwardIndexEntry;
 import org.apache.directory.server.xdbm.IndexEntry;
-import org.apache.directory.server.core.partition.impl.btree.SearchEngine;
+import org.apache.directory.server.xdbm.search.SearchEngine;
 import org.apache.directory.shared.ldap.filter.ExprNode;
 import org.apache.directory.shared.ldap.name.LdapDN;
 

Modified: directory/sandbox/akarasulu/bigbang/apacheds/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/pom.xml?rev=640664&r1=640663&r2=640664&view=diff
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/pom.xml (original)
+++ directory/sandbox/akarasulu/bigbang/apacheds/pom.xml Mon Mar 24 18:21:22 2008
@@ -327,6 +327,7 @@
     <module>schema-registries</module>
     <module>jdbm-store</module>
     <module>btree-base</module>
+    <module>xdbm-search</module>
     <module>xdbm-tools</module>
     <module>core</module>
     <module>core-constants</module>
@@ -563,6 +564,7 @@
         <module>jdbm-store</module>
         <module>constants</module>
         <module>btree-base</module>
+        <module>xdbm-search</module>
         <module>xdbm-tools</module>
         <module>core</module>
         <module>core-shared</module>

Propchange: directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Mar 24 18:21:22 2008
@@ -0,0 +1,16 @@
+target
+.clover
+.wtpmodules
+.settings
+.deployables
+apache.org
+.metadata
+*.md5
+*.log
+*.iml
+*.ipr
+*.iws
+.project
+.classpath
+nbproject
+schema

Added: directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/pom.xml
URL: http://svn.apache.org/viewvc/directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/pom.xml?rev=640664&view=auto
==============================================================================
--- directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/pom.xml (added)
+++ directory/sandbox/akarasulu/bigbang/apacheds/xdbm-search/pom.xml Mon Mar 24 18:21:22 2008
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<!-- $Rev:  $ $Date:  $ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.apache.directory.server</groupId>
+    <artifactId>apacheds-parent</artifactId>
+    <version>1.5.2-SNAPSHOT</version>
+  </parent>
+  <artifactId>apacheds-xdbm-search</artifactId>
+  <name>ApacheDS Generalized (X) DBM Search Engine</name>
+
+  <description>
+    Search engine implementation generalized for XDBM entry store scheme.
+  </description>
+  
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-btree-base</artifactId>
+      <version>${pom.version}</version>
+    </dependency>
+  </dependencies>
+
+  <packaging>jar</packaging>
+</project>
+



Mime
View raw message