first commit
[osm/LW-UI.git] / lib / TopologyModels / example / example.yaml
1 name: Example                              #Model name
2 description: example                       #Model description
3 version: 1.0                            #Model version
4 designer: Pierluigi Greto               #Model designer
5 nodes:                                   #List of nodes, with id and label used in the gui (We can add more fields)
6   examplenode1:
7     label: EXN1
8   examplenode2:
9     label: EXN2
10 layer:                                  #List of Layers
11     exampleLayer:
12       nodes:                  #List of node to be visualized in the current layer
13         examplenode1:
14           addable:
15             callback: addNode
16           removable: true
17         examplenode1:
18           addable:
19             callback: addNode
20           removable: true
21       allowed_edges:                  #List of allowed edges between the layer's nodes
22         examplenode1:                        #Edge's source
23           destination:           #List of edge's destination with the list of controls callback id to call when there is a connections
24             examplenode1:
25               direct_edge: false
26               removable: true
27             examplenode2:
28               direct_edge: false
29               removable: true
30 action:           #Action to show on rightclick on a node/link
31     rightclick:
32       node:
33         delete:
34           title: Delete
35           callback: deleteNode
36       link:
37         delete:
38           title: Delete
39           callback: deleteLink
40
41 callback:                             #List of callbacks used
42   addNode:
43       file: example_controller.js
44       class: ExampleController
45   removeNode:
46       file: example_controller.js
47       class: ExampleController
48   addLink:
49       file: example_controller.js
50       class: ExampleController
51   removeLink:
52       file: example_controller.js
53       class: ExampleController