Data
Class defined in model/data/Data.js#15 inherits from
new Data()
Constructor defined in model/data/Data.js#21
this.contains()
Method defined in model/data/Data.js#43

Check if this storage contains a node with given id.

Returns

bool | `true` if a node with id exists, `false` otherwise.

this.get(path)
Method defined in model/data/Data.js#53

Get a node or value via path.

Parameters

path | String|String[] | node id or path to property.

Returns

Node|Object|Primitive | a Node instance, a value or undefined if not found.

this.getNodes()
Method defined in model/data/Data.js#73

Get the internal storage for nodes.

Returns

| The internal node storage.

this.create()
Method defined in model/data/Data.js#82

Create a node from the given data.

Returns

Node | The created node.

this.delete(nodeId)
Method defined in model/data/Data.js#115

Delete the node with given id.

Parameters

nodeId | String |

Returns

Node | The deleted node.

this.set(property, newValue)
Method defined in model/data/Data.js#141

Set a property to a new value.

Parameters

property | Array | path
newValue | Object |

Returns

Node | The deleted node.

this.update(property, diff)
Method defined in model/data/Data.js#170

Update a property incrementally.

Parameters

property | Array | path
diff | Object |

Returns

any | The value before applying the update.

this.reset()
Method defined in model/data/Data.js#249

Clear nodes.

this.addIndex(name, index)
Method defined in model/data/Data.js#259

Add a node index.

Parameters

name | String |
index | NodeIndex |

this.getIndex(name)
Method defined in model/data/Data.js#274

Get the node index with given name.

Parameters

name | String |

Returns

NodeIndex | The node index.

this._updateIndexes(change)
Method defined in model/data/Data.js#283

Update a node index by providing of change object.

Parameters

change | Object |

this._stopIndexing()
Method defined in model/data/Data.js#300

Stops indexing process, all changes will be collected in indexing queue.

this._startIndexing()
Method defined in model/data/Data.js#309

Update all index changes from indexing queue.