-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathneo4j_query_20250128_141349.cypher
More file actions
169 lines (140 loc) · 4.83 KB
/
Copy pathneo4j_query_20250128_141349.cypher
File metadata and controls
169 lines (140 loc) · 4.83 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
CREATE (n:Entity {
name: "Class",
description: "A blueprint for creating objects that encapsulates data and functions."
});
CREATE (n:Entity {
name: "Instance",
description: "An individual object created from a class."
});
CREATE (n:Entity {
name: "Method",
description: "A function defined within a class that operates on instances of that class."
});
CREATE (n:Entity {
name: "Attribute",
description: "A variable that belongs to an instance or class."
});
CREATE (n:Entity {
name: "Inheritance",
description: "A mechanism where a new class can inherit attributes and methods from an existing class."
});
CREATE (n:Entity {
name: "Encapsulation",
description: "The bundling of data and methods that operate on that data within one unit, or class."
});
CREATE (n:Entity {
name: "Polymorphism",
description: "The ability to present the same interface for different underlying data types."
});
MATCH (e1:Entity {name: "Class"})
MATCH (e2:Entity {name: "Instance"})
CREATE (e1)-[r:RELATES_TO {
type: "Defines",
description: "A class defines the structure and behavior of its instances."
}]->(e2);
MATCH (e1:Entity {name: "Class"})
MATCH (e2:Entity {name: "Method"})
CREATE (e1)-[r:RELATES_TO {
type: "Contains",
description: "Methods are functions that belong to a class."
}]->(e2);
MATCH (e1:Entity {name: "Class"})
MATCH (e2:Entity {name: "Attribute"})
CREATE (e1)-[r:RELATES_TO {
type: "Contains",
description: "Attributes are variables that hold data for a class."
}]->(e2);
MATCH (e1:Entity {name: "Class"})
MATCH (e2:Entity {name: "Inheritance"})
CREATE (e1)-[r:RELATES_TO {
type: "Utilizes",
description: "Inheritance allows a class to inherit properties from another class."
}]->(e2);
MATCH (e1:Entity {name: "Class"})
MATCH (e2:Entity {name: "Encapsulation"})
CREATE (e1)-[r:RELATES_TO {
type: "Achieves",
description: "Encapsulation is achieved through classes."
}]->(e2);
MATCH (e1:Entity {name: "Class"})
MATCH (e2:Entity {name: "Polymorphism"})
CREATE (e1)-[r:RELATES_TO {
type: "Supports",
description: "Polymorphism allows methods to be used interchangeably across different classes."
}]->(e2);
CREATE (n:Entity {
name: "Classes",
description: "Classes provide a means of bundling data and functionality together."
});
CREATE (n:Entity {
name: "Object",
description: "An instance of a class."
});
CREATE (n:Entity {
name: "Method",
description: "A function that belongs to an object."
});
CREATE (n:Entity {
name: "Instance Variable",
description: "Data unique to each instance of a class."
});
CREATE (n:Entity {
name: "Class Variable",
description: "Attributes and methods shared by all instances of a class."
});
CREATE (n:Entity {
name: "Inheritance",
description: "A mechanism to create a new class using properties and methods of an existing class."
});
CREATE (n:Entity {
name: "Private Variables",
description: "Variables that are intended to be non-public and should not be accessed directly."
});
CREATE (n:Entity {
name: "Iterator",
description: "An object that enables a programmer to traverse a container, particularly lists."
});
CREATE (n:Entity {
name: "Generator",
description: "A simple and powerful tool for creating iterators using the yield statement."
});
CREATE (n:Entity {
name: "Generator Expression",
description: "A compact way to create generators using a syntax similar to list comprehensions."
});
MATCH (e1:Entity {name: "Classes"})
MATCH (e2:Entity {name: "Object"})
CREATE (e1)-[r:RELATES_TO {
type: "creates",
description: "Classes can create instances which are objects."
}]->(e2);
MATCH (e1:Entity {name: "Class Variable"})
MATCH (e2:Entity {name: "Instance Variable"})
CREATE (e1)-[r:RELATES_TO {
type: "distinction",
description: "Class variables are shared among all instances, while instance variables are unique."
}]->(e2);
MATCH (e1:Entity {name: "Inheritance"})
MATCH (e2:Entity {name: "Classes"})
CREATE (e1)-[r:RELATES_TO {
type: "inherits",
description: "Inheritance allows a class to inherit attributes and methods from another class."
}]->(e2);
MATCH (e1:Entity {name: "Private Variables"})
MATCH (e2:Entity {name: "Classes"})
CREATE (e1)-[r:RELATES_TO {
type: "restricts access",
description: "Private variables are defined within classes to restrict access."
}]->(e2);
MATCH (e1:Entity {name: "Iterator"})
MATCH (e2:Entity {name: "Generator"})
CREATE (e1)-[r:RELATES_TO {
type: "is a type of",
description: "Generators are a type of iterator that can be created using a function."
}]->(e2);
MATCH (e1:Entity {name: "Generator"})
MATCH (e2:Entity {name: "Generator Expression"})
CREATE (e1)-[r:RELATES_TO {
type: "is a form of",
description: "Generator expressions provide a concise way to create generators."
}]->(e2);