X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=jcr%2Forg.argeo.cms.jcr%2Fsrc%2Forg%2Fargeo%2Fcms%2Fjcr%2Facr%2FJcrContentUtils.java;h=c85e3644190bb50d73d4e4b704cda3084a0d0af4;hb=5a7b8b145ad29401b9940f7e1493a7dec1cd0156;hp=b8d9e70dec1b6734fedc766a925156d4fc4a8b45;hpb=809b4ca1d7804e793691e391dc2b2f40de054f06;p=lgpl%2Fargeo-commons.git diff --git a/jcr/org.argeo.cms.jcr/src/org/argeo/cms/jcr/acr/JcrContentUtils.java b/jcr/org.argeo.cms.jcr/src/org/argeo/cms/jcr/acr/JcrContentUtils.java index b8d9e70de..c85e36441 100644 --- a/jcr/org.argeo.cms.jcr/src/org/argeo/cms/jcr/acr/JcrContentUtils.java +++ b/jcr/org.argeo.cms.jcr/src/org/argeo/cms/jcr/acr/JcrContentUtils.java @@ -92,7 +92,21 @@ public class JcrContentUtils { } } - private static Source toSource(Node node) { + private static Source toSource(Node node) throws RepositoryException { + +// try (ByteArrayOutputStream out = new ByteArrayOutputStream()) { +// node.getSession().exportDocumentView(node.getPath(), out, true, false); +// DocumentBuilder documentBuilder = DocumentBuilderFactory.newNSInstance().newDocumentBuilder(); +// Document document; +// try (ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray())) { +// document = documentBuilder.parse(in); +// } +// cleanJcrDom(document); +// return new DOMSource(document); +// } catch (IOException | SAXException | ParserConfigurationException e) { +// throw new RuntimeException(e); +// } + try (PipedInputStream in = new PipedInputStream();) { CompletableFuture toDo = CompletableFuture.supplyAsync(() -> {