Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 48174 invoked from network); 4 Aug 2005 19:38:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Aug 2005 19:38:47 -0000 Received: (qmail 33143 invoked by uid 500); 4 Aug 2005 19:38:46 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 33093 invoked by uid 500); 4 Aug 2005 19:38:45 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 33080 invoked by uid 99); 4 Aug 2005 19:38:45 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2005 12:38:45 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [193.252.22.31] (HELO smtp11.wanadoo.fr) (193.252.22.31) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2005 12:38:36 -0700 Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf1109.wanadoo.fr (SMTP Server) with ESMTP id 4652C1C000BD for ; Thu, 4 Aug 2005 21:38:43 +0200 (CEST) Received: from [192.168.0.20] (APh-Aug-102-2-1-32.w193-252.abo.wanadoo.fr [193.252.40.32]) by mwinf1109.wanadoo.fr (SMTP Server) with ESMTP id 0A6B41C000BC for ; Thu, 4 Aug 2005 21:38:42 +0200 (CEST) X-ME-UUID: 20050804193843428.0A6B41C000BC@mwinf1109.wanadoo.fr Subject: Re: searchable java context implementation From: Emmanuel Lecharny To: Apache Directory Developers List In-Reply-To: <42F22DA9.2090308@cornell.edu> References: <42F22DA9.2090308@cornell.edu> Content-Type: text/plain; charset=utf-8 Organization: iktek Date: Thu, 04 Aug 2005 21:38:42 +0200 Message-Id: <1123184322.29117.6.camel@wkslx01.iktek.com> Mime-Version: 1.0 X-Mailer: Evolution 2.0.4 (2.0.4-4) Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Thu, 2005-08-04 at 11:00 -0400, Aaron Hamid wrote: > Hi, > > I am intending to write a small service which maintains a list of "task" entries which can be submitted, acknowledged, and searched. The entries are going to be a fairly simple flat data structure with things like 'submittor', 'recipient', 'submission date', 'message', etc. Although I could write a search API which searches on individual fields, or perhaps a slightly more robust API that searches on a union of fields with implicit AND/OR semantics, I think it would be much more elegant to provide something like rfc 2254 ldap search s-expressions. My question is: does anybody know of a searchable Java context implementation? I have tried MirrorCtx, and although it does have the nice feature of persistence, it does not implement a searchable API (DirContext). Actually I think there are several shallow "java" context implementations (ubiquitously seen in applications like Tomcat, etc.), but I have not found any that provide search functionality. I'm thinking something s > imple like commons-beanutils property syntax, or OGNL property syntax. > > e.g. dirctx.bind(name, bean, ...); dirctx.search("java:/", "(|(&(color=red)(price>2)))(shape=round)(name=*foo*)))"); > > It seems like a searchable java context implementation would be useful in many areas. Don't know if it's really related to a LDAP filter as described in RFC 2254, but if you think that it is, you may look here : http://svn.apache.org/viewcvs.cgi/directory/shared/ldap/trunk/common/src/antlr where you will find the Filter parser and here : http://svn.apache.org/viewcvs.cgi/directory/shared/ldap/trunk/common/ if you want to generate the java files and compile it. You may use it as a basis for what you want to do. However, I'm not sure that is what you want (was it you on IRC yesturday?). Let us know ! Emmanuel Lécharny