jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hsp" <piccina...@ibest.com.br>
Subject Difference between nodetypes structure.
Date Thu, 09 Mar 2006 14:55:18 GMT
Hi;
I would to know what is the difference between the following implementation code:
"   Node fileNode = parentnode.addNode(file.getName(), "nt:file");
     Node resNode = fileNode.addNode("jcr:content", "nt:resource");
     resNode.setProperty("jcr:mimeType", mimeType);
     resNode.setProperty("jcr:encoding", "");
     resNode.setProperty("jcr:data", new FileInputStream(file));
...."
 and the another:

" Node fileNode = parentnode.addNode(file.getName(), "nt:file");
  fileNode.setProperty("jcr:mimeType", mimeType);
  fileNode.setProperty("jcr:encoding", "");
  fileNode.setProperty("jcr:data", new FileInputStream(file));
...."

What is the consequences, considerations. Is it wrong? Is the first implementation necessary?
What is the best pratice for?

Thanks
Helio

Mime
View raw message