- Add @NotNull support

- Add FreeMindTest suite
This commit is contained in:
Paulo Gustavo Veiga
2011-03-20 18:25:41 -03:00
parent 55f9352c59
commit 4ae0258411
6 changed files with 73 additions and 22 deletions

View File

@@ -26,6 +26,7 @@ import com.wisemapping.xml.freemind.*;
import com.wisemapping.xml.mindmap.RelationshipType;
import com.wisemapping.xml.mindmap.TopicType;
import com.wisemapping.xml.mindmap.Icon;
import org.jetbrains.annotations.NotNull;
import javax.xml.bind.JAXBException;
import java.io.IOException;
@@ -110,7 +111,7 @@ public class FreemindExporter
}
}
private void addNodeFromTopic(TopicType mainTopic, Node destNode) {
private void addNodeFromTopic(@NotNull final TopicType mainTopic, @NotNull final Node destNode) {
final List<TopicType> currentTopic = mainTopic.getTopic();
for (TopicType topicType : currentTopic) {
@@ -120,10 +121,10 @@ public class FreemindExporter
destNode.getArrowlinkOrCloudOrEdge().add(newNode);
addNodeFromTopic(topicType, newNode);
String position = topicType.getPosition();
if(position!=null){
if (position != null) {
String xPos = position.split(",")[0];
int x = Integer.valueOf(xPos);
newNode.setPOSITION((x<0?POSITION_LEFT:POSITION_RIGHT));
newNode.setPOSITION((x < 0 ? POSITION_LEFT : POSITION_RIGHT));
}
}
}