Repository navigation
Expand file tree
/
Copy pathdatalayer.py
More file actions
55 lines (36 loc) · 1.48 KB
/
Copy pathdatalayer.py
File metadata and controls
55 lines (36 loc) · 1.48 KB
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
from neomodel.properties import IntegerProperty
from neomodel import StructuredNode, StringProperty, RelationshipTo, RelationshipFrom, JSONProperty
class AbstractNode(StructuredNode):
@classmethod
def category(cls):
pass
__abstract_node__ = True
name = StringProperty(unique_index=True, required=True)
class Target(AbstractNode):
pointTo = RelationshipTo(AbstractNode, "FILES")
definitions = RelationshipTo(AbstractNode, "DEFINITIONS")
linkLibraries = RelationshipTo(AbstractNode, "LIBRARIES")
scope = StringProperty()
properties = JSONProperty()
class CustomCommand(AbstractNode):
commands = RelationshipTo(AbstractNode, 'COMMANDS')
depends = RelationshipTo(AbstractNode, 'DEPENDS')
extraInfo = JSONProperty()
# Might have to add more specific CustomCommandNode when the polymorphism
# becomes more complicated
class Definition(CustomCommand):
from_dir = StringProperty()
ordering = IntegerProperty()
inherits = RelationshipTo(AbstractNode, 'INHERITS')
class Reference(AbstractNode):
pointTo = RelationshipTo(AbstractNode, "DEPEND")
class Concat(AbstractNode):
contains = RelationshipTo(AbstractNode, "DEPEND")
class Literal(AbstractNode):
value = StringProperty()
class Select(AbstractNode):
trueNode = RelationshipTo(AbstractNode, "TRUE")
falseNode = RelationshipTo(AbstractNode, "FALSE")
condition = RelationshipTo(AbstractNode, 'CONDITION')
class Option(AbstractNode):
value = StringProperty()