On Thu, 2006-03-09 at 11:01 -0300, hsp wrote:
> I have the following doubt.
> Can I set the properties directly for fileNode, instead have to create
> another node of nodetype nt:resource? Like this:
> Node fileNode = parentnode.addNode(file.getName(),
> "nt:file");
> fileNode.setProperty("jcr:mimeType", mimeType);
> fileNode.setProperty("jcr:encoding", "");
> resNode.setProperty("jcr:data", new
> FileInputStream(file));
> .....;
>
> What consequences, considerations, about the two kind of implementation?
If you created a new nodeType of your own design you could do that. The
nt:file node however is designed to have the content in a child node,
and will fail validation on save if you do it otherwise.
--
Torgeir Veimo <[EMAIL PROTECTED]>