directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ole Ersoy <>
Subject [DAS to LDAP Type Mapping] Am I thinking about this right?
Date Mon, 02 Apr 2007 22:01:53 GMT
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

So there could be attributeTypes:

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 :-)

- Ole

View raw message