Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 6006 invoked from network); 3 May 2010 20:49:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 May 2010 20:49:25 -0000 Received: (qmail 2764 invoked by uid 500); 3 May 2010 20:49:25 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 2727 invoked by uid 500); 3 May 2010 20:49:25 -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 2720 invoked by uid 99); 3 May 2010 20:49:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 20:49:25 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=10.0 tests=AWL,FREEMAIL_FROM,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of elecharny@gmail.com designates 74.125.82.178 as permitted sender) Received: from [74.125.82.178] (HELO mail-wy0-f178.google.com) (74.125.82.178) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 May 2010 20:49:19 +0000 Received: by wyb42 with SMTP id 42so1994865wyb.37 for ; Mon, 03 May 2010 13:48:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=yjWBC7mMqB6sva64LenYsLz1u3tUMVZn3IEeXTLsAbE=; b=F6d5T8HMdz5ra8FuWwVPijhTxxpDAhCYY8S6F5dQCdFTdZm4M11hyL8tO9o3MFyzIP 03AQExspbfZ6dP1AxcYM1af/Tb9w8E+RwY2SNnRu+q701m67OY4aXj09XUoGT1NJw/eb +NAS+JagND1YcpUESfhpgjWIxK8qrsXmXANpc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; b=tCObImYLgSoAQN0Fn+RRUzmAgFfF1DA4IRQtK2JC4HmGtPmXgInnXvC/YK/0Qt1qge MO6HFP1nRPnpQg+MiCXoIrnNOGkMSENU8DZZfJmnNVVSTwIdWnONgqGd0o73w2mdixf7 uxUPMuVe4WwyKx/ZhOmw/NVyl69kQL0YdPzUQ= Received: by 10.227.154.15 with SMTP id m15mr183239wbw.96.1272919736994; Mon, 03 May 2010 13:48:56 -0700 (PDT) Received: from emmanuel-lecharnys-MacBook-Pro.local (vol75-3-82-66-216-176.fbx.proxad.net [82.66.216.176]) by mx.google.com with ESMTPS id x14sm44341595wbs.12.2010.05.03.13.48.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 03 May 2010 13:48:55 -0700 (PDT) Message-ID: <4BDF36B5.2000107@gmail.com> Date: Mon, 03 May 2010 22:48:53 +0200 From: Emmanuel Lecharny Reply-To: elecharny@apache.org User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: CSV to LDIF References: <4BDF2ECB.4080307@exasoft.ch> In-Reply-To: <4BDF2ECB.4080307@exasoft.ch> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit On 5/3/10 10:15 PM, Roland Berger wrote: > Hello > > I was looking for a way to import my outlook addresses into an open > ldap server to be able to use evolution as an outlook replacement. > There is no easy and automatic way to do it so I started to think to > write a csv to ldif converter. > The basic idea is to have on one side the csv headers on the other > side attributes of some objectclasses defined in a schema and do the > mapping in an gui. Before starting to write my own ldif parser I'm > sure you guys have already done it. I have searched the apache ds > websites but found only little code which might be reusable to suite > my idea. May be its because apache ds is a huge project. Can anyone > point me to the right place to start reading and tell me if apache ds > would be interested for a contribution like this? We don't have such a CVS to LDIF converter yet. We do have a Ldif to CVS converter. We would love to have something that does the conversion though ! The best would be to have it in Ldap Studio. FYI, 6 years ago, I wrote such a tool, and AFAIR, the real issue is the mapping. LDAP Attributes may be multi-valued, and each attribute must have a name. Assuming that the first row contains the LDAP attribute's name, that would be quite easy to transform a CVS file to LDIF. We do have some convenient classes and methods to manipulate LDIF files, and in your case, you might be interested in those classes : http://svn.apache.org/viewvc/directory/shared/trunk/ldap-ldif/src/main/java/org/apache/directory/shared/ldap/ldif/ The LdifEntry class is the one contaning an LDAP entry, so when you have created an Entry (that's another class you can find in http://svn.apache.org/viewvc/directory/shared/trunk/ldap/src/main/java/org/apache/directory/shared/ldap/entry/), you can produce a LDIF file using the LdifUtils.java class. Hope it helps ! -- Regards, Cordialement, Emmanuel L�charny www.nextury.com