Skip to content
Julius Seltenheim edited this page Jun 3, 2013 · 24 revisions

Table of Content

  1. Mind Map
  2. MindMapInfo
  3. Map Update
  4. Nodes
  5. Edge
  6. Image
  7. Metadata
  8. ChangedFilesResponse
  9. ProjectUpdates

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" : "ChangeNodeAttribute",
  "nodeId" : String,
  "attribute" : String,
  "value" : mixed
}

Change Edge Attribute Update

  • attribute: can be every attribute of an Edge
  • value: depends on attribute
{
  "type" : "ChangeEdgeAttribute",
  "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" : {bezier, hide_edge, horizontal, linear, sharp_bezier, sharp_linear, summary}
}

Image

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

Metadata

  • path: path pf the resource in the project
  • revision: revision of the given metadata
  • dir: is resource a folder
  • deleted: is file currently present

file only

  • hash: file hash

folder only

  • contents: Metadata-objects of children items. Only for one level. Next levels wont have contents-attribute
{
    "path": string,
    "hash": string,
    "bytes": long,
    "revision": long,
    "dir": boolean,
    "deleted": boolean,
    "contents": [Metadata,Metadata,Metadata,...]
}

ChangedFileResponse

returns for every changed resource the path and the current metadata

{
    "currentRevision": long,
    "resources": {
        path: Metadata,
        path2: Metadata,
        ...
}

ProjectUpdates

each map/list contains projectIds as fields with the according revision as value.

{
    "updatedProjects": {
        projectId: currentRevision,
        projectId: currentRevision,
        ...
    },
    "newProjects": {
        projectId: currentRevision,
        projectId: currentRevision,
        ...
    },
    "deletedProjects": [projectId, projectId,...]
}

Clone this wiki locally