1. @override
SimpleNode addNode(String path, Map m)

Adds a node at the given path that is initialized with the given data in m.

Source

@override
SimpleNode addNode(String path, Map m) {
  if (path == '/' || !path.startsWith('/')) return null;

  Path p = new Path(path);
  SimpleNode pnode = getNode(p.parentPath);

  SimpleNode node;

  if (pnode != null) {
    node = pnode.onLoadChild(p.name, m, this);
  }

  if (node == null) {
    String profile = m[r'$is'];
    if (profileMap.containsKey(profile)) {
      node = profileMap[profile](path);
    } else {
      node = new CallbackNode(path);
    }
  }

  nodes[path] = node;
  node.load(m);

  node.onCreated();

  if (pnode != null) {
    pnode.children[p.name] = node;
    pnode.onChildAdded(p.name, node);
    pnode.updateList(p.name);
  }

  return node;
}