- Node infoNode = imageNode.addNode(DocBookTypes.INFO, DocBookTypes.INFO);
- Node imageDataNode = JcrUtils.copyBytesAsFile(infoNode, EntityType.box.get(), new byte[0]);
- imageDataNode.addMixin(EntityType.box.get());
- imageDataNode.setProperty(EntityNames.SVG_WIDTH, 0);
- imageDataNode.setProperty(EntityNames.SVG_LENGTH, 0);
- imageDataNode.addMixin(NodeType.MIX_MIMETYPE);
+ Node imageDataNode = imageNode.addNode(DocBookTypes.IMAGEDATA, DocBookTypes.IMAGEDATA);
+// Node infoNode = imageNode.addNode(DocBookTypes.INFO, DocBookTypes.INFO);
+// Node fileNode = JcrUtils.copyBytesAsFile(mediaFolder, EntityType.box.get(), new byte[0]);
+// fileNode.addMixin(EntityType.box.get());
+// fileNode.setProperty(EntityNames.SVG_WIDTH, 0);
+// fileNode.setProperty(EntityNames.SVG_LENGTH, 0);
+// fileNode.addMixin(NodeType.MIX_MIMETYPE);
+//
+// // we assume this is a folder next to the main DocBook document
+// // TODO make it more robust and generic
+// String fileRef = mediaNode.getName();
+// imageDataNode.setProperty(DocBookNames.DBK_FILEREF, fileRef);