X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=server%2Fruntime%2Forg.argeo.server.jcr%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fjcr%2Ftabular%2FJcrTabularRowIterator.java;h=47578f61bc567697edfa5935e50b580f2857e5bc;hb=1c8303618e6865a4b3a8715ee217ed557736d9ae;hp=8223e1d4830d2c5c76995022890ccb23d66b8192;hpb=8b12104293bbdb0127bc46aeea7aa2b776171b39;p=lgpl%2Fargeo-commons.git diff --git a/server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/tabular/JcrTabularRowIterator.java b/server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/tabular/JcrTabularRowIterator.java index 8223e1d48..47578f61b 100644 --- a/server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/tabular/JcrTabularRowIterator.java +++ b/server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/tabular/JcrTabularRowIterator.java @@ -39,7 +39,6 @@ public class JcrTabularRowIterator implements TabularRowIterator { public JcrTabularRowIterator(Node tableNode) { try { - Node contentNode = tableNode.getNode(Property.JCR_CONTENT); for (NodeIterator it = tableNode.getNodes(); it.hasNext();) { Node node = it.nextNode(); if (node.isNodeType(ArgeoTypes.ARGEO_COLUMN)) { @@ -48,13 +47,9 @@ public class JcrTabularRowIterator implements TabularRowIterator { TabularColumn tc = new TabularColumn(node.getProperty( Property.JCR_TITLE).getString(), type); header.add(tc); - // } else if (node.getName().equals(Property.JCR_CONTENT)) { - // contentNode = node; } } - // should not happen since content is mandatory - assert contentNode != null; - + Node contentNode = tableNode.getNode(Property.JCR_CONTENT); if (contentNode.isNodeType(ArgeoTypes.ARGEO_CSV)) { textLines = new ArrayBlockingQueue>(1000); csvParser = new CsvParser() { @@ -168,4 +163,8 @@ public class JcrTabularRowIterator implements TabularRowIterator { return currentRowNumber; } + public List getHeader() { + return header; + } + }