Author: dlanglais Date: 2010-02-27 17:31:53 +0100 (Sat, 27 Feb 2010) New Revision: 140 Modified: trunk/msm-fromtoXML/src/main/java/org/nuiton/mapstoragemanager/plugins/exporter/ToXML.java trunk/msm-fromtoXML/src/test/java/org/nuiton/mapstoragemanager/plugins/exporter/ExporterTest.java Log: Seem to be ok. Maintenant, il va falloir que je trouve comment faire l'assertEquals entre deux documents XML jdom... Modified: trunk/msm-fromtoXML/src/main/java/org/nuiton/mapstoragemanager/plugins/exporter/ToXML.java =================================================================== --- trunk/msm-fromtoXML/src/main/java/org/nuiton/mapstoragemanager/plugins/exporter/ToXML.java 2010-02-27 16:28:06 UTC (rev 139) +++ trunk/msm-fromtoXML/src/main/java/org/nuiton/mapstoragemanager/plugins/exporter/ToXML.java 2010-02-27 16:31:53 UTC (rev 140) @@ -121,31 +121,32 @@ for (String key : keys) { try{ content = bigTable.get(tableName, columnName, key); - } - catch (NoSuchElementException e) { -// LOG.warn(e, e); - } - if ( ! "".equals(content)) { + if ( ! "".equals(content)) { - // new cell Element. - Element cellElement = new Element("cell"); - // new attribute which contain the cell key. - Attribute cellKeyAttribute = new Attribute("key", key); - cellElement.setAttribute(cellKeyAttribute); + // new cell Element. + Element cellElement = new Element("cell"); + // new attribute which contain the cell key. + Attribute cellKeyAttribute = new Attribute("key", key); + cellElement.setAttribute(cellKeyAttribute); - // we add the cell to the column. - column.addContent(cellElement); + // we add the cell to the column. + column.addContent(cellElement); - // new value Element. - Element valueElement = new Element("value"); -// // new attribute which contain the value version. -// Attribute valueVersionAttribute = new Attribute("version", v); -// valueElement.setAttribute(valueVersionAttribute); - valueElement.setText(content); + // new value Element. + Element valueElement = new Element("value"); + // // new attribute which contain the value version. + // Attribute valueVersionAttribute = new Attribute("version", v); + // valueElement.setAttribute(valueVersionAttribute); + valueElement.setText(content); - // we add the value to the cell. - cellElement.addContent(valueElement); + // we add the value to the cell. + cellElement.addContent(valueElement); + } } + catch (NoSuchElementException e) { +// LOG.warn(e, e); + } + } } Modified: trunk/msm-fromtoXML/src/test/java/org/nuiton/mapstoragemanager/plugins/exporter/ExporterTest.java =================================================================== --- trunk/msm-fromtoXML/src/test/java/org/nuiton/mapstoragemanager/plugins/exporter/ExporterTest.java 2010-02-27 16:28:06 UTC (rev 139) +++ trunk/msm-fromtoXML/src/test/java/org/nuiton/mapstoragemanager/plugins/exporter/ExporterTest.java 2010-02-27 16:31:53 UTC (rev 140) @@ -207,7 +207,7 @@ try { XMLOutputter output = new XMLOutputter(Format.getPrettyFormat()); output.output(expected, System.out); -// output.output(actual, System.out); + output.output(actual, System.out); } catch (IOException ex) { LOG.error(ex, ex); }
participants (1)
-
dlanglais@users.nuiton.org