jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Klimetschek <aklim...@day.com>
Subject Re: question about nt:folder
Date Wed, 09 Sep 2009 16:18:17 GMT
On Wed, Sep 9, 2009 at 18:07, Gary Long<gary.long@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

Mime
View raw message