diff --git a/distribution/package-bin.sh b/distribution/package-bin.sh index edfaf11d..baf41057 100755 --- a/distribution/package-bin.sh +++ b/distribution/package-bin.sh @@ -43,7 +43,7 @@ mkdir $WISE_WEBAPP_DIR unzip $BASE_DIR/../wise-webapp/target/wisemapping.war -d $WISE_WEBAPP_DIR >/dev/null # DB Configuration ... -sed 's/target\/db\/wisemapping/webapps\/wisemapping\/WEB-INF\/database\/wisemapping/' $WISE_WEBAPP_DIR/WEB-INF/app.properties > $WISE_WEBAPP_DIR/WEB-INF/app.properties2 +sed 's/\${database.base.url}\/db\/wisemapping/webapps\/wisemapping\/WEB-INF\/database\/wisemapping/' $WISE_WEBAPP_DIR/WEB-INF/app.properties > $WISE_WEBAPP_DIR/WEB-INF/app.properties2 mv $WISE_WEBAPP_DIR/WEB-INF/app.properties2 $WISE_WEBAPP_DIR/WEB-INF/app.properties diff --git a/mindplot/pom.xml b/mindplot/pom.xml index 69ffc0d9..c1d703fe 100644 --- a/mindplot/pom.xml +++ b/mindplot/pom.xml @@ -140,6 +140,7 @@ Workspace.js ShrinkConnector.js DesignerKeyboard.js + TopicStyle.js NodeGraph.js Topic.js CentralTopic.js diff --git a/mindplot/src/main/javascript/CentralTopic.js b/mindplot/src/main/javascript/CentralTopic.js index 93fa74d0..89048628 100644 --- a/mindplot/src/main/javascript/CentralTopic.js +++ b/mindplot/src/main/javascript/CentralTopic.js @@ -36,29 +36,11 @@ mindplot.CentralTopic = new Class({ return this.getPosition(); }, - _getInnerPadding:function () { - return 11; - }, - - getTopicType:function () { - return mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE; - }, - setCursor:function (type) { type = (type == 'move') ? 'default' : type; this.parent(type); }, - isConnectedToCentralTopic:function () { - return false; - }, - - - _defaultShapeType:function () { - return mindplot.model.TopicShape.ROUNDED_RECT; - }, - - updateTopicShape:function () { }, @@ -70,28 +52,6 @@ mindplot.CentralTopic = new Class({ this.setPosition(zeroPoint); }, - _defaultText:function () { - return $msg('CENTRAL_TOPIC'); - }, - - _defaultBackgroundColor:function () { - return "rgb(80,157,192)"; - }, - - _defaultBorderColor:function () { - return "rgb(57,113,177)"; - }, - - _defaultFontStyle:function () { - return { - font:"Verdana", - size:10, - style:"normal", - weight:"bold", - color:"#ffffff" - }; - }, - getShrinkConnector:function () { return null; }, diff --git a/mindplot/src/main/javascript/Designer.js b/mindplot/src/main/javascript/Designer.js index 1d0f79e4..44d0ab71 100644 --- a/mindplot/src/main/javascript/Designer.js +++ b/mindplot/src/main/javascript/Designer.js @@ -160,6 +160,48 @@ mindplot.Designer = new Class({ } }.bind(this)); + // Register mouse drag and drop event ... + function noopHandler(evt) { + evt.stopPropagation(); + evt.preventDefault(); + } + + // Enable drag events ... + Element.NativeEvents.dragenter = 2; + Element.NativeEvents.dragexit = 2; + Element.NativeEvents.dragover = 2; + Element.NativeEvents.drop = 2; + + screenManager.addEvent('dragenter', noopHandler); + screenManager.addEvent('dragexit', noopHandler); + screenManager.addEvent('dragover', noopHandler); + screenManager.addEvent('drop', function (evt) { + evt.stopPropagation(); + evt.preventDefault(); +// + var files = evt.event.dataTransfer.files; + console.log(event); + + var count = files.length; + + // Only call the handler if 1 or more files was dropped. + if (count > 0) { + + var model = this.getMindmap().createNode(); + model.setImageSize(80, 43); + model.setMetadata("{'media':'video,'url':'http://www.youtube.com/watch?v=P3FrXftyuzw&feature=g-vrec&context=G2b4ab69RVAAAAAAAAAA'}"); + model.setImageUrl("images/logo-small.png"); + model.setShapeType(mindplot.model.TopicShape.IMAGE); + + var position = screenManager.getWorkspaceMousePosition(evt); + model.setPosition(position.x, position.y); + model.setPosition(100, 100); + + this._actionDispatcher.addTopics([model]); + } + }.bind(this)); + + }, _buildDragManager:function (workspace) { @@ -357,7 +399,7 @@ mindplot.Designer = new Class({ // Exclude central topic .. topics = topics.filter(function (topic) { - return topic.getTopicType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE + return !topic.isCentralTopic(); }); this._clipboard = topics.map(function (topic) { @@ -684,7 +726,7 @@ mindplot.Designer = new Class({ }, _removeTopic:function (node) { - if (node.getTopicType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { + if (!node.isCentralTopic()) { var parent = node._parent; node.disconnect(this._workspace); @@ -714,14 +756,14 @@ mindplot.Designer = new Class({ // If there are more than one node selected, $notify($msg('ENTITIES_COULD_NOT_BE_DELETED')); return; - } else if (topics.length == 1 && topics[0].getTopicType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { + } else if (topics.length == 1 && topics[0].isCentralTopic()) { $notify($msg('CENTRAL_TOPIC_CAN_NOT_BE_DELETED')); return; } // If the central topic has been selected, I must filter ir var topicIds = topics.filter(function (topic) { - return topic.getTopicType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE + return !topic.isCentralTopic(); }).map(function (topic) { return topic.getId() }); diff --git a/mindplot/src/main/javascript/DesignerKeyboard.js b/mindplot/src/main/javascript/DesignerKeyboard.js index c6f00fe0..1bead41f 100644 --- a/mindplot/src/main/javascript/DesignerKeyboard.js +++ b/mindplot/src/main/javascript/DesignerKeyboard.js @@ -241,7 +241,7 @@ mindplot.DesignerKeyboard = new Class({ 'right':function (event) { var node = model.selectedTopic(); if (node) { - if (node.getTopicType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { + if (node.isCentralTopic()) { this._goToSideChild(designer, node, 'RIGHT'); } else { @@ -263,7 +263,7 @@ mindplot.DesignerKeyboard = new Class({ 'left':function (event) { var node = model.selectedTopic(); if (node) { - if (node.getTopicType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { + if (node.isCentralTopic()) { this._goToSideChild(designer, node, 'LEFT'); } else { @@ -285,7 +285,7 @@ mindplot.DesignerKeyboard = new Class({ 'up':function (event) { var node = model.selectedTopic(); if (node) { - if (node.getTopicType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { + if (!node.isCentralTopic()) { this._goToBrother(designer, node, 'UP'); } } else { @@ -299,7 +299,7 @@ mindplot.DesignerKeyboard = new Class({ 'down':function (event) { var node = model.selectedTopic(); if (node) { - if (node.getTopicType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { + if (!node.isCentralTopic()) { this._goToBrother(designer, node, 'DOWN'); } } else { diff --git a/mindplot/src/main/javascript/MainTopic.js b/mindplot/src/main/javascript/MainTopic.js index 2a94d1e3..ff50fd0d 100644 --- a/mindplot/src/main/javascript/MainTopic.js +++ b/mindplot/src/main/javascript/MainTopic.js @@ -55,16 +55,11 @@ mindplot.MainTopic = new Class({ return group; }, - - _defaultShapeType:function () { - return mindplot.model.TopicShape.LINE; - }, - updateTopicShape:function (targetTopic, workspace) { // Change figure based on the connected topic ... var model = this.getModel(); var shapeType = model.getShapeType(); - if (targetTopic.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { + if (!targetTopic.isCentralTopic()) { if (!$defined(shapeType)) { // Get the real shape type ... shapeType = this.getShapeType(); @@ -88,10 +83,6 @@ mindplot.MainTopic = new Class({ innerShape.setVisibility(true); }, - getTopicType:function () { - return "MainTopic"; - }, - _updatePositionOnChangeSize:function (oldSize, newSize) { var xOffset = Math.round((newSize.width - oldSize.width) / 2); @@ -167,82 +158,6 @@ mindplot.MainTopic = new Class({ result = mindplot.util.Shape.calculateRectConnectionPoint(pos, size, isAtRight, true); } return result; - }, - - _getInnerPadding:function () { - var result; - var parent = this.getModel().getParent(); - if (parent && mindplot.model.INodeModel.MAIN_TOPIC_TYPE == parent.getType()) { - result = 3; - } - else { - result = 4; - } - return result; - }, - - isConnectedToCentralTopic:function () { - var model = this.getModel(); - var parent = model.getParent(); - - return parent && parent.getType() === mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE; - }, - - _defaultText:function () { - var targetTopic = this.getOutgoingConnectedTopic(); - var result = ""; - if ($defined(targetTopic)) { - if (targetTopic.getType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { - result = $msg('MAIN_TOPIC'); - } else { - result = $msg('SUB_TOPIC'); - } - } else { - result = $msg('ISOLATED_TOPIC'); - ; - } - return result; - }, - - _defaultFontStyle:function () { - var targetTopic = this.getOutgoingConnectedTopic(); - var result; - if ($defined(targetTopic)) { - if (targetTopic.getType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { - result = { - font:"Arial", - size:8, - style:"normal", - weight:"normal", - color:"rgb(82,92,97)" - }; - } else { - result = { - font:"Arial", - size:6, - style:"normal", - weight:"normal", - color:"rgb(82,92,97)" - }; - } - } else { - result = { - font:"Verdana", - size:8, - style:"normal", - weight:"normal", - color:"rgb(82,92,97)" - }; - } - return result; - }, - - _defaultBackgroundColor:function () { - return "rgb(224,229,239)"; - }, - - _defaultBorderColor:function () { - return 'rgb(2,59,185)'; } }); \ No newline at end of file diff --git a/mindplot/src/main/javascript/MultilineTextEditor.js b/mindplot/src/main/javascript/MultilineTextEditor.js index b7cb9161..ff754d3c 100644 --- a/mindplot/src/main/javascript/MultilineTextEditor.js +++ b/mindplot/src/main/javascript/MultilineTextEditor.js @@ -157,6 +157,10 @@ mindplot.MultilineTextEditor = new Class({ }, show:function (topic, text) { + // Close a previous node editor if it's opened ... + if (this._topic) { + this.close(false); + } this._topic = topic; if (!this.isVisible()) { @@ -272,7 +276,7 @@ mindplot.MultilineTextEditor = new Class({ }, close:function (update) { - if (this.isVisible()) { + if (this.isVisible() && this._topic) { // Update changes ... clearTimeout(this._timeoutId); @@ -286,9 +290,9 @@ mindplot.MultilineTextEditor = new Class({ // Remove it form the screen ... this._containerElem.dispose(); this._containerElem = null; - this._topic = null; this._timeoutId = -1; } + this._topic = null; } }); diff --git a/mindplot/src/main/javascript/Topic.js b/mindplot/src/main/javascript/Topic.js index 68f64aa5..e608fc51 100644 --- a/mindplot/src/main/javascript/Topic.js +++ b/mindplot/src/main/javascript/Topic.js @@ -29,7 +29,7 @@ mindplot.Topic = new Class({ // Position a topic .... var pos = model.getPosition(); - if (pos != null && model.getType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { + if (pos != null && this.isCentralTopic()) { this.setPosition(pos); } @@ -107,7 +107,7 @@ mindplot.Topic = new Class({ var model = this.getModel(); var result = model.getShapeType(); if (!$defined(result)) { - result = this._defaultShapeType(); + result = mindplot.TopicStyle.defaultShapeType(this); } return result; }, @@ -134,7 +134,7 @@ mindplot.Topic = new Class({ this._setBorderColor(brColor, false); // Define the pointer ... - if (this.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE && !this.isReadOnly()) { + if (!this.isCentralTopic() && !this.isReadOnly()) { this._innerShape.setCursor('move'); } else { this._innerShape.setCursor('default'); @@ -259,7 +259,7 @@ mindplot.Topic = new Class({ _buildIconGroup:function () { var textHeight = this.getTextShape().getFontHeight(); var result = new mindplot.IconGroup(this.getId(), textHeight); - var padding = this._getInnerPadding(); + var padding = mindplot.TopicStyle.getInnerPadding(this); result.setPosition(padding, padding); // Load topic features ... @@ -334,7 +334,7 @@ mindplot.Topic = new Class({ if (!readOnly) { // Propagate mouse events ... - if (this.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { + if (!this.isCentralTopic()) { result.setCursor('move'); } else { result.setCursor('default'); @@ -344,10 +344,6 @@ mindplot.Topic = new Class({ return result; }, - _getInnerPadding:function () { - throw "this must be implemented"; - }, - setFontFamily:function (value, updateModel) { var textShape = this.getTextShape(); textShape.setFontFamily(value); @@ -395,7 +391,7 @@ mindplot.Topic = new Class({ var model = this.getModel(); var result = model.getFontWeight(); if (!$defined(result)) { - var font = this._defaultFontStyle(); + var font = mindplot.TopicStyle.defaultFontStyle(this); result = font.weight; } return result; @@ -405,7 +401,7 @@ mindplot.Topic = new Class({ var model = this.getModel(); var result = model.getFontFamily(); if (!$defined(result)) { - var font = this._defaultFontStyle(); + var font = mindplot.TopicStyle.defaultFontStyle(this); result = font.font; } return result; @@ -415,7 +411,7 @@ mindplot.Topic = new Class({ var model = this.getModel(); var result = model.getFontColor(); if (!$defined(result)) { - var font = this._defaultFontStyle(); + var font = mindplot.TopicStyle.defaultFontStyle(this); result = font.color; } return result; @@ -425,7 +421,7 @@ mindplot.Topic = new Class({ var model = this.getModel(); var result = model.getFontStyle(); if (!$defined(result)) { - var font = this._defaultFontStyle(); + var font = mindplot.TopicStyle.defaultFontStyle(this); result = font.style; } return result; @@ -435,7 +431,7 @@ mindplot.Topic = new Class({ var model = this.getModel(); var result = model.getFontSize(); if (!$defined(result)) { - var font = this._defaultFontStyle(); + var font = mindplot.TopicStyle.defaultFontStyle(this); result = font.size; } return result; @@ -452,7 +448,7 @@ mindplot.Topic = new Class({ _setText:function (text, updateModel) { var textShape = this.getTextShape(); - textShape.setText(text == null ? this._defaultText() : text); + textShape.setText(text == null ? mindplot.TopicStyle.defaultText(this) : text); if ($defined(updateModel) && updateModel) { var model = this.getModel(); @@ -474,7 +470,7 @@ mindplot.Topic = new Class({ var model = this.getModel(); var result = model.getText(); if (!$defined(result)) { - result = this._defaultText(); + result = mindplot.TopicStyle.defaultText(this); } return result; }, @@ -502,7 +498,7 @@ mindplot.Topic = new Class({ var model = this.getModel(); var result = model.getBackgroundColor(); if (!$defined(result)) { - result = this._defaultBackgroundColor(); + result = mindplot.TopicStyle.defaultBackgroundColor(this); } return result; }, @@ -530,7 +526,7 @@ mindplot.Topic = new Class({ var model = this.getModel(); var result = model.getBorderColor(); if (!$defined(result)) { - result = this._defaultBorderColor(); + result = mindplot.TopicStyle.defaultBorderColor(this); } return result; }, @@ -822,7 +818,7 @@ mindplot.Topic = new Class({ setBranchVisibility:function (value) { var current = this; var parent = this; - while (parent != null && parent.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { + while (parent != null && !parent.isCentralTopic()) { current = parent; parent = current.getParent(); } @@ -1109,7 +1105,7 @@ mindplot.Topic = new Class({ var elem = this.get2DElement(); workspace.appendChild(elem); if (!this.isInWorkspace()) { - if (this.getType() != mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE) { + if (!this.isCentralTopic()) { mindplot.EventBus.instance.fireEvent(mindplot.EventBus.events.NodeAdded, this.getModel()); } @@ -1152,7 +1148,7 @@ mindplot.Topic = new Class({ var textHeight = textShape.getHeight(); textHeight = textHeight != 0 ? textHeight : 20; - var topicPadding = this._getInnerPadding(); + var topicPadding = mindplot.TopicStyle.getInnerPadding(this); // Adjust the icon size to the size of the text ... var iconGroup = this.getOrBuildIconGroup(); @@ -1214,7 +1210,13 @@ mindplot.Topic = new Class({ } } return result; + }, + + isCentralTopic:function () { + return this.getModel().getType() == mindplot.model.INodeModel.CENTRAL_TOPIC_TYPE; } + + }); diff --git a/mindplot/src/main/javascript/TopicStyle.js b/mindplot/src/main/javascript/TopicStyle.js new file mode 100644 index 00000000..43bb7b8f --- /dev/null +++ b/mindplot/src/main/javascript/TopicStyle.js @@ -0,0 +1,132 @@ +/* + * Copyright [2011] [wisemapping] + * + * Licensed under WiseMapping Public License, Version 1.0 (the "License"). + * It is basically the Apache License, Version 2.0 (the "License") plus the + * "powered by wisemapping" text requirement on every single page; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the license at + * + * http://www.wisemapping.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +mindplot.TopicStyle = new Class({ + Static:{ + _getStyles:function (topic) { + $assert(topic, "topic can not be null"); + + var result; + if (topic.isCentralTopic()) { + result = mindplot.TopicStyle.STYLES.CENTRAL_TOPIC; + } else { + var targetTopic = topic.getOutgoingConnectedTopic(); + if ($defined(targetTopic)) { + if (targetTopic.isCentralTopic()) { + result = mindplot.TopicStyle.STYLES.MAIN_TOPIC; + } else { + result = mindplot.TopicStyle.STYLES.SUB_TOPIC; + } + } else { + result = mindplot.TopicStyle.STYLES.ISOLATED_TOPIC; + } + } + return result; + }, + + defaultText:function (topic) { + var msgKey = this._getStyles(topic).msgKey; + return $msg(msgKey); + }, + + defaultFontStyle:function (topic) { + return this._getStyles(topic).fontStyle; + }, + + defaultBackgroundColor:function (topic) { + return this._getStyles(topic).backgroundColor; + }, + + defaultBorderColor:function (topic) { + return this._getStyles(topic).borderColor; + }, + + getInnerPadding:function (topic) { + return this._getStyles(topic).innerPadding; + }, + + defaultShapeType:function (topic) { + return this._getStyles(topic).shapeType; + } + + } +}); + +mindplot.TopicStyle.STYLES = +{ + CENTRAL_TOPIC:{ + borderColor:'rgb(57,113,177)', + backgroundColor:'rgb(80,157,192)', + fontStyle:{ + font:"Verdana", + size:10, + style:"normal", + weight:"bold", + color:"#ffffff" + }, + msgKey:'CENTRAL_TOPIC', + innerPadding:11, + shapeType:mindplot.model.TopicShape.ROUNDED_RECT + }, + + MAIN_TOPIC:{ + borderColor:'rgb(2,59,185)', + backgroundColor:'rgb(224,229,239)', + fontStyle:{ + font:"Arial", + size:8, + style:"normal", + weight:"normal", + color:"rgb(82,92,97)" + }, + msgKey:'MAIN_TOPIC', + innerPadding:3, + shapeType:mindplot.model.TopicShape.LINE + + }, + + SUB_TOPIC:{ + borderColor:'rgb(2,59,185)', + backgroundColor:'rgb(224,229,239)', + fontStyle:{ + font:"Arial", + size:6, + style:"normal", + weight:"normal", + color:"rgb(82,92,97)" + }, + msgKey:'SUB_TOPIC', + innerPadding:3, + shapeType:mindplot.model.TopicShape.LINE + }, + + ISOLATED_TOPIC:{ + borderColor:'rgb(2,59,185)', + backgroundColor:'rgb(224,229,239)', + fontStyle:{ + font:"Verdana", + size:8, + style:"normal", + weight:"normal", + color:"rgb(82,92,97)" + }, + msgKey:'ISOLATED_TOPIC', + innerPadding:4, + shapeType:mindplot.model.TopicShape.LINE + } +}; + diff --git a/wise-webapp/pom.xml b/wise-webapp/pom.xml index bbb42f98..c2dcbdf6 100644 --- a/wise-webapp/pom.xml +++ b/wise-webapp/pom.xml @@ -311,12 +311,8 @@ org.hsqldb.jdbc.JDBCDriver - jdbc:hsqldb:file:${project.basedir}/target/db/wisemapping + jdbc:hsqldb:file:${project.build.directory}/db/wisemapping sa - - ${maven.test.skipDB} @@ -494,6 +490,10 @@ org.mortbay.util.FileResource.checkAliases false + + database.base.url + ${project.build.directory} + @@ -502,7 +502,7 @@ start-jetty pre-integration-test - run-war + run 0 diff --git a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java index a1b55b20..77f96b25 100755 --- a/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java +++ b/wise-webapp/src/main/java/com/wisemapping/exporter/FreemindExporter.java @@ -1,5 +1,5 @@ /* -* Copyright [2012] [wisemapping] +* Copyright [2011] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the @@ -28,6 +28,7 @@ import com.wisemapping.jaxb.freemind.*; import com.wisemapping.jaxb.wisemap.RelationshipType; import com.wisemapping.jaxb.wisemap.TopicType; import com.wisemapping.jaxb.wisemap.Icon; +import org.apache.commons.lang.StringEscapeUtils; import org.jetbrains.annotations.NotNull; import org.w3c.dom.Document; import org.xml.sax.SAXException; @@ -164,11 +165,13 @@ public class FreemindExporter } // Formated text have a different representation .... - if (!text.contains("\n")) { - freemindNode.setTEXT(text); - } else { - final Richcontent richcontent = buildRichContent(text, "NODE"); - freemindNode.getArrowlinkOrCloudOrEdge().add(richcontent); + if (text != null) { + if (!text.contains("\n")) { + freemindNode.setTEXT(text); + } else { + final Richcontent richcontent = buildRichContent(text, "NODE"); + freemindNode.getArrowlinkOrCloudOrEdge().add(richcontent); + } } freemindNode.setBACKGROUNDCOLOR(mindmapTopic.getBgColor()); @@ -202,7 +205,8 @@ public class FreemindExporter final StringBuilder htmlContent = new StringBuilder(""); for (String line : text.split("\n")) { - htmlContent.append("

").append(line.trim()).append("

"); + line = StringEscapeUtils.escapeXml(line); + htmlContent.append("

").append(line).append("

"); } htmlContent.append(""); 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 703fe34f..7e6a219a 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 @@ -357,7 +357,7 @@ public class FreemindImporter * 3 -> 2 * 4 -> 4 */ - private int calcFirstLevelOrder(@NotNull List freeChilden, @NotNull Node freeChild) { + private int calcFirstLevelOrder(@NotNull List freeChilden, @Nullable Node freeChild) { final List nodes = new ArrayList(); int result; diff --git a/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java b/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java index 0ef7edfb..9bd5ed8d 100644 --- a/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java +++ b/wise-webapp/src/main/java/com/wisemapping/mail/NotificationService.java @@ -123,7 +123,8 @@ final public class NotificationService { private void handleException(Exception e) { System.err.println("An expected error has occurred trying to send an email notification. Usually, the main reason for this is that the SMTP server properties has not been configured properly. Edit the WEB-INF/app.properties file and verify the SMTP server configuration properties."); - e.printStackTrace(); + System.err.println("Cause:" + e.getMessage()); + } public void setBaseUrl(String baseUrl) { diff --git a/wise-webapp/src/main/java/com/wisemapping/ncontroller/UsersController.java b/wise-webapp/src/main/java/com/wisemapping/ncontroller/UsersController.java index 7ce07633..872bd1e2 100644 --- a/wise-webapp/src/main/java/com/wisemapping/ncontroller/UsersController.java +++ b/wise-webapp/src/main/java/com/wisemapping/ncontroller/UsersController.java @@ -52,9 +52,6 @@ public class UsersController { @Autowired private UserService userService; - @Value("${registration.email.enabled}") - boolean emailConfirmEnabled; - @Autowired private ReCaptcha captchaService; @@ -111,11 +108,13 @@ public class UsersController { user.setFirstname(userBean.getFirstname()); user.setLastname(userBean.getLastname()); user.setPassword(userBean.getPassword()); - userService.createUser(user, emailConfirmEnabled); + + boolean confirmRegistrationByEmail = false; + userService.createUser(user, confirmRegistrationByEmail); // Forward to the success view ... result = new ModelAndView("userRegistrationSuccess"); - result.addObject("confirmByEmail", emailConfirmEnabled); + result.addObject("confirmByEmail", confirmRegistrationByEmail); } return result; } diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java index d137025c..297735c2 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/AdminController.java @@ -18,6 +18,7 @@ package com.wisemapping.rest; +import com.wisemapping.exceptions.ClientException; import com.wisemapping.exceptions.WiseMappingException; import com.wisemapping.model.User; import com.wisemapping.rest.model.RestUser; diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java b/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java index 1bf3ea6e..96f77058 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/BaseController.java @@ -1,5 +1,5 @@ /* -* Copyright [2012] [wisemapping] +* Copyright [2011] [wisemapping] * * Licensed under WiseMapping Public License, Version 1.0 (the "License"). * It is basically the Apache License, Version 2.0 (the "License") plus the @@ -25,7 +25,6 @@ import com.wisemapping.mail.NotificationService; import com.wisemapping.model.User; import com.wisemapping.rest.model.RestErrors; import com.wisemapping.security.Utils; -import org.apache.log4j.Logger; import org.jetbrains.annotations.NotNull; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; @@ -43,8 +42,6 @@ import java.util.Locale; public class BaseController { - final protected static Logger logger = Logger.getLogger("com.wisemapping.rest"); - @Qualifier("messageSource") @Autowired private ResourceBundleMessageSource messageSource; @@ -59,8 +56,8 @@ public class BaseController { @ResponseStatus(HttpStatus.BAD_REQUEST) @ResponseBody public RestErrors handleClientErrors(@NotNull IllegalArgumentException ex) { - ex.printStackTrace(); - return new RestErrors(ex.getMessage(), Severity.SEVERE); + System.err.println(ex.getMessage()); + return new RestErrors(ex.getMessage(),Severity.WARNING); } @ExceptionHandler(Exception.class) diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java index 9d8225ea..804f465e 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/model/RestMindmap.java @@ -52,7 +52,6 @@ public class RestMindmap { public RestMindmap() throws WiseMappingException { this(new Mindmap(), null); - } public RestMindmap(@NotNull Mindmap mindmap, @Nullable Collaborator collaborator) throws WiseMappingException { diff --git a/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java b/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java index 77167379..4de93627 100644 --- a/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java +++ b/wise-webapp/src/main/java/com/wisemapping/rest/view/TransformView.java @@ -84,7 +84,7 @@ public class TransformView extends AbstractView { // Write the conversion content ... final ServletOutputStream outputStream = response.getOutputStream(); if (exportFormat == ExportFormat.FREEMIND) { - response.setCharacterEncoding("iso-8859-1"); + response.setCharacterEncoding("ASCII"); factory.export(properties, content, outputStream, null); } else if (exportFormat == ExportFormat.WISEMAPPING) { response.setCharacterEncoding("UTF-8"); diff --git a/wise-webapp/src/main/webapp/WEB-INF/app.properties b/wise-webapp/src/main/webapp/WEB-INF/app.properties index 9dabbd69..9d9189e3 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/app.properties +++ b/wise-webapp/src/main/webapp/WEB-INF/app.properties @@ -9,13 +9,17 @@ #database.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect #database.username=wisemapping #database.password=password +#database.validation.enabled=true +#database.validation.query=SELECT 1 # HSQL Configuration properties -database.url=jdbc:hsqldb:file:target/db/wisemapping +database.url=jdbc:hsqldb:file:${database.base.url}/db/wisemapping database.driver=org.hsqldb.jdbc.JDBCDriver database.hibernate.dialect=org.hibernate.dialect.HSQLDialect database.username=sa database.password= +database.validation.enabled=false +database.validation.query= ################################################################################## # Mail configuration. Must be configured to enable user registration confirmation. @@ -60,9 +64,6 @@ mail.errorReporterEmail= # Users Registration Configuration ################################################################################## -# Enable/Disable user registration confirmation by e-mail. If it's enabled, mail must be configured. -registration.email.enabled = false - # Enable captcha confirmation google.recaptcha.enabled = true diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml index 68e4bb3e..4a5a7338 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-aop.xml @@ -1,7 +1,8 @@ - - - + diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-dao.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-dao.xml index 4936d3c3..1f690e87 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-dao.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-dao.xml @@ -1,74 +1,80 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - com/wisemapping/model/Collaborator.hbm.xml - com/wisemapping/model/Mindmap.hbm.xml - com/wisemapping/model/Collaboration.hbm.xml - com/wisemapping/model/CollaborationProperties.hbm.xml - com/wisemapping/model/AccessAuditory.hbm.xml - com/wisemapping/model/MindMapHistory.hbm.xml - - - - - ${database.hibernate.dialect} - - - - - - - - - - - - - - - - - - - - - - - - - PROPAGATION_REQUIRED - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + com/wisemapping/model/Collaborator.hbm.xml + com/wisemapping/model/Mindmap.hbm.xml + com/wisemapping/model/Collaboration.hbm.xml + com/wisemapping/model/CollaborationProperties.hbm.xml + com/wisemapping/model/AccessAuditory.hbm.xml + com/wisemapping/model/MindMapHistory.hbm.xml + + + + + ${database.hibernate.dialect} + + + + + + + + + + + + + + + + + + + + + + + + + PROPAGATION_REQUIRED + + + + + + + + + + diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-model.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-model.xml index 946b5078..97e97080 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-model.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-model.xml @@ -1,15 +1,17 @@ - + + + + + + - - - - - - - - - - - + + + + \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml index c2e525d6..92352c2d 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-security.xml @@ -2,16 +2,16 @@ - - - - + http://www.springframework.org/schema/security/spring-security-3.1.xsd + http://www.springframework.org/schema/context + http://www.springframework.org/schema/context/spring-context.xsd"> + @@ -73,10 +73,8 @@ - - - - + + \ No newline at end of file diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml index fc8e0091..bbd9fcf5 100755 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-service.xml @@ -1,8 +1,10 @@ - + - - + @@ -74,7 +76,7 @@ - + diff --git a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml index b150a358..215414ce 100644 --- a/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml +++ b/wise-webapp/src/main/webapp/WEB-INF/wisemapping-servlet.xml @@ -14,11 +14,9 @@ - - - - - + @@ -114,8 +112,8 @@ - - - + diff --git a/wise-webapp/src/test/resources/data/wisemaps/bug2.mmr b/wise-webapp/src/test/resources/data/wisemaps/bug2.mmr new file mode 100644 index 00000000..9f5c2212 --- /dev/null +++ b/wise-webapp/src/test/resources/data/wisemaps/bug2.mmr @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/wisemaps/bug2.xml b/wise-webapp/src/test/resources/data/wisemaps/bug2.wxml similarity index 100% rename from wise-webapp/src/test/resources/data/wisemaps/bug2.xml rename to wise-webapp/src/test/resources/data/wisemaps/bug2.wxml diff --git a/wise-webapp/src/test/resources/data/wisemaps/bug3.mmr b/wise-webapp/src/test/resources/data/wisemaps/bug3.mmr new file mode 100644 index 00000000..fd2e1044 --- /dev/null +++ b/wise-webapp/src/test/resources/data/wisemaps/bug3.mmr @@ -0,0 +1,790 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + +

Firm's turnover from (new to firm)

+

product innovation (as a pecentage of total turnover)

+ + +
+ +
+ + + + + +

Increase in the probability to innovate linked to ICT use

+

(in product innovation, process innovation, organisational innovaton, marketing innovation)

+ + +
+
+ + + + + +

Scientific articles by type of collaboration (per capita)

+

(international co-authoriship, domestic co-authoriship, single author)

+ + +
+ +
+ + + + + +

Increase in a share of expenditures on technological

+

innovations in the total amount of regional firms’ expenditures, %

+ + +
+ +
+ + + + + + + + + + + +

Increase in th number of firms with

+

international/national collaboration on innovation

+ + +
+ +
+ + + + + +

Highly cited scientific articles (as a percentage of

+

highly cited scientific article in the whole Federation)

+ + +
+ +
+ + + + + +

Patents filed by public research organisations

+

(as a percentafe of patent application filed under PCT)

+ + +
+ +
+ + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Amount of university and colleague

+

students per 10 thousands population

+ + +
+
+ + + + + +

Share of employees with higher education in

+

the total amount of population at the working age

+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Share of high-technology export in the total volume

+

of production of goods, works and services

+ + +
+ +
+ + + + + +

Share of innovation production/serivces that goes for export,

+

by zones (EU, US, CIS, other countries

+ + +
+ +
+
+ + + + + + + + + + + + + + + + +

Share of Innovative companies collaborating

+

with research institutions on innovation

+ + +
+
+ + + + + +

Number of joint projects conducted by the local comapnies

+

and local consulting/intermediary agencies

+ + +
+
+ + + + + + + + + +

Share of expenditures on technological innovations

+

in the amount of sales

+ + +
+
+ + + + + + + + +

Investments in ICT by asset (IT equipment,

+

communication equipment, software)

+ + +
+
+ + + + + + + +

Level of energy efficiency of the regional economy

+

(can be measured by sectors and for the whole region)

+ + +
+ +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Amount of domestically protected intellectual

+

property per 1 mln. population

+ + +
+
+ + + + + + + +

Number of intellectual property exploited by regional

+

enterprises per 1 mln. population

+ + +
+ +
+ + + + + + + + + + + + + +

Number of advanced ICT introduced in the budgetary organizations

+

(regional power, municipal bodies, social and educational organizations)

+ + +
+
+ + + + + + +

Number of management innovations introduced in the budgetary organizations

+

(regional power, municipal bodies, social and educational organizations)

+ + +
+
+
+
+ + + + + + + + +

Number of interactions between universities

+

and large companies by university size

+ + +
+ +
+
+ + + + + + + + + + + + + + +

Publications: Academic articles in international peer-reviewed

+

journals per 1,000 researchers [articles/1,000 researchers].

+ + +
+
+
+ + + + + + + + + + + + +

Academic licenses: Number of licenses

+

per 1,000 researchers.[licenses/researcher]

+ + +
+
+
+ + + + + + +

Number of spin-offs with external private financing

+

as a share of the institution's R&D budget

+ + +
+
+
+ + + + + + + +

Foreign contracts: Number of contracts with foreign industria

+

l companies at scientific and educational organizations

+

per 1,000 researchers [contracts/researchers]

+ + +
+
+ + + + + + +

Revenue raised from industry R&D as a fraction

+

of total institutional budget (up to a cap)

+ + +
+
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Gazelle tenant: Share of tenants with

+

annual revenue growth of more than 20%

+

for each of the past four years or since formation [%]

+ + +
+
+ + + + + +

Globalization of tenants: Median share of tenant

+

revenues obtained from exports [%]

+ + +
+
+
+ + + + + + + + + + + + + +

Perception (opinion poll) of business managers

+

regarding public support programmes

+ + +
+
+
+ + + + + + +

Perception of business managers in terms

+

of level of transparency of support measures in the region

+ + +
+ +
+
+ + + + + +

Description by regional business managers of the way the

+

select and apply for regional and federal support schemes

+ + +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Average leverage of 1rub (there would be

+

several programs with different leverage)

+ + +
+ +
+ + + + + +

Volume of attracted money per one ruble

+

of regional budget expenditures on innovation projects

+ + +
+ +
+
+ +
+ + + + + + + + + + + + + + + + +

Growth of the volume of production in the cluster companies

+

to the volume of state support for the cluster

+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

FASIE projects: Number of projects supported

+

by the FASIE per 1,000 workers [awards/worker]

+ + +
+
+
+
+
+ + + + + + + + + + + + + +
\ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/wisemaps/bug3.wxml b/wise-webapp/src/test/resources/data/wisemaps/bug3.wxml new file mode 100644 index 00000000..adaae233 --- /dev/null +++ b/wise-webapp/src/test/resources/data/wisemaps/bug3.wxml @@ -0,0 +1,39 @@ + \ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/wisemaps/enc.mmr b/wise-webapp/src/test/resources/data/wisemaps/enc.mmr new file mode 100644 index 00000000..70ae1b94 --- /dev/null +++ b/wise-webapp/src/test/resources/data/wisemaps/enc.mmr @@ -0,0 +1,270 @@ + + + + + + + + + +

Therecent growth of large functional trait data

+

bases has been fuelled by standardized protocols forthe

+

measurement of individual functional traits and intensive

+

efforts to compile trait data(Cornelissen etal. 2003; Chave etal. 2009). Nonetheless, there remains no consensusfor

+

the most appropriate sampling design so that traits can be

+

scaled from the individuals on whom measurements are

+

made to the community or ecosystem levels at which infer-

+

ences are drawn (Swenson etal. 2006,2007,Reich,Wright

+

& Lusk 2007;Kraft,Valencia & Ackerly 2008).

+ + +
+
+ + + + + +

However, the fast pace of

+

development of plant trait meta-analyses also suggests that

+

trait acquisition in the field is a factor limiting the growth of

+

plant trait data bases.

+ + +
+
+ + + + + +

We measured

+

traits for every individual tree in nine 1-ha plots in tropical

+

lowland rainforest (N = 4709). Each plant was sampled for

+

10 functional traits related to wood and leaf morphology and

+

ecophysiology. Here, we contrast the trait means and variances

+

obtained with a full sampling strategy with those of

+

other sampling designs used in the recent literature, which we

+

obtain by simulation. We assess the differences in community-

+

level estimates of functional trait means and variances

+

among design types and sampling intensities. We then contrast

+

the relative costs of these designs and discuss the appropriateness

+

of different sampling designs and intensities for

+

different questions and systems.

+ + +
+
+ + + + + + + + +

With regard to estimating mean trait values, strategies

+

alternative to BRIDGE were consistently cost-effective. On

+

the other hand, strategies alternative to BRIDGE clearly

+

failed to accurately estimate the variance of trait values. This

+

indicates that in situations where accurate estimation of plotlevel

+

variance is desired, complete censuses are essential.

+ + +
+
+ + + + + +

We suggest that, in these studies,

+

the investment in complete sampling may be worthwhile

+

for at least some traits.

+ + +
+
+
+ + + + + + + +

Here, we develop a new approach that links functional attributes

+

of tree species with studies of forest recovery and regional

+

land-use transitions (Chazdon et al. 2007). Grouping species according

+

to their functional attributes or demographic rates provides

+

insight into both applied and theoretical questions, such as selecting

+

species for reforestation programs, assessing ecosystem services, and

+

understanding community assembly processes in tropical forests

+

(Diaz et al. 2007, Kraft et al. 2008).

+ + +
+
+ + + + + +

Since we have data on leaf

+

and wood functional traits for only a subset of the species in our

+

study sites, we based our functional type classification on information

+

for a large number of tree species obtained through vegetation

+

monitoring studies.

+ + +
+
+ + + + + + +

Our approach avoided preconceived notions of successional

+

behavior or shade tolerance of tree species by developing an objective

+

and independent classification of functional types based on vegetation

+

monitoring data from permanent sample plots in mature and

+

secondary forests of northeastern Costa Rica (Finegan et al. 1999,

+

Chazdon et al. 2007).We apply an independent, prior classification

+

of 293 tree species from our study region into five functional types, based on two species attributes: canopy strata and diameter growth

+

rates for individuals Z10 cm dbh (Finegan et al. 1999, Salgado-

+

Negret 2007).

+ + +
+
+ + + + + +

Our results demonstrate strong linkages between functional

+

types defined by adult height and growth rates of large trees and

+

colonization groups based on the timing of seedling, sapling, and

+

tree recruitment in secondary forests.

+ + +
+
+ + + + + +

These results allow us to move beyond earlier conceptual

+

frameworks of tropical forest secondary succession developed

+

by Finegan (1996) and Chazdon (2008) based on subjective groupings,

+

such as pioneers and shade-tolerant species (Swaine &

+

Whitmore 1988).

+ + +
+
+ + + + + +

Reproductive traits, such as dispersal mode, pollination mode,

+

and sexual system, were ultimately not useful in delimiting tree

+

functional types for the tree species examined here (Salgado-Negret

+

2007). Thus, although reproductive traits do vary quantitatively in

+

abundance between secondary and mature forests in our landscape

+

(Chazdon et al. 2003), they do not seem to be important drivers of

+

successional dynamics of trees Z10 cm dbh. For seedlings, however,

+

dispersal mode and seed size are likely to play an important

+

role in community dynamics during succession (Dalling&Hubbell

+

2002).

+ + +
+
+ + + + + +

Our classification of colonization groups defies the traditional

+

dichotomy between ‘late successional’ shade-tolerant and ‘early successional’

+

pioneer species. Many tree species, classified here as

+

regenerating pioneers on the basis of their population structure in

+

secondary forests, are common in both young secondary forest and

+

mature forests in this region (Guariguata et al. 1997), and many are

+

important timber species (Vilchez et al. 2008). These generalists are

+

by far the most abundant species of seedlings and saplings, conferring

+

a high degree of resilience in the wet tropical forests of NE

+

Costa Rica (Norden et al. 2009, Letcher & Chazdon 2009). The

+

high abundance of regenerating pioneers in seedling and sapling

+

size classes clearly shows that species with shade-tolerant seedlings

+

can also recruit as trees early in succession. For these species, early

+

tree colonization enhances seedling and sapling recruitment during

+

the first 20–30 yr of succession, due to local seed rain. Species

+

abundance and size distribution depend strongly on chance colonization

+

events early in succession (Chazdon 2008). Other studies

+

have shown that mature forest species are able to colonize early in

+

succession (Finegan 1996, van Breugel et al. 2007, Franklin & Rey

+

2007, Ochoa-Gaona et al. 2007), emphasizing the importance of

+

initial floristic composition in the determination of successional

+

pathways and rates of forest regrowth. On the other hand, significant

+

numbers of species in our sites (40% overall and the majority

+

of rare species) colonized only after canopy closure, and these species

+

may not occur as mature individuals until decades after agricultural

+

abandonment.

+ + +
+
+ + + + + +

Classifying functional types

+

based on functional traits with low plasticity, such as wood density

+

and seed size, could potentially serve as robust proxies for demographic

+

variables (Poorter et al. 2008, Zhang et al. 2008).

+ + +
+
+ + + + + +

CONDIT, R., S. P. HUBBELL, AND R. B. FOSTER. 1996. Assessing the response of

+

plant functional types in tropical forests to climatic change. J. Veg. Sci.

+

7: 405–416.

+

DALLING, J. S., AND S. P. HUBBELL. 2002. Seed size, growth rate and gap microsite

+

conditions as determinants of recruitment success for pioneer species.

+

J. Ecol. 90: 557–568.

+

FINEGAN, B. 1996. Pattern and process in neotropical secondary forests: The first

+

100 years of succession. Trends Ecol. Evol. 11: 119–124.

+

POORTER, L., S. J. WRIGHT, H. PAZ, D. D. ACKERLY, R. CONDIT, G.

+

IBARRA-MANRI´QUEZ, K. E. HARMS, J. C. LICONA, M.MARTI´NEZ-RAMOS,

+

S. J. MAZER, H. C. MULLER-LANDAU, M. PEN˜ A-CLAROS, C. O. WEBB,

+

AND I. J. WRIGHT. 2008. Are functional traits good predictors of demographic

+

rates? Evidence from five Neotropical forests. Ecology 89:

+

1908–1920.

+

ZHANG, Z. D., R. G. ZANG, AND Y. D. QI. 2008. Spatiotemporal patterns and

+

dynamics of species richness and abundance of woody plant functional

+

groups in a tropical forest landscape of Hainan Island, South China.

+

J. Integr. Plant Biol. 50: 547–558.

+ + +
+
+
+ + + + + + + +
\ No newline at end of file diff --git a/wise-webapp/src/test/resources/data/wisemaps/enc.wxml b/wise-webapp/src/test/resources/data/wisemaps/enc.wxml new file mode 100644 index 00000000..36358ae4 --- /dev/null +++ b/wise-webapp/src/test/resources/data/wisemaps/enc.wxml @@ -0,0 +1,188 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file