You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by "Eternach, Andreas (EXT)" <an...@siemens.com> on 2008/05/27 15:04:19 UTC

General Question related to object containment

Hi all,
 
i am quite new to LADP and Apache Directory Server. And i really hope
you can help me with a containment question.
 
I have created a new Schema, which defines just two object-classes (lets
call them Product and ProductProperty).
Of course ProductProperty is a child of Product, i.e. Products consist
of ProductProperties.
 
Therefore i need to ensure, that instances of ProductProperty may only
be created below instances of Product.
 
Does anyone know how to define such rules / restrictions? Is it defined
in some RFC?
 
Thanks in advance, Andreas

AW: DITStructureRules (was: General Question related to object containment)

Posted by "Eternach, Andreas (EXT)" <an...@siemens.com>.
Hi guys,

I finally found a good explanatation about the DIT structure rules: 
https://www.opends.org/wiki/page/UnderstandingDITStructureRules

If we would go for an implementation of DIT-Structure-Rules in ApacheDS, then the algorithm could look as follows (please correct me if I am wrong):

0. If a DIT-object is going to be created, then following steps should be performed:

1. Find the according Structure-Rule for the new objects type, if no Structure-Rule has been found, then create the object

3.a If SUP is empty, then check whether the parent object class is the DIT-Root, otherwise reject creation

3.b If a SUP has been specified in the Structure-Rule, then find the SUP-Structure-Rule. If no SUP can be found then (what to do, throw an exception, user-error, schema-error ?)

4. Check whether the SUP-Structure-Rules name-form corresponds with the new object parents object-type. If not, then user error, otherwise create the object. 

Best regards

Andreas Eternach
Software-Entwickler

Siemens AG
Automation and Drives, Stoneball
Tel.  : +49 (341) 4470-0
mailto:andreas.eternach.ext@siemens.com
http://www.siemens.com/automation

Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme
Managing Board: Peter Loescher, Chairman, President and Chief Executive Officer; 
Wolfgang Dehen, Heinrich Hiesinger, Joe Kaeser, Jim Reid-Anderson, Hermann Requardt,
Siegfried Russwurm, Peter Y. Solmssen
Registered offices: Berlin and Munich; 
Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684
WEEE-Reg.-No. DE 23691322



-----Ursprüngliche Nachricht-----
Von: akarasulu@gmail.com [mailto:akarasulu@gmail.com] Im Auftrag von Alex Karasulu
Gesendet: Mittwoch, 28. Mai 2008 01:42
An: users@directory.apache.org
Betreff: Re: DITStructureRules (was: General Question related to object containment)

Yep you're looking for dITStructureRules which constrain which structural
objectClasses can be subordinate to another structural objectClass.  I
really wanted to implement this (badly) but not much time for it these days.

Alex

On Tue, May 27, 2008 at 10:15 AM, Eternach, Andreas (EXT) <
andreas.eternach.ext@siemens.com> wrote:

> Hi Emmanuel ,
>
> Thank you for the reply, but I guess you are talking about
> object-inheritance (I was talking about object-containment).
>
> However, the link you posted gave me some more information:
> It seems that I need to define DITStructureRules.
>
> But how to accomplish this? The Schema-Editor of the "Apache Directory
> Studio" does not provide the
> functionality to generate DITStructureRules.
>
> In the meantime I figured out that there exists an objectClass
> metaDITStructureRule.
> I can create instances of this class within my schema, but its just trial
> and error.
>
> Anybody has more information?
>
> Best regards and thanks in advance,
>
> Andreas
>
> -----Ursprüngliche Nachricht-----
> Von: Emmanuel Lecharny [mailto:elecharny@gmail.com] Im Auftrag von
> Emmanuel Lecharny
> Gesendet: Dienstag, 27. Mai 2008 15:27
> An: users@directory.apache.org
> Betreff: Re: General Question related to object containment
>
> Eternach, Andreas (EXT) wrote:
> > Hi all,
> >
> Hi Andreas,
> >
> > i am quite new to LADP and Apache Directory Server. And i really hope
> > you can help me with a containment question.
> >
> > I have created a new Schema, which defines just two object-classes (lets
> > call them Product and ProductProperty).
> > Of course ProductProperty is a child of Product, i.e. Products consist
> > of ProductProperties.
> >
> > Therefore i need to ensure, that instances of ProductProperty may only
> > be created below instances of Product.
> >
> If those two objectClasses are related by an inheritance relation, then
> there is no way you can use the child without using the parent. In order
> to describe this inheritence relation, you simply define the
> ProductProperty objectClass as the child of the Produc ObjectClass using
> the 'SUP' keyword.
> >
> > Does anyone know how to define such rules / restrictions? Is it defined
> > in some RFC?
> >
>
> http://www.rfc-editor.org/rfc/rfc4512.txt, par. 2.4
> >
> > Thanks in advance, Andreas
> >
> >
>
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>

Re: DITStructureRules (was: General Question related to object containment)

Posted by Alex Karasulu <ak...@apache.org>.
Yep you're looking for dITStructureRules which constrain which structural
objectClasses can be subordinate to another structural objectClass.  I
really wanted to implement this (badly) but not much time for it these days.

Alex

On Tue, May 27, 2008 at 10:15 AM, Eternach, Andreas (EXT) <
andreas.eternach.ext@siemens.com> wrote:

> Hi Emmanuel ,
>
> Thank you for the reply, but I guess you are talking about
> object-inheritance (I was talking about object-containment).
>
> However, the link you posted gave me some more information:
> It seems that I need to define DITStructureRules.
>
> But how to accomplish this? The Schema-Editor of the "Apache Directory
> Studio" does not provide the
> functionality to generate DITStructureRules.
>
> In the meantime I figured out that there exists an objectClass
> metaDITStructureRule.
> I can create instances of this class within my schema, but its just trial
> and error.
>
> Anybody has more information?
>
> Best regards and thanks in advance,
>
> Andreas
>
> -----Ursprüngliche Nachricht-----
> Von: Emmanuel Lecharny [mailto:elecharny@gmail.com] Im Auftrag von
> Emmanuel Lecharny
> Gesendet: Dienstag, 27. Mai 2008 15:27
> An: users@directory.apache.org
> Betreff: Re: General Question related to object containment
>
> Eternach, Andreas (EXT) wrote:
> > Hi all,
> >
> Hi Andreas,
> >
> > i am quite new to LADP and Apache Directory Server. And i really hope
> > you can help me with a containment question.
> >
> > I have created a new Schema, which defines just two object-classes (lets
> > call them Product and ProductProperty).
> > Of course ProductProperty is a child of Product, i.e. Products consist
> > of ProductProperties.
> >
> > Therefore i need to ensure, that instances of ProductProperty may only
> > be created below instances of Product.
> >
> If those two objectClasses are related by an inheritance relation, then
> there is no way you can use the child without using the parent. In order
> to describe this inheritence relation, you simply define the
> ProductProperty objectClass as the child of the Produc ObjectClass using
> the 'SUP' keyword.
> >
> > Does anyone know how to define such rules / restrictions? Is it defined
> > in some RFC?
> >
>
> http://www.rfc-editor.org/rfc/rfc4512.txt, par. 2.4
> >
> > Thanks in advance, Andreas
> >
> >
>
>
> --
> --
> cordialement, regards,
> Emmanuel Lécharny
> www.iktek.com
> directory.apache.org
>
>
>

Re: DITStructureRules

Posted by Emmanuel Lecharny <el...@apache.org>.
Eternach, Andreas (EXT) wrote:
> Hi Emmanuel ,
>
> Thank you for the reply, but I guess you are talking about object-inheritance (I was talking about object-containment).
>   
Yes, it was not very clear in your previous mail that you wanted to 
enforce entry to be confined in some part of the DIT ( 'below' was quite 
ambiguous :).
> However, the link you posted gave me some more information:
> It seems that I need to define DITStructureRules.
>
> But how to accomplish this? The Schema-Editor of the "Apache Directory Studio" does not provide the
> functionality to generate DITStructureRules. 
>   
ADS does not support DITStructureRules - nor NameForms - atm. This is 
definitively something we are working on : 
https://issues.apache.org/jira/browse/DIRSERVER-850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

However, I don't know when it will be available...

-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



DITStructureRules (was: General Question related to object containment)

Posted by "Eternach, Andreas (EXT)" <an...@siemens.com>.
Hi Emmanuel ,

Thank you for the reply, but I guess you are talking about object-inheritance (I was talking about object-containment).

However, the link you posted gave me some more information:
It seems that I need to define DITStructureRules.

But how to accomplish this? The Schema-Editor of the "Apache Directory Studio" does not provide the
functionality to generate DITStructureRules. 

In the meantime I figured out that there exists an objectClass metaDITStructureRule.
I can create instances of this class within my schema, but its just trial and error.

Anybody has more information?

Best regards and thanks in advance, 

Andreas 

-----Ursprüngliche Nachricht-----
Von: Emmanuel Lecharny [mailto:elecharny@gmail.com] Im Auftrag von Emmanuel Lecharny
Gesendet: Dienstag, 27. Mai 2008 15:27
An: users@directory.apache.org
Betreff: Re: General Question related to object containment

Eternach, Andreas (EXT) wrote:
> Hi all,
>   
Hi Andreas,
>  
> i am quite new to LADP and Apache Directory Server. And i really hope
> you can help me with a containment question.
>  
> I have created a new Schema, which defines just two object-classes (lets
> call them Product and ProductProperty).
> Of course ProductProperty is a child of Product, i.e. Products consist
> of ProductProperties.
>  
> Therefore i need to ensure, that instances of ProductProperty may only
> be created below instances of Product.
>   
If those two objectClasses are related by an inheritance relation, then 
there is no way you can use the child without using the parent. In order 
to describe this inheritence relation, you simply define the 
ProductProperty objectClass as the child of the Produc ObjectClass using 
the 'SUP' keyword.
>  
> Does anyone know how to define such rules / restrictions? Is it defined
> in some RFC?
>   

http://www.rfc-editor.org/rfc/rfc4512.txt, par. 2.4
>  
> Thanks in advance, Andreas
>
>   


-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: General Question related to object containment

Posted by Emmanuel Lecharny <el...@apache.org>.
Eternach, Andreas (EXT) wrote:
> Hi all,
>   
Hi Andreas,
>  
> i am quite new to LADP and Apache Directory Server. And i really hope
> you can help me with a containment question.
>  
> I have created a new Schema, which defines just two object-classes (lets
> call them Product and ProductProperty).
> Of course ProductProperty is a child of Product, i.e. Products consist
> of ProductProperties.
>  
> Therefore i need to ensure, that instances of ProductProperty may only
> be created below instances of Product.
>   
If those two objectClasses are related by an inheritance relation, then 
there is no way you can use the child without using the parent. In order 
to describe this inheritence relation, you simply define the 
ProductProperty objectClass as the child of the Produc ObjectClass using 
the 'SUP' keyword.
>  
> Does anyone know how to define such rules / restrictions? Is it defined
> in some RFC?
>   

http://www.rfc-editor.org/rfc/rfc4512.txt, par. 2.4
>  
> Thanks in advance, Andreas
>
>   


-- 
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org



Re: General Question related to object containment

Posted by Stefan Zoerner <st...@labeo.de>.
Hi Andreas!

Eternach, Andreas (EXT) wrote:

> I have created a new Schema, which defines just two object-classes (lets
> call them Product and ProductProperty).
> Of course ProductProperty is a child of Product, i.e. Products consist
> of ProductProperties.

How about modeling product properties as attributes of a product? I do 
not know your specific requirements. In case that you have to search for 
products with specific properties, this will perhaps lead to better 
response times.

Greetings from Montabaur,
      Stefan