You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Gary Long <ga...@gmx.fr> on 2009/09/09 18:07:31 UTC

question about nt:folder

Hi :)

I would like to know if nt:folder nodes can accept nt:ressource or
nt:unstructured nodes as child? 

thank you

Gary

ps: sorry for my previous message. The text in my mail didn't appear. I
don't know why... :/ 
-- 
View this message in context: http://www.nabble.com/question-about-nt%3Afolder-tp25368186p25368186.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: question about nt:folder

Posted by Gary Long <ga...@gmx.fr>.




> I guess you mean nt:file instead of nt:folder. An nt:folder is
> supposed to contain nt:files - it is only allowed to have child nodes
> of type nt:hierarchyNode, ie. nt:folder and nt:file [2]. To add more
> unstructured data to a folder, you can add a mixin that introduces
> other properties and/or child nodes.
> 

Thank you :)

This mixin type feature is interesting but i don't understand how it works :
(
How could I add a mixin type to my nt:folder node and then add other nodes
with different nodetypes?


-- 
View this message in context: http://www.nabble.com/question-about-nt%3Afolder-tp25368186p25368765.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: question about nt:folder

Posted by Alexander Klimetschek <ak...@day.com>.
On Wed, Sep 9, 2009 at 18:07, Gary Long<ga...@gmx.fr> wrote:
> I would like to know if nt:folder nodes can accept nt:ressource or
> nt:unstructured nodes as child?

For the definition of the basic nodetypes, see the JCR 1.0 spec,
section 6.7.22 [1].

I guess you mean nt:file instead of nt:folder. An nt:folder is
supposed to contain nt:files - it is only allowed to have child nodes
of type nt:hierarchyNode, ie. nt:folder and nt:file [2]. To add more
unstructured data to a folder, you can add a mixin that introduces
other properties and/or child nodes.

A nt:file has a jcr:content node that typically is of type
nt:resource, but it can be any node type (inheriting from nt:base), so
you can also use an nt:unstructured for the jcr:content subnode.

[1] http://jcp.org/en/jsr/detail?id=170
[2] http://www.day.com/specs/jcr/1.0/6.7.22.8_nt_folder.html
[3] http://www.day.com/specs/jcr/1.0/6.7.22.6_nt_file.html

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com