From 4f1bb45fc25d1ecc66fbcfb971ee221e1e5e45c6 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Sat, 29 Sep 2012 17:38:51 -0300 Subject: [PATCH] Minor improvement to change freemind change if the background color was defined. --- distribution/package-bin.sh | 5 +++-- .../importer/freemind/FreemindImporter.java | 13 ++++++++----- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/distribution/package-bin.sh b/distribution/package-bin.sh index 9bdadee0..edfaf11d 100755 --- a/distribution/package-bin.sh +++ b/distribution/package-bin.sh @@ -9,7 +9,8 @@ BASE_DIR=`pwd` TARGET_DIR=$BASE_DIR/target JETTY_DIR=$TARGET_DIR/wisemapping-$WISE_VERSION WISE_WEBAPP_DIR=$JETTY_DIR/webapps/wisemapping -JETTY_DIST_DIR=jetty-distribution-8.1.4.v20120524 +JETTY_VERSION=8.1.5.v20120716 +JETTY_DIST_DIR=jetty-distribution-${JETTY_VERSION} JETTY_ZIP=${JETTY_DIST_DIR}.zip # Clean ... @@ -24,7 +25,7 @@ mvn -o -f $BASE_DIR/../pom.xml package -Dmaven.test.skip=true if [ ! -f ./target/${JETTY_ZIP} ] then echo "Download Jetty" - wget http://download.eclipse.org/jetty/8.1.4.v20120524/dist/jetty-distribution-8.1.4.v20120524.zip -P $TARGET_DIR + wget http://download.eclipse.org/jetty/${JETTY_VERSION}/dist/${JETTY_ZIP} -P $TARGET_DIR fi echo "Unzip Jetty ...:" diff --git a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java index 0687c0b5..ab47ccca 100755 --- a/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/importer/freemind/FreemindImporter.java @@ -150,10 +150,7 @@ public class FreemindImporter addRelationships(mindmapMap); JAXBUtils.saveMap(mindmapMap, baos); - wiseXml = new String(baos.toByteArray(), UTF_8_CHARSET); - - result.setXmlStr(wiseXml); result.setTitle(mapName); result.setDescription(description); @@ -625,10 +622,16 @@ public class FreemindImporter String getShapeFormFromNode(@NotNull Node node) { String result = node.getSTYLE(); // In freemind a node without style is a line - if ("bubble".equals(result)) { + if ("bubble".equals(result)) + { result = ShapeStyle.ROUNDED_RECTANGLE.getStyle(); } else { - result = ShapeStyle.LINE.getStyle(); + if(node.getBACKGROUNDCOLOR()!=null){ + // This the node has background color defined. It's better to change the default shape. + result = ShapeStyle.RECTANGLE.getStyle(); + } else { + result = ShapeStyle.LINE.getStyle(); + } } return result; }