for (int j = 1; j <= ntFiles; j++)
{
Node file = subFolder.addNode("File" + j, "nt:file");
Node contentNode = file.addNode("jcr:content", "nt:resource");
contentNode.setProperty("jcr:data", LoadTest.class.getResourceAsStream("/test_tiff_file.tiff"));
contentNode.setProperty("jcr:mimeType", new StringValue("image/tiff"));
contentNode.setProperty("jcr:lastModified", session.getValueFactory()
.createValue(Calendar.getInstance()));
/*
* contentNode.addMixin("dc:elementSet"); Node elementNode =
* file.getNode("dc:elementSet"); elementNode.setProperty("dc:title", "Title"+j);