-
Notifications
You must be signed in to change notification settings - Fork 0
/
node_models.py
62 lines (42 loc) · 2.18 KB
/
node_models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
from neomodel import config, StructuredRel, StructuredNode, StringProperty, DateProperty, IntegerProperty, \
UniqueIdProperty, RelationshipTo, RelationshipFrom
class TermRel(StructuredRel):
rel_type = StringProperty()
class BaseNode(StructuredNode):
id = StringProperty(unique_index=True, required=True)
type = StringProperty(required = True)
contents = StringProperty()
wbs = StringProperty(index=True)
connects_to = RelationshipTo('BaseNode', 'CONNECTS', model=TermRel)
class ProcessNode(StructuredNode):
id = StringProperty(unique_index=True, required=True)
type = StringProperty(required = True)
text = StringProperty()
wbs = StringProperty(unique_index=True, required=True)
flow = RelationshipTo('ProcessNode', 'FLOWSTO', model=TermRel)
class AnnotateNode(StructuredNode):
id = StringProperty(unique_index=True, required=True)
text = StringProperty()
wbs = StringProperty(unique_index=True, required=True)
flow = RelationshipTo('ProcessNode', 'ANNOTATES', model=TermRel)
class SwimlaneNode(StructuredNode):
id = StringProperty(unique_index=True, required=True)
actor = StringProperty(required=True)
wbs = StringProperty(unique_index=True, required=True)
responsible = RelationshipTo('ProcessNode', 'Responsible', model=TermRel)
class PoolNode(StructuredNode):
id = StringProperty(unique_index=True, required=True)
name = StringProperty(unique_index = True, required = True)
wbs = StringProperty(unique_index=True, required=True)
hasactor = RelationshipTo('SwimlaneNode', 'HASACTOR', model=TermRel)
class PageNode(StructuredNode):
id = StringProperty(unique_index=True, required=True)
name = StringProperty(unique_index = True, required = True)
wbs = StringProperty(unique_index=True, required=True)
haspool = RelationshipTo('PoolNode', 'HASPOOL', model=TermRel)
class FileNode(StructuredNode):
id = StringProperty(unique_index=True, required=True)
name = StringProperty(unique_index = True, required = True)
path = StringProperty(required = True)
wbs = StringProperty(unique_index=True, required=True)
contains = RelationshipTo('PageNode', 'CONTAINS', model=TermRel)