Page 1 of 4

Clones in Freeplane.

PostPosted: Sat Feb 01, 2014 9:29 pm
by dpolivaev
I am going to implement clones in Freeplane.
I think how to do it as easy as possible.
Node with multiple parents should appear an different places with its complete subtree multiple times in the map.

We can keep existing NodeModel and just replace one single parent by collection of parents.
It should not implement TreeNode and MutableTreeNode any more.
Method getParentNode shall be declared obsolete. It should always return the first parent but it should not be used any more.

Folding should be saved in relation for each parent separately.
However if a node has only one parent node but it belongs to a cloned subtree the node folding state is shared between all subtrees.

All parents can be saved in node hook format to keep basic format compatibility with FreeMind.
However unlike FreeMind clones should not be saved in a redundant way.
Whenever a map is serialized each node with its children is completely saved when its first occurrence is found.
All following occurrences are saved in format <node ID="ID_12345" TEXT="Clone" FOLDED="true"/> without any additional elements or attributes.

So maps with clones should be properly displayed only by Freeplane.

Re: Clones in Freeplane.

PostPosted: Sat Feb 01, 2014 11:58 pm
by boercher
Hi Dimitry, this are great news! I think that format compatibility with FreeMind would be really a big plus. As you know I don't like multiple parents that much (since it is a severe deviation from the topology of mind maps, which are trees) but if it stays compatible with old maps that's fine with me.

Volker

Re: Clones in Freeplane.

PostPosted: Sun Feb 02, 2014 8:40 am
by dpolivaev
1. People, do you need clones? Do you have use cases for them? I need more use cases and other arguments in your feedback to motivate myself :)

2. Even if the file format experience only moderate changes, the internal API and the script API have to change significantly. Because each node does not know its position in the map any more and many controller methods require to know the node position their argument type should change from NodeModel to NodePosition at all relevant places.

For instance in the internal API it is not possible to have NodeModel.isVisible() or LogicalStyleController.getStyles(NodeModel),
you have to use MapModel.isNodeVisible(NodePosition) and LogicalStyleController.getStyles(NodePosition) instead.

NodePosition objects are available by NodeViews and during all recursive operations like reading, writing or filtering but not for nodes themselves.
Do you want to pay the price?

Dimitry

Re: Clones in Freeplane.

PostPosted: Sun Feb 02, 2014 12:46 pm
by sfpc
As normal user of FP, I utilize multiple maps, but I don't understand which impact could have this clone issue. May you explain (just a list) of advantages and functionalities that we may benefit with the clone development? Thanks
SFPC

Re: Clones in Freeplane.

PostPosted: Sun Feb 02, 2014 2:26 pm
by htgoebel
dpolivaev wrote:1. People, do you need clones? Do you have use cases for them?

I do not need clones, but I could need nodes having several parents. This would be an important step towards making freeplane a concept-map tool - which I could use quite well. The only difference would e the display/rendering: Instead of having a "cloned" node, the node would have several parent edges.

dpolivaev wrote:For instance in the internal API it is not possible to have NodeModel.isVisible() or LogicalStyleController.getStyles(NodeModel),
you have to use MapModel.isNodeVisible(NodePosition) and LogicalStyleController.getStyles(NodePosition) instead.

NodePosition objects are available by NodeViews and during all recursive operations like reading, writing or filtering but not for nodes themselves.

In one of my important maps, I need to filter subtrees below nodes of some style (say "UnwantedTopic"). Since filters are working on single nodes, for this the filter needs to walk *up* the tree searching of "UnwantedTopic". Will this still be possible somehow?

Re: Clones in Freeplane.

PostPosted: Sun Feb 02, 2014 7:21 pm
by dpolivaev
I do not need clones, but I could need nodes having several parents. This would be an important step towards making freeplane a concept-map tool - which I could use quite well. The only difference would e the display/rendering: Instead of having a "cloned" node, the node would have several parent edges
Freeplane is not a concept map tool as its specialty is a automatic layout for tree structures. Nevertheless you can use Freeplane for building concept maps using floating nodes and connectors. I do not think it shall be changed.

Since filters are working on single nodes, for this the filter needs to walk *up* the tree searching of "UnwantedTopic". Will this still be possible somehow
Yes.

I don't understand which impact could have this clone issue. May you explain (just a list) of advantages and functionalities that we may benefit with the clone development
Cloned subtrees mean that a part of the map can appear at more than one place in this map what means that it has multiple parent nodes. It could be helpful for having multiple classifications of the same elements in just one map. (Sorry, I think pretty abstract and I need use cases from the user community to explain it better.) Editing it at any place changes all its appearances. I believe this feature was implemented in FreeMind where you can try it. However if nobody needs it I just shall not spend any efforts on it.

Re: Clones in Freeplane.

PostPosted: Sun Feb 02, 2014 7:35 pm
by fnatter
hi,

I see a few use cases (there are probably more):
- virtual folders / short cuts: e.g. the indexFile add-on could store the "favorite files/folders" as clones
- Having the same information in different places (e.g. I use a "daily work log" and a "knowledge base"), so
that the information can be more easily found without searching.
(-> it's better than linking one and the same information via connectors 'cause the information is automatically
mirrored)
- possiblity to map information that is a graph (not a tree)
- We could apply tag nodes ("home", "work") to elements:
root->work->element1
root->work->element2
root->home->element1

On the other hand, possible disadvantages are:
- we need to adapt the add-on api and the file format (as I understand it),
but I think maps without clones will still be compatible (with freeplane/freemind)
- could cause instability (but I trust Dimitry that he will do it almost bug free)
- It could cause confusion -> could be solved by "clone" icon

Best Regards,
Felix

Re: Clones in Freeplane.

PostPosted: Sun Feb 02, 2014 8:59 pm
by danielk159
Here is a blog post showing a very didactic example of clones in mind maps:

http://www.topicscape.com/blog/2011/02/ ... g-software

Re: Clones in Freeplane.

PostPosted: Sun Feb 02, 2014 9:29 pm
by dpolivaev
Thank you for very nice example and arguments.

Re: Clones in Freeplane.

PostPosted: Mon Feb 03, 2014 2:10 pm
by johnrh
Hi:

Count this as my "vote" towards clones -- the use-cases I envision are around categorization of data in multiple places (so, viewing by time and subject, and keeping them in sync -- "things I'm working on this week" and "things I'm working on for the XX project", "things I'm working on for the XX project" and "things I'm waiting for YY to do", etc.). Filters can provide much of this functionality, but I believe cloned nodes would be more natural, since the structure would be maintained in the outline, rather than implied by attributes used for filtering.

I use other technology which supports clones (e.g. leo, http://leoeditor.com), and while I use leo more as an IDE, there's a body of people who use it as a knowledge management tool.

Clones would be very useful to me.

Thanks for a great tool,

Regards,
=John