- Set freemind version to the exported map

- Exported map don't useless font nodes.
This commit is contained in:
Paulo Gustavo Veiga
2011-03-12 17:08:01 -03:00
parent 905e1b8ee5
commit 600bde0e15
6 changed files with 152 additions and 105 deletions

View File

@@ -0,0 +1,15 @@
<map version="0.9.0">
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
<node CREATED="1299957724614" ID="ID_1257555991" MODIFIED="1299957854045" TEXT="This is the root node">
<node CREATED="1299957744918" ID="ID_1422930763" MODIFIED="1299957853173" POSITION="right" TEXT="Child Level 1 Right 1"/>
<node CREATED="1299957780229" ID="ID_144311076" MODIFIED="1299957963408" POSITION="left" TEXT="Child Level 1 Left 1">
<node CREATED="1299957789533" ID="ID_1332317829" MODIFIED="1299957906469" TEXT="Child Level 2 Left 11"/>
<node CREATED="1299957813629" ID="ID_655171350" MODIFIED="1299957910302" TEXT="Child Level 2 Left 12"/>
</node>
<node CREATED="1299957842218" ID="ID_217430375" MODIFIED="1299957850272" POSITION="right" TEXT="Child Level 1 Right 2"/>
<node CREATED="1299957854506" ID="ID_1895272648" MODIFIED="1299957934625" POSITION="left" TEXT="Child Level 1 Left 2">
<node CREATED="1299957875229" ID="ID_1628175442" MODIFIED="1299957927173" TEXT="Child Level 2 Left 21 "/>
<node CREATED="1299957940222" ID="ID_1406492242" MODIFIED="1299957958013" TEXT="Child Level 2 Left 22"/>
</node>
</node>
</map>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<map version="0.9.0">
<node TEXT="This is the root node" STYLE="line" ID="ID_0">
<node TEXT="Child Level 1 Right 1" STYLE="line" ID="ID_1"/>
<node TEXT="Child Level 1 Left 1" STYLE="line" ID="ID_2">
<node TEXT="Child Level 2 Left 11" STYLE="line" ID="ID_3"/>
<node TEXT="Child Level 2 Left 12" STYLE="line" ID="ID_4"/>
</node>
<node TEXT="Child Level 1 Right 2" STYLE="line" ID="ID_5"/>
<node TEXT="Child Level 1 Left 2" STYLE="line" ID="ID_6">
<node TEXT="Child Level 2 Left 21 " STYLE="line" ID="ID_7"/>
<node TEXT="Child Level 2 Left 22" STYLE="line" ID="ID_8"/>
</node>
</node>
</map>

View File

@@ -0,0 +1,36 @@
package wisemapping.test.freemind;
import com.wisemapping.exporter.ExportException;
import com.wisemapping.exporter.freemind.FreemindExporter;
import com.wisemapping.importer.ImportFormat;
import com.wisemapping.importer.Importer;
import com.wisemapping.importer.ImporterException;
import com.wisemapping.importer.ImporterFactory;
import com.wisemapping.model.MindMap;
import org.testng.annotations.Test;
import java.io.*;
public class FreeMindExportTest {
private static final String DATA_DIR_PATH = "wise-webapp/src/test/data/freemind/";
@Test
public void exportImportExportTest() throws ImporterException, IOException, ExportException {
ImporterFactory instance = ImporterFactory.getInstance();
Importer importer = instance.getImporter(ImportFormat.FREEMIND);
FileInputStream fileInputStream = new FileInputStream(new File(DATA_DIR_PATH, "basic.mm").getAbsolutePath());
final MindMap mindMap = importer.importMap("basic", "basic", fileInputStream);
final FreemindExporter freemindExporter = new FreemindExporter();
FileOutputStream fos = new FileOutputStream(new File("wise-webapp/src/test/data/freemind/","basice.mm"));
freemindExporter.export(mindMap,fos);
fos.close();
}
}