Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 81519 invoked from network); 20 Apr 2006 18:45:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Apr 2006 18:45:16 -0000 Received: (qmail 78743 invoked by uid 500); 20 Apr 2006 18:45:16 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 78515 invoked by uid 500); 20 Apr 2006 18:45:15 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 78506 invoked by uid 99); 20 Apr 2006 18:45:15 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Apr 2006 11:45:15 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of piccinatto@ibest.com.br designates 200.181.68.249 as permitted sender) Received: from [200.181.68.249] (HELO sauron.ibest.com.br) (200.181.68.249) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Apr 2006 11:45:14 -0700 Received: from ibest.com.br (sauron.ibest.com.br [127.0.0.1]) by sauron.ibest.com.br (Postfix) with ESMTP id 44C68E3B4E for ; Thu, 20 Apr 2006 18:44:48 +0000 (GMT) Content-Disposition: inline Content-Transfer-Encoding: binary Content-Type: text/plain MIME-Version: 1.0 X-Mailer: MIME::Lite 2.117 (F2.6; A1.50; B2.12; Q2.03) X-Mailer: IbestMail X-Organization: Ibest S/A X-Identity: 931768_1145558688 From: "hsp" To: dev@jackrabbit.apache.org Cc: "Peeter Piegaze" Subject: Re: About child Nodes Date: Thu, 20 Apr 2006 15:44:48 -0300 Message-Id: <20060420184448.44C68E3B4E@sauron.ibest.com.br> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N >Hi Helio, > >On 4/20/06, hsp wrote: >> >> >your 'esc:categ' is defined as mixin nodetype. do you mix-it in to >> >something? or do you use it as a primary nodetype? >> The nodes with this type will be under nt:folder nodes or some other kind that is its child. >> Under a node 'esc:categ' must be only another(s) node 'esc:categ'. >> I defined it as mixin because I thought this way when the esc:categ is created, it also will >> have the property defined for nt:folder types like 'jcr:primaryType' and 'jcr:created', >> because 'nt:folder' is its supertype. > >All esc:categ nodes will have those properties anyway, simply because >nt:folder is declared as a supertype of esc:categ. Judging from your >description I think you should not define esc:categ as a mixin. I >think what you want is a primary type: then you can assign it on node >creation with addNode("mynode","esc:categ"). Ok, really it is what I want to do now, thanks. By the way, I almost know all about mixin types, I think this kind is for extend some primary type, but it is not what the declaration supertype does?? What is the difference between two same node types where in one "isMixin=true" and in another "isMixin=false" ? > >Also notice that if you want esc:categ nodes to only allow esc:categ >children, then you should not make nt:folder a supertype of esc:categ. >As it is, esc:categ inherits the child node defs of nt:folder, which >allows any child nodes of type nt:hierarchy...so this means that >esc:categ nodes can have child nodes of type esc:categ AND child nodes >of type nt:hierarchy. Ok, now its more clear for me, thanks. > >> >> >furthermore, the nt:folder supertype already defined a childnode >> >definition for 'nt:hierarchyNode'. so you at least can add those. >> > >> >how do you create your property? >> > >> I thought that declaring properties inside the nodetype declaration would register them >> like that nodetype properties. Is not this way? > >Yes this is correct. You declare the property in the node type, and >then you make a node of that type and then you do a setProperty on >that node with a property name and value type that matches the one you >defined in the node type. I've notice this is happen with the propertie of "requiredType=Reference". I can't assign a value to this propertie this way: Node.setPropertie(prop:Reference,"uuid")...The others are ok to set. Why? Tks Peter Helio