diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/VersionNumber.java b/wise-webapp/src/main/java/com/wisemapping/importer/VersionNumber.java index cc6c8d93..dd623e6d 100644 --- a/wise-webapp/src/main/java/com/wisemapping/importer/VersionNumber.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/VersionNumber.java @@ -85,12 +85,9 @@ public class VersionNumber final VersionNumber versionNumber = (VersionNumber) o; - if (version_d != null ? !version_d.equals(versionNumber.version_d) - : versionNumber.version_d != null) { - return false; - } + return !(version_d != null ? !version_d.equals(versionNumber.version_d) + : versionNumber.version_d != null); - return true; } public int hashCode() { diff --git a/wise-webapp/src/main/java/com/wisemapping/util/JAXBUtils.java b/wise-webapp/src/main/java/com/wisemapping/util/JAXBUtils.java index 8f82dbc7..2197a71d 100755 --- a/wise-webapp/src/main/java/com/wisemapping/util/JAXBUtils.java +++ b/wise-webapp/src/main/java/com/wisemapping/util/JAXBUtils.java @@ -73,10 +73,11 @@ public class JAXBUtils { } } - public static void saveMap(@NotNull com.wisemapping.jaxb.freemind.Map map, @NotNull OutputStream out) throws JAXBException { + public static void saveMap(@NotNull com.wisemapping.jaxb.freemind.Map map, @NotNull OutputStream out) throws JAXBException { final JAXBContext context = getInstance("com.wisemapping.jaxb.freemind"); final Marshaller marshaller = context.createMarshaller(); + marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); marshaller.marshal(map, out); } } diff --git a/wise-webapp/src/test/data/freemind/basic.mmr b/wise-webapp/src/test/data/freemind/basic.mmr deleted file mode 100644 index c145329e..00000000 --- a/wise-webapp/src/test/data/freemind/basic.mmr +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wise-webapp/src/test/data/freemind/fonts.mmr b/wise-webapp/src/test/data/freemind/fonts.mmr deleted file mode 100644 index 2bed53a3..00000000 --- a/wise-webapp/src/test/data/freemind/fonts.mmr +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wise-webapp/src/test/data/freemind/i18n.mmr b/wise-webapp/src/test/data/freemind/i18n.mmr deleted file mode 100644 index fd9bfc71..00000000 --- a/wise-webapp/src/test/data/freemind/i18n.mmr +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wise-webapp/src/test/data/freemind/icons.mmr b/wise-webapp/src/test/data/freemind/icons.mmr deleted file mode 100644 index 1d464f26..00000000 --- a/wise-webapp/src/test/data/freemind/icons.mmr +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wise-webapp/src/test/data/freemind/links.mmr b/wise-webapp/src/test/data/freemind/links.mmr deleted file mode 100644 index 050ce1d3..00000000 --- a/wise-webapp/src/test/data/freemind/links.mmr +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wise-webapp/src/test/data/freemind/longnodes.mmr b/wise-webapp/src/test/data/freemind/longnodes.mmr deleted file mode 100644 index 3d0ee368..00000000 --- a/wise-webapp/src/test/data/freemind/longnodes.mmr +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wise-webapp/src/test/data/freemind/node-styles.mmr b/wise-webapp/src/test/data/freemind/node-styles.mmr deleted file mode 100644 index 41a26b82..00000000 --- a/wise-webapp/src/test/data/freemind/node-styles.mmr +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wise-webapp/src/test/data/freemind/process.mmr b/wise-webapp/src/test/data/freemind/process.mmr deleted file mode 100644 index 59b13859..00000000 --- a/wise-webapp/src/test/data/freemind/process.mmr +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wise-webapp/src/test/data/wisemaps/bigmap.mmr b/wise-webapp/src/test/data/wisemaps/bigmap.mmr deleted file mode 100644 index 2585b689..00000000 --- a/wise-webapp/src/test/data/wisemaps/bigmap.mmr +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wise-webapp/src/test/data/wisemaps/simple-maps.mmr b/wise-webapp/src/test/data/wisemaps/simple-maps.mmr deleted file mode 100644 index 6994311e..00000000 --- a/wise-webapp/src/test/data/wisemaps/simple-maps.mmr +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wise-webapp/src/test/data/wisemaps/welcome.mmr b/wise-webapp/src/test/data/wisemaps/welcome.mmr deleted file mode 100644 index e116c567..00000000 --- a/wise-webapp/src/test/data/wisemaps/welcome.mmr +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/wise-webapp/src/test/java/com/wisemapping/test/export/ExportTest.java b/wise-webapp/src/test/java/com/wisemapping/test/export/ExportTest.java index ae1d50e7..cefaa7ea 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/export/ExportTest.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/export/ExportTest.java @@ -23,7 +23,7 @@ import java.io.*; @Test public class ExportTest { - private static final String DATA_DIR_PATH = "src/test/data/svg/"; + private static final String DATA_DIR_PATH = "src/test/resources/data/svg/"; @Test(dataProvider = "Data-Provider-Function") public void exportSvgTest(@NotNull final File svgFile, @NotNull final File pngFile) throws ImporterException, IOException, ExportException, TransformerException, XMLStreamException, JAXBException, SAXException, TranscoderException, ParserConfigurationException { @@ -34,7 +34,7 @@ public class ExportTest { final ExportProperties properties = ExportProperties.create(format); final ExportProperties.ImageProperties imageProperties = (ExportProperties.ImageProperties) properties; imageProperties.setSize(ExportProperties.ImageProperties.Size.LARGE); - String baseUrl = "file://" + svgFile.getParentFile().getAbsolutePath() + "/../../../../../wise-editor/src/main/webapp/icons"; + String baseUrl = "file://" + svgFile.getParentFile().getAbsolutePath() + "/../../../../../../wise-editor/src/main/webapp/icons"; properties.setBaseImagePath(baseUrl); // Write content ... diff --git a/wise-webapp/src/test/java/com/wisemapping/test/freemind/ExportTest.java b/wise-webapp/src/test/java/com/wisemapping/test/freemind/ExportTest.java index 936f39bf..797b46f4 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/freemind/ExportTest.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/freemind/ExportTest.java @@ -15,7 +15,7 @@ import java.io.*; @Test public class ExportTest { - private static final String DATA_DIR_PATH = "src/test/data/wisemaps/"; + private static final String DATA_DIR_PATH = "src/test/resources/data/wisemaps/"; private static final String UTF_8 = "UTF-8"; @Test(dataProvider = "Data-Provider-Function") diff --git a/wise-webapp/src/test/java/com/wisemapping/test/freemind/ImportExportTest.java b/wise-webapp/src/test/java/com/wisemapping/test/freemind/ImportExportTest.java index 26202ffe..c6af02e4 100644 --- a/wise-webapp/src/test/java/com/wisemapping/test/freemind/ImportExportTest.java +++ b/wise-webapp/src/test/java/com/wisemapping/test/freemind/ImportExportTest.java @@ -17,7 +17,7 @@ import java.io.*; @Test public class ImportExportTest { - private static final String DATA_DIR_PATH = "src/test/data/freemind/"; + private static final String DATA_DIR_PATH = "src/test/resources/data/freemind/"; private static final String UTF_8 = "UTF-8"; final private Importer importer; final private FreemindExporter exporter; diff --git a/wise-webapp/src/test/data/freemind/ToDo.txt b/wise-webapp/src/test/resources/data/freemind/ToDo.txt similarity index 100% rename from wise-webapp/src/test/data/freemind/ToDo.txt rename to wise-webapp/src/test/resources/data/freemind/ToDo.txt diff --git a/wise-webapp/src/test/data/freemind/basic.mm b/wise-webapp/src/test/resources/data/freemind/basic.mm similarity index 100% rename from wise-webapp/src/test/data/freemind/basic.mm rename to wise-webapp/src/test/resources/data/freemind/basic.mm diff --git a/wise-webapp/src/test/resources/data/freemind/basic.mmr b/wise-webapp/src/test/resources/data/freemind/basic.mmr new file mode 100644 index 00000000..6c4eaf65 --- /dev/null +++ b/wise-webapp/src/test/resources/data/freemind/basic.mmr @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/wise-webapp/src/test/data/freemind/basic.wxml b/wise-webapp/src/test/resources/data/freemind/basic.wxml similarity index 100% rename from wise-webapp/src/test/data/freemind/basic.wxml rename to wise-webapp/src/test/resources/data/freemind/basic.wxml diff --git a/wise-webapp/src/test/data/freemind/fonts.mm b/wise-webapp/src/test/resources/data/freemind/fonts.mm similarity index 100% rename from wise-webapp/src/test/data/freemind/fonts.mm rename to wise-webapp/src/test/resources/data/freemind/fonts.mm diff --git a/wise-webapp/src/test/resources/data/freemind/fonts.mmr b/wise-webapp/src/test/resources/data/freemind/fonts.mmr new file mode 100644 index 00000000..785098f1 --- /dev/null +++ b/wise-webapp/src/test/resources/data/freemind/fonts.mmr @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wise-webapp/src/test/data/freemind/fonts.wxml b/wise-webapp/src/test/resources/data/freemind/fonts.wxml similarity index 100% rename from wise-webapp/src/test/data/freemind/fonts.wxml rename to wise-webapp/src/test/resources/data/freemind/fonts.wxml diff --git a/wise-webapp/src/test/data/freemind/i18n.mm b/wise-webapp/src/test/resources/data/freemind/i18n.mm similarity index 100% rename from wise-webapp/src/test/data/freemind/i18n.mm rename to wise-webapp/src/test/resources/data/freemind/i18n.mm diff --git a/wise-webapp/src/test/resources/data/freemind/i18n.mmr b/wise-webapp/src/test/resources/data/freemind/i18n.mmr new file mode 100644 index 00000000..afe4b1c5 --- /dev/null +++ b/wise-webapp/src/test/resources/data/freemind/i18n.mmr @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/wise-webapp/src/test/data/freemind/i18n.wxml b/wise-webapp/src/test/resources/data/freemind/i18n.wxml similarity index 100% rename from wise-webapp/src/test/data/freemind/i18n.wxml rename to wise-webapp/src/test/resources/data/freemind/i18n.wxml diff --git a/wise-webapp/src/test/data/freemind/icons.mm b/wise-webapp/src/test/resources/data/freemind/icons.mm similarity index 100% rename from wise-webapp/src/test/data/freemind/icons.mm rename to wise-webapp/src/test/resources/data/freemind/icons.mm diff --git a/wise-webapp/src/test/resources/data/freemind/icons.mmr b/wise-webapp/src/test/resources/data/freemind/icons.mmr new file mode 100644 index 00000000..e4a7193f --- /dev/null +++ b/wise-webapp/src/test/resources/data/freemind/icons.mmr @@ -0,0 +1,198 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wise-webapp/src/test/data/freemind/icons.wxml b/wise-webapp/src/test/resources/data/freemind/icons.wxml similarity index 100% rename from wise-webapp/src/test/data/freemind/icons.wxml rename to wise-webapp/src/test/resources/data/freemind/icons.wxml diff --git a/wise-webapp/src/test/data/freemind/links.mm b/wise-webapp/src/test/resources/data/freemind/links.mm similarity index 100% rename from wise-webapp/src/test/data/freemind/links.mm rename to wise-webapp/src/test/resources/data/freemind/links.mm diff --git a/wise-webapp/src/test/resources/data/freemind/links.mmr b/wise-webapp/src/test/resources/data/freemind/links.mmr new file mode 100644 index 00000000..9a4fcf1c --- /dev/null +++ b/wise-webapp/src/test/resources/data/freemind/links.mmr @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/wise-webapp/src/test/data/freemind/links.wxml b/wise-webapp/src/test/resources/data/freemind/links.wxml similarity index 100% rename from wise-webapp/src/test/data/freemind/links.wxml rename to wise-webapp/src/test/resources/data/freemind/links.wxml diff --git a/wise-webapp/src/test/data/freemind/longnodes.mm b/wise-webapp/src/test/resources/data/freemind/longnodes.mm similarity index 100% rename from wise-webapp/src/test/data/freemind/longnodes.mm rename to wise-webapp/src/test/resources/data/freemind/longnodes.mm diff --git a/wise-webapp/src/test/resources/data/freemind/longnodes.mmr b/wise-webapp/src/test/resources/data/freemind/longnodes.mmr new file mode 100644 index 00000000..f5381e8a --- /dev/null +++ b/wise-webapp/src/test/resources/data/freemind/longnodes.mmr @@ -0,0 +1,6 @@ + + + + + + diff --git a/wise-webapp/src/test/data/freemind/longnodes.wxml b/wise-webapp/src/test/resources/data/freemind/longnodes.wxml similarity index 100% rename from wise-webapp/src/test/data/freemind/longnodes.wxml rename to wise-webapp/src/test/resources/data/freemind/longnodes.wxml diff --git a/wise-webapp/src/test/data/freemind/node-styles.mm b/wise-webapp/src/test/resources/data/freemind/node-styles.mm similarity index 100% rename from wise-webapp/src/test/data/freemind/node-styles.mm rename to wise-webapp/src/test/resources/data/freemind/node-styles.mm diff --git a/wise-webapp/src/test/resources/data/freemind/node-styles.mmr b/wise-webapp/src/test/resources/data/freemind/node-styles.mmr new file mode 100644 index 00000000..41a1f3ce --- /dev/null +++ b/wise-webapp/src/test/resources/data/freemind/node-styles.mmr @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wise-webapp/src/test/data/freemind/node-styles.wxml b/wise-webapp/src/test/resources/data/freemind/node-styles.wxml similarity index 100% rename from wise-webapp/src/test/data/freemind/node-styles.wxml rename to wise-webapp/src/test/resources/data/freemind/node-styles.wxml diff --git a/wise-webapp/src/test/data/freemind/process.mm b/wise-webapp/src/test/resources/data/freemind/process.mm similarity index 100% rename from wise-webapp/src/test/data/freemind/process.mm rename to wise-webapp/src/test/resources/data/freemind/process.mm diff --git a/wise-webapp/src/test/resources/data/freemind/process.mmr b/wise-webapp/src/test/resources/data/freemind/process.mmr new file mode 100644 index 00000000..99025379 --- /dev/null +++ b/wise-webapp/src/test/resources/data/freemind/process.mmr @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wise-webapp/src/test/data/freemind/process.wxml b/wise-webapp/src/test/resources/data/freemind/process.wxml similarity index 100% rename from wise-webapp/src/test/data/freemind/process.wxml rename to wise-webapp/src/test/resources/data/freemind/process.wxml diff --git a/wise-webapp/src/test/data/freemind/relationships.mm_disable b/wise-webapp/src/test/resources/data/freemind/relationships.mm_disable similarity index 100% rename from wise-webapp/src/test/data/freemind/relationships.mm_disable rename to wise-webapp/src/test/resources/data/freemind/relationships.mm_disable diff --git a/wise-webapp/src/test/data/svg/map1.png b/wise-webapp/src/test/resources/data/svg/map1.png similarity index 100% rename from wise-webapp/src/test/data/svg/map1.png rename to wise-webapp/src/test/resources/data/svg/map1.png diff --git a/wise-webapp/src/test/data/svg/map1.svg b/wise-webapp/src/test/resources/data/svg/map1.svg similarity index 100% rename from wise-webapp/src/test/data/svg/map1.svg rename to wise-webapp/src/test/resources/data/svg/map1.svg diff --git a/wise-webapp/src/test/data/svg/map2.png b/wise-webapp/src/test/resources/data/svg/map2.png similarity index 100% rename from wise-webapp/src/test/data/svg/map2.png rename to wise-webapp/src/test/resources/data/svg/map2.png diff --git a/wise-webapp/src/test/data/svg/map2.svg b/wise-webapp/src/test/resources/data/svg/map2.svg similarity index 100% rename from wise-webapp/src/test/data/svg/map2.svg rename to wise-webapp/src/test/resources/data/svg/map2.svg diff --git a/wise-webapp/src/test/data/svg/map3.png b/wise-webapp/src/test/resources/data/svg/map3.png similarity index 100% rename from wise-webapp/src/test/data/svg/map3.png rename to wise-webapp/src/test/resources/data/svg/map3.png diff --git a/wise-webapp/src/test/data/svg/map3.svg b/wise-webapp/src/test/resources/data/svg/map3.svg similarity index 100% rename from wise-webapp/src/test/data/svg/map3.svg rename to wise-webapp/src/test/resources/data/svg/map3.svg diff --git a/wise-webapp/src/test/data/svg/map4.png b/wise-webapp/src/test/resources/data/svg/map4.png similarity index 100% rename from wise-webapp/src/test/data/svg/map4.png rename to wise-webapp/src/test/resources/data/svg/map4.png diff --git a/wise-webapp/src/test/data/svg/map4.svg b/wise-webapp/src/test/resources/data/svg/map4.svg similarity index 100% rename from wise-webapp/src/test/data/svg/map4.svg rename to wise-webapp/src/test/resources/data/svg/map4.svg diff --git a/wise-webapp/src/test/data/svg/map5.png b/wise-webapp/src/test/resources/data/svg/map5.png similarity index 100% rename from wise-webapp/src/test/data/svg/map5.png rename to wise-webapp/src/test/resources/data/svg/map5.png diff --git a/wise-webapp/src/test/data/svg/map5.svg b/wise-webapp/src/test/resources/data/svg/map5.svg similarity index 100% rename from wise-webapp/src/test/data/svg/map5.svg rename to wise-webapp/src/test/resources/data/svg/map5.svg diff --git a/wise-webapp/src/test/resources/data/wisemaps/bigmap.mmr b/wise-webapp/src/test/resources/data/wisemaps/bigmap.mmr new file mode 100644 index 00000000..c4c18195 --- /dev/null +++ b/wise-webapp/src/test/resources/data/wisemaps/bigmap.mmr @@ -0,0 +1,264 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wise-webapp/src/test/data/wisemaps/bigmap.wxml b/wise-webapp/src/test/resources/data/wisemaps/bigmap.wxml similarity index 100% rename from wise-webapp/src/test/data/wisemaps/bigmap.wxml rename to wise-webapp/src/test/resources/data/wisemaps/bigmap.wxml diff --git a/wise-webapp/src/test/resources/data/wisemaps/simple-maps.mmr b/wise-webapp/src/test/resources/data/wisemaps/simple-maps.mmr new file mode 100644 index 00000000..ff76ed62 --- /dev/null +++ b/wise-webapp/src/test/resources/data/wisemaps/simple-maps.mmr @@ -0,0 +1,623 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wise-webapp/src/test/data/wisemaps/simple-maps.wxml b/wise-webapp/src/test/resources/data/wisemaps/simple-maps.wxml similarity index 100% rename from wise-webapp/src/test/data/wisemaps/simple-maps.wxml rename to wise-webapp/src/test/resources/data/wisemaps/simple-maps.wxml diff --git a/wise-webapp/src/test/resources/data/wisemaps/welcome.mmr b/wise-webapp/src/test/resources/data/wisemaps/welcome.mmr new file mode 100644 index 00000000..492c9904 --- /dev/null +++ b/wise-webapp/src/test/resources/data/wisemaps/welcome.mmr @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wise-webapp/src/test/data/wisemaps/welcome.wxml b/wise-webapp/src/test/resources/data/wisemaps/welcome.wxml similarity index 100% rename from wise-webapp/src/test/data/wisemaps/welcome.wxml rename to wise-webapp/src/test/resources/data/wisemaps/welcome.wxml