addFreemindAttributes(node, element);
if (node.isLeaf()) {
// add scale
Leaf leaf = (Leaf) node;
Scale scale = leaf.getScale();
if (scale != null) {
Element scaleElement = element.addElement("node");
String restriction = "?";
// restrictions: restrictedscale, ordinals -freestring
if (scale instanceof FreeStringScale) {
restriction = "free text";
} else if ((scale.getType() == ScaleType.ordinal || scale.getType() == ScaleType.restricted)
&& !"".equals(((RestrictedScale) scale).getRestriction())) {
restriction = ((RestrictedScale) scale).getRestriction();
} else {
restriction = scale.getUnit();
}
scaleElement.addAttribute("TEXT", restriction);
}
} else {