Exemplo n.º 1
0
def build_tree(node_space_uri=''):
    global tree
    nodespace = NodeSpace(node_space_uri)
    for factory, config in tree:
        node = nodespace.create_node(factory)
        node.configure(config)
    return nodespace
Exemplo n.º 2
0
def build_tree(node_space_uri = ''):
    global tree
    nodespace = NodeSpace(node_space_uri)
    for factory, config in tree:
        node = nodespace.create_node(factory)
        node.configure(config)
    return nodespace
Exemplo n.º 3
0
from mpx.lib.neode.interfaces import IEnableAble
from mpx.lib.neode.interfaces import IRunnable
from mpx.lib.neode.interfaces import INodeSpace
from mpx.lib.neode.interfaces import IConfigurableNode
from mpx.lib.neode.interfaces import ICompositeNode
from mpx.lib.neode.interfaces import IDeferredNode
from mpx.lib.neode.interfaces import IService
from mpx.lib.neode.interfaces import IRootNode
from mpx.lib.neode.interfaces import IAlias
from mpx.lib.neode.interfaces import IAliases
from mpx.lib.neode.node import NodeSpace
from mpx.lib.neode.node import ConfigurableNode
from mpx.lib.neode.node import CompositeNode
from mpx.lib.neode.node import RootNode

nodespace = NodeSpace()
root = nodespace.create_node(RootNode)
root.configure({'name': '/', 'parent': None})

services = nodespace.create_node(CompositeNode)
services.configure({'parent': root, 'name': 'services'})
am = nodespace.create_node(CompositeNode)
am.configure({'parent': services, 'name': 'Alarm Manager'})

io = nodespace.create_node(CompositeNode)
io.configure({'parent': root, 'name': 'interfaces'})

aliases = nodespace.create_node(CompositeNode)
aliases.configure({'parent': root, 'name': 'aliases'})

from mpx.www.w3c.dom.interfaces import IDomNode
Exemplo n.º 4
0
from mpx.lib.neode.interfaces import IEnableAble
from mpx.lib.neode.interfaces import IRunnable
from mpx.lib.neode.interfaces import INodeSpace
from mpx.lib.neode.interfaces import IConfigurableNode
from mpx.lib.neode.interfaces import ICompositeNode
from mpx.lib.neode.interfaces import IDeferredNode
from mpx.lib.neode.interfaces import IService
from mpx.lib.neode.interfaces import IRootNode
from mpx.lib.neode.interfaces import IAlias
from mpx.lib.neode.interfaces import IAliases
from mpx.lib.neode.node import NodeSpace
from mpx.lib.neode.node import ConfigurableNode
from mpx.lib.neode.node import CompositeNode
from mpx.lib.neode.node import RootNode

nodespace = NodeSpace()
root = nodespace.create_node(RootNode)
root.configure({'name': '/', 'parent': None})

services = nodespace.create_node(CompositeNode)
services.configure({'parent': root, 'name': 'services'})
am = nodespace.create_node(CompositeNode)
am.configure({'parent': services, 'name': 'Alarm Manager'})

io = nodespace.create_node(CompositeNode)
io.configure({'parent': root, 'name': 'interfaces'})

aliases = nodespace.create_node(CompositeNode)
aliases.configure({'parent': root, 'name': 'aliases'})