Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 98872 invoked from network); 15 Feb 2011 20:53:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Feb 2011 20:53:25 -0000 Received: (qmail 65629 invoked by uid 500); 15 Feb 2011 20:53:25 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 65568 invoked by uid 500); 15 Feb 2011 20:53:24 -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 65561 invoked by uid 99); 15 Feb 2011 20:53:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Feb 2011 20:53:24 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ayyagarikiran@gmail.com designates 209.85.212.50 as permitted sender) Received: from [209.85.212.50] (HELO mail-vw0-f50.google.com) (209.85.212.50) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Feb 2011 20:53:17 +0000 Received: by vws14 with SMTP id 14so426878vws.37 for ; Tue, 15 Feb 2011 12:52:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; bh=dXIRw6wU7+GaGobdfyHeJii8QBFPh6zV2ysl2kfurlI=; b=LrVUtipRAX8hfMHnKoDuT62cnZA7QV0pMv0QRjRJruSnfh0kX7s1EDTE6m11zS40/B D22C1aL57EXvBToHaY/Q/HQuVP4zi+5mkLAqrEDIVHzUxzHkMjbfsvOrIIo/uuWXg6SQ ZWnXOumayNyIE0vdTV9nnbwNPieDw2qYnZhXA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=DRoVGhnxPMUlBs3VwY1v/jChYdcAYb0kJFuMuzEFU8m/ffcG5P3SKp1E0VaS9Bx8hA Y3En6dfU+EFJGbAYJd2Nj6Rk2odPb/X14T5yYIknVXof3zwPHL/50dp4gR3f/HjamRfA J85waPYwU95nJy04xj/eX3CFY7tE5k/Q76YAE= MIME-Version: 1.0 Received: by 10.220.178.200 with SMTP id bn8mr1477119vcb.169.1297803175989; Tue, 15 Feb 2011 12:52:55 -0800 (PST) Sender: ayyagarikiran@gmail.com Received: by 10.220.77.143 with HTTP; Tue, 15 Feb 2011 12:52:55 -0800 (PST) In-Reply-To: References: <4D5A9A61.8060507@gmail.com> <4D5ACF66.6080800@gmail.com> <4D5AE009.20107@gmail.com> Date: Wed, 16 Feb 2011 02:22:55 +0530 X-Google-Sender-Auth: 2kZbzrIrquHTQemOC-hKDozM9BE Message-ID: Subject: Re: Dn should probably not implement Comparable From: Kiran Ayyagari To: Apache Directory Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Feb 16, 2011 at 2:15 AM, Kiran Ayyagari wrot= e: > On Wed, Feb 16, 2011 at 1:50 AM, Emmanuel Lecharny = wrote: >> On 2/15/11 9:15 PM, Kiran Ayyagari wrote: >>> >>> On Wed, Feb 16, 2011 at 12:39 AM, Emmanuel Lecharny >>> =A0wrote: >>>> >>>> On 2/15/11 8:00 PM, Kiran Ayyagari wrote: >>>>> >>>>> On Tue, Feb 15, 2011 at 8:53 PM, Emmanuel Lecharny >>>>> =A0wrote: >>>>>> >>>>>> Hi, >>>>>> >>>>>> the compareTo method has a semantic that probably does not applies t= o >>>>>> the >>>>>> Dn >>>>>> class : either two DNs are equals, or they are different, but they >>>>>> aren't >>>>>> superior or inferior, except if one is the parent of the other. >>>>>> >>>>>> As we already have a isParent and isChild methods, I suggest we remo= ve >>>>>> the >>>>>> compareTo() methods (which is never used) and not implemen the >>>>>> Comparable =A0 =A0interface. >>>>>> >>>>> I suggest we keep this, think of ordering the Entry objects while >>>>> performing an export >>>>> (sorting a huge number of entries won't be the ideal case, but when w= e >>>>> have a few entries which are fetched in an adhoc manner(i.e without >>>>> performing repetitive one level searches)) >>>> >>>> The thing is that there is no way to order a list of DNs, as there is = no >>>> such a MatchingRule as DnOrderingMatch. How do you order two DNs which >>>> RDN >>>> don't have the same AttributeType ? >>>> >>>> I have checked RFC 4517, and after having read it, I saw that comparin= g >>>> two >>>> DNs is just meant to check that they are equal, or not. No order is >>>> implied. >>> >>> how about using the isParent() and isChild() methods for that inside >>> the compareTo() >> >> yes, but still it's not possible to compare 2 DNs with the same parent..= . >> CompareTo() for DNs simply does not make sense :) > hmmm, just wondering why can't we compare the normalized values(which > are strings) of two DNs by the above I mean for equality, and we have isParent() if it is higher in hierarchy and isChild() otherwise, I see that semantically it doesn't make *much* sense to say 'compare two DNs' but still we can *order* DNs and that is where this method is helpful >> >> >> -- >> Regards, >> Cordialement, >> Emmanuel L=E9charny >> www.iktek.com >> >> > > > > -- > Kiran Ayyagari > --=20 Kiran Ayyagari