-
Notifications
You must be signed in to change notification settings - Fork 3
/
emc-demo.cypher
260 lines (211 loc) · 12.9 KB
/
emc-demo.cypher
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
MATCH (all)
DETACH DELETE all;
CREATE(group:Group {groupId: "jane's_lab_ed5fd39c-15a4-461c-bdcc-989ee5ffadad", name: "Jan's Lab"});
CREATE(group:Group {groupId: 'abelota-lab_090d6c8b-7cfd-4f8a-afaf-0730a2320ff2', name: 'Abelota-Lab'});
CREATE(user:User {username: 'testuser'});
CREATE(user:User {username: 'abigaill'});
CREATE(user:User {username: 'adalee'});
CREATE(user:User {username: 'abelota'});
MATCH(group:Group {groupId: "jane's_lab_ed5fd39c-15a4-461c-bdcc-989ee5ffadad"})
MATCH(user:User {username: 'testuser'})
CREATE(user)-[:MEMBER_OF {membership: 'owner'}]->(group);
MATCH(group:Group {groupId: "jane's_lab_ed5fd39c-15a4-461c-bdcc-989ee5ffadad"})
MATCH(user:User {username: 'abigaill'})
CREATE(user)-[:MEMBER_OF {membership: 'member'}]->(group);
MATCH(group:Group {groupId: "jane's_lab_ed5fd39c-15a4-461c-bdcc-989ee5ffadad"})
MATCH(user:User {username: 'adalee'})
CREATE(user)-[:MEMBER_OF {membership: 'member'}]->(group);
MATCH(group:Group {groupId: 'abelota-lab_090d6c8b-7cfd-4f8a-afaf-0730a2320ff2'})
MATCH(user:User {username: 'testuser'})
CREATE(user)-[:MEMBER_OF {membership: 'member'}]->(group);
MATCH(group:Group {groupId: 'abelota-lab_090d6c8b-7cfd-4f8a-afaf-0730a2320ff2'})
MATCH(user:User {username: 'adalee'})
CREATE(user)-[:MEMBER_OF {membership: 'member'}]->(group);
MATCH(group:Group {groupId: 'abelota-lab_090d6c8b-7cfd-4f8a-afaf-0730a2320ff2'})
MATCH(user:User {username: 'abelota'})
CREATE(user)-[:MEMBER_OF {membership: 'owner'}]->(group);
CREATE(collection:Collection {
collectionId: 1, name: 'testuser-05-10-2021-22-19', owner: 'testuser', createdAt: datetime(), createdBy: 'testuser',
lastUpdatedAt: datetime(), lastUpdatedBy: 'testuser'})
CREATE(:Dataset {
datasetId: 1, name: 'file-1.png', owner: 'testuser', createdAt: datetime(), createdBy: 'testuser',
lastUpdatedAt: datetime(), lastUpdatedBy: 'testuser'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 2, name: 'file-2.png', owner: 'testuser', createdAt: datetime(), createdBy: 'testuser',
lastUpdatedAt: datetime(), lastUpdatedBy: 'testuser'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 3, name: 'file-3.png', owner: 'testuser', createdAt: datetime(), createdBy: 'testuser',
lastUpdatedAt: datetime(), lastUpdatedBy: 'testuser'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 4, name: 'file-4.png', owner: 'testuser', createdAt: datetime(), createdBy: 'testuser',
lastUpdatedAt: datetime(), lastUpdatedBy: 'testuser'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 5, name: 'file-5.png', owner: 'testuser', createdAt: datetime(), createdBy: 'testuser',
lastUpdatedAt: datetime(), lastUpdatedBy: 'testuser'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 6, name: 'file-6.png', owner: 'testuser', createdAt: datetime(), createdBy: 'testuser',
lastUpdatedAt: datetime(), lastUpdatedBy: 'testuser'})-[:CHILD_OF]->(collection);
MATCH(collection:Collection {collectionId: 1})
MATCH(user:User {username: 'testuser'})
CREATE(user)-[:HAS_PERMISSION {access: 'owner'}]->(collection);
MATCH(collection:Collection {collectionId: 1})
MATCH(group:Group {groupId: "jane's_lab_ed5fd39c-15a4-461c-bdcc-989ee5ffadad"})
CREATE(group)-[:HAS_PERMISSION {access: 'view'}]->(collection);
CREATE(collection:Collection {
collectionId: 2, name: 'abelota-05-10-2021-22-19', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})
CREATE(:Dataset {
datasetId: 7, name: 'file-1.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 8, name: 'file-2.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 9, name: 'file-3.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 10, name: 'file-4.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 11, name: 'file-5.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 12, name: 'file-6.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection);
CREATE(collection:Collection {
collectionId: 3, name: 'abelota-05-10-2021-22-57', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})
CREATE(:Dataset {
datasetId: 13, name: 'xxhhhhdhdhd-1.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 14, name: 'xxhhhhdhdhd-2.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 15, name: 'xxhhhhdhdhd-3.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 16, name: 'xxhhhhdhdhd-4.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 17, name: 'xxhhhhdhdhd-5.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 18, name: 'xxhhhhdhdhd-6.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 19, name: 'xxhhhhdhdhd-7.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 20, name: 'xxhhhhdhdhd-8.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 21, name: 'xxhhhhdhdhd-9.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 22, name: 'xxhhhhdhdhd-10.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 23, name: 'xxhhhhdhdhd-11.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 24, name: 'xxhhhhdhdhd-12.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 25, name: 'xxhhhhdhdhd-13.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 26, name: 'xxhhhhdhdhd-14.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection);
CREATE(collection:Collection {
collectionId: 4, name: 'abelota-05-10-2021-24-13', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})
CREATE(:Dataset {
datasetId: 27, name: 'brain-1.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 28, name: 'brain-2.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 29, name: 'brain-3.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 30, name: 'brain-4.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 31, name: 'brain-5.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 32, name: 'brain-6.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 33, name: 'brain-7.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 34, name: 'brain-8.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection)
CREATE(:Dataset {
datasetId: 35, name: 'brain-9.png', owner: 'abelota', createdAt: datetime(), createdBy: 'abelota',
lastUpdatedAt: datetime(), lastUpdatedBy: 'abelota'})-[:CHILD_OF]->(collection);
MATCH(collection:Collection {collectionId: 2})
MATCH(user:User {username: 'abelota'})
CREATE(user)-[:HAS_PERMISSION {access: 'owner'}]->(collection);
MATCH(collection:Collection {collectionId: 2})
MATCH(user:User {username: 'testuser'})
CREATE(user)-[:HAS_PERMISSION {access: 'edit'}]->(collection);
MATCH(collection:Collection {collectionId: 2})
MATCH(group:Group {groupId: 'abelota-lab_090d6c8b-7cfd-4f8a-afaf-0730a2320ff2'})
CREATE(group)-[:HAS_PERMISSION {access: 'view'}]->(collection);
MATCH(collection:Collection {collectionId: 3})
MATCH(user:User {username: 'abelota'})
CREATE(user)-[:HAS_PERMISSION {access: 'owner'}]->(collection);
MATCH(collection:Collection {collectionId: 3})
MATCH(group:Group {groupId: 'abelota-lab_090d6c8b-7cfd-4f8a-afaf-0730a2320ff2'})
CREATE(group)-[:HAS_PERMISSION {access: 'edit'}]->(collection);
MATCH(collection:Collection {collectionId: 4})
MATCH(user:User {username: 'abelota'})
CREATE(user)-[:HAS_PERMISSION {access: 'owner'}]->(collection);
MATCH(collection:Collection {collectionId: 4})
MATCH(user:User {username: 'abigaill'})
CREATE(user)-[:HAS_PERMISSION {access: 'edit'}]->(collection);
MATCH(collection:Collection {collectionId: 4})
MATCH(user:User {username: 'testuser'})
CREATE(user)-[:HAS_PERMISSION {access: 'read'}]->(collection);
CREATE(collectionGroup:CollectionGroup {collectionGroupId: 1, name: 'Brain Image Paper'});
MATCH(collectionGroup:CollectionGroup {collectionGroupId: 1})
MATCH(collection:Collection {collectionId: 4})
CREATE(collection)-[:CHILD_OF]->(collectionGroup);
MATCH(collectionGroup:CollectionGroup {collectionGroupId: 1})
MATCH(dataset:Dataset {datasetId: 24})
CREATE(dataset)-[:CHILD_OF]->(collectionGroup);
MATCH(collectionGroup:CollectionGroup {collectionGroupId: 1})
MATCH(dataset:Dataset {datasetId: 25})
CREATE(dataset)-[:CHILD_OF]->(collectionGroup);
MATCH(collectionGroup:CollectionGroup {collectionGroupId: 1})
MATCH(dataset:Dataset {datasetId: 26})
CREATE(dataset)-[:CHILD_OF]->(collectionGroup);
CREATE(collectionGroup:CollectionGroup {collectionGroupId: 2, name: 'Tumor Classification Project'});
MATCH(collectionGroup:CollectionGroup {collectionGroupId: 2})
MATCH(collection:Collection {collectionId: 1})
CREATE(collection)-[:CHILD_OF]->(collectionGroup);
MATCH(collectionGroup:CollectionGroup {collectionGroupId: 2})
MATCH(collection:Collection {collectionId: 2})
CREATE(collection)-[:CHILD_OF]->(collectionGroup);
MATCH(collectionGroup:CollectionGroup {collectionGroupId: 2})
MATCH(dataset:Dataset {datasetId: 16})
CREATE(dataset)-[:CHILD_OF]->(collectionGroup);
MATCH(collectionGroup:CollectionGroup {collectionGroupId: 2})
MATCH(dataset:Dataset {datasetId: 17})
CREATE(dataset)-[:CHILD_OF]->(collectionGroup);
MATCH(collectionGroup:CollectionGroup {collectionGroupId: 2})
MATCH(dataset:Dataset {datasetId: 24})
CREATE(dataset)-[:CHILD_OF]->(collectionGroup);
MATCH(collectionGroup:CollectionGroup {collectionGroupId: 2})
MATCH(dataset:Dataset {datasetId: 28})
CREATE(dataset)-[:CHILD_OF]->(collectionGroup);
MATCH(collectionGroup:CollectionGroup {collectionGroupId: 2})
MATCH(dataset:Dataset {datasetId: 31})
CREATE(dataset)-[:CHILD_OF]->(collectionGroup);
MATCH(collectionGroup:CollectionGroup {collectionGroupId: 2})
MATCH(dataset:Dataset {datasetId: 35})
CREATE(dataset)-[:CHILD_OF]->(collectionGroup);