From dev-return-17196-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Mon Apr 02 22:05:37 2007 Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 61944 invoked from network); 2 Apr 2007 22:05:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Apr 2007 22:05:36 -0000 Received: (qmail 42456 invoked by uid 500); 2 Apr 2007 22:05:43 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 42421 invoked by uid 500); 2 Apr 2007 22:05:43 -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 42410 invoked by uid 99); 2 Apr 2007 22:05:43 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Apr 2007 15:05:43 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ole.ersoy@gmail.com designates 64.233.162.224 as permitted sender) Received: from [64.233.162.224] (HELO nz-out-0506.google.com) (64.233.162.224) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Apr 2007 15:05:35 -0700 Received: by nz-out-0506.google.com with SMTP id i28so945869nzi for ; Mon, 02 Apr 2007 15:05:14 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=Umw7THqT6vYxGw1QEev9QSfP08a8UeJ6XfggS0XKX5RBJroZkwz15GCZ18He5Ac8UVbpDe7y3M0Te2OotgczCRH//fMF9TLtHdoMU+Va+ShcIIdasjf9s4CbC8lW3nDke8ZOqH+DGJMemi4HojzxlbHkXuEDnXAIphlz2VIDZ9g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=flyffDFIumpuUq3PA+Yc8IViBbo3P1rcPK9l3ClOVH0S4ojwsY0GQuQAPO8kFK/znxP7HVwMVtvNfhmtZHM9HQ2hXVJdm4UX6654/bhsA80pQP7lGTf6t7toGl+KVuV6lhYXronSlASqL5xBGcxR5IK7kSR2dWY7CYP+JrJUVzY= Received: by 10.65.43.17 with SMTP id v17mr10867444qbj.1175551514290; Mon, 02 Apr 2007 15:05:14 -0700 (PDT) Received: from ?192.168.1.24? ( [24.13.179.233]) by mx.google.com with ESMTP id 5sm27528298nzk.2007.04.02.15.05.13; Mon, 02 Apr 2007 15:05:13 -0700 (PDT) Message-ID: <46117D51.1030007@gmail.com> Date: Mon, 02 Apr 2007 17:01:53 -0500 From: Ole Ersoy User-Agent: Thunderbird 1.5.0.10 (X11/20070302) MIME-Version: 1.0 To: Apache Directory Developers List Subject: [DAS to LDAP Type Mapping] Am I thinking about this right? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hey Guys, Just wanted to see whether I'm thinking about this right. I want to store a DataObject in ADS. But before I can store it, I need to define its Schema. Here's a quick concept review before I go on. DataObject's have simple and complex properties. Simple properties are int, Integer, String, etc. Complex properties are references to other objects. Right now I'm just concerned about the simple properties and how to map them. So suppose I have a DataObject named dataObject that has a java type (Class) SomeClass with the following members. Member Java Type numberInt : Integer someCharacterSequence : String In order to store dataObject in ADS, I think I need to do the following: 1) Create the Syntaxes that correspond to the Java Types Integer and String (It's probably possible to use some already defined syntax, like "Directory String", but when I look up the syntax of an attribute, I would like it to be named for example java.lang.String so I don't have to do type conversion in the DAS). 2) Create the attributeTypes numberInt and someCharacterSequence and associate them with their syntax. 3) Create the ObjectClass SomeClass and add the attributeTypes numberInt and someCharacterSequence Then when all this is defined, I can go ahead and create an entry for dataObject containing its ObjectClass, SomeClass, and then add the values for the members numberInt and someCharacterSequence. Incidentally I'm also thinking that numberInt and someCharacterSequence need to be namespaced in order to avoid collisions when serializing another DataObject of a different type that also has a member someCharacterSequence. So there could be attributeTypes: com.example.someCharacterSequence org.example.someCharacterSequence Does that make sense? I'm starting to research how to add the syntaxes and attributeTypes right now, but if anyone has some quick boiler plate code for me, please do send :-) Thanks, - Ole