Skip to content
juliusse edited this page Apr 11, 2013 · 24 revisions

Table of Content

  1. Mind Map
  2. MindMapInfo
  3. Map Update
  4. Nodes
  5. Edge
  6. Image

Objects

Mind Map

A mind map contains a RootNode, which is slightly different to a normal node.

{
  "id" : String
  "isReadonly" : boolean,
  "revision" : integer
  "name" : string
  "root" : RootNode
}

MindMapInfo

{
  "mmIdOnServer" : String,
  "mmIdInternal" : String,
  "revision" : Time,
  "filePath" : String,
  "fileName" : String
}

Map Update

There are several types of map updates

Add Node Update

{
  "type" : "AddNode",
  "parentNodeId" : String,
  "nodeAsJson" : String,
  "side" : "Left" | "Right" //only for root node!
}

Remove Node Update

{
  "type" : "DeleteNode",
  "nodeId" : String,
}

Change Node Attribute Update

  • attribute: can be every attribute of a Node
  • value: depends on attribute
{
  "type" : "ChangeNode",
  "nodeId" : String,
  "attribute" : String,
  "value" : mixed
}

Move Node to another Position Update

{
  "type" : "MoveNode",
  "newParentNodeId" : String,
  "nodetoMoveId" : String,
  "newIndex" : String
}

Node

  • hGap: horizontal distance to parent
  • shiftY: used to calculate the vertical position
  • icons: List with names of predefined icons
    • We need the icons on the server
    • Exit in freeplane project: \freeplane\bin\classes\images\icons
  • prefferedChild: appears to be important
  • nodeText: plain text or HTML, defined by isHtml
  • isHtml: defines if nodeText is plain text or HTML
  • link: external link or link to another node
    • http:// for hyperlinks
    • node:// for nodes
    • workspace:// for workspace files
  • attributes: Table with attributes of node
    • self definde table
    • information from JabRef
  • locked: name of user, which has lock on node
  • children: list with children, when they have been loaded
  • childrenIds: list with ids of children, when due to chunking they haven't been loaded

Note: children and childrenIds do not appear together!

{
  "id" : string,
  "hGap" : integer,
  "shiftY" : integer,
  "folded" : boolean,
  "icons" : [string,string,...], //names of icons
  "prefferedChild" : DefaultNode,
  "nodeText" : string,
  "isHtml" : boolean,
  //"isFree" : boolean,
  //"isSummary" : boolean,
  //"defaultStyle" : string,
  "edgeStyle" : Edge, // edge to parent node, not specified parameters are inherited from parent
  "image" : Image,
  "link" : string,
  "note" : string,
  "children" : [DefaultNode,DefaultNode...],
  "childrenIds" : [string, string,...],
  "attributes" : ["key1%:%value1","key2%:%value2",...]
  "locked" : string
}

Root Node (Special case)

Very similar to a normal node with some small changes.
At the root node it is possible to have children on the right and on the left side.

  • leftChildren: sorted list with children on the left side
  • rightChildren: sorted list with children on the right side For further descriptions see Normal Node
{
  "id" : string,
  "folded" : boolean,
  "icons" : [string,string,...], //names of icons
  "prefferedChild" : DefaultNode,
  "nodeText" : string,
  "isHtml" : boolean,
  "image" : Image,
  "link" : string,
  "note" : string,
  "leftChildren" : [DefaultNode,DefaultNode,...],
  "rightChildren" :  [DefaultNode,DefaultNode,...]
}

Edge

An Edge object contains style definitions. It is applied in the parent direction.
Not defined attributes are inherited from the parent.

{
	"width" : integer,
	"color" : integer,
	"style" : {EDGESTYLE_BEZIER, EDGESTYLE_HIDDEN, EDGESTYLE_HORIZONTAL, EDGESTYLE_LINEAR, EDGESTYLE_SHARP_BEZIER, EDGESTYLE_SHARP_LINEAR, EDGESTYLE_SUMMARY}
}

Image

  • zoomFactor: 100 means 100% of the image size
{
	"URI" : string,
	"zoomFactor" : float
}

Clone this wiki locally