-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
sample4.art
64 lines (52 loc) · 2.44 KB
/
sample4.art
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
;---------------------------------------------
; Import Grafito
; and ... let's rock'n'roll! :)
;---------------------------------------------
do.import {grafito.art}
do [
;---------------------------------------------
; Set up a new graph environment
; with a local database named "sample4"
;---------------------------------------------
graph.create "sample4" [
;---------------------------------------------
; Populate the database
;---------------------------------------------
uk: put'country [name: "United Kingdom"]
au: put'country [name: "Australia"]
us: put'country [name: "United States"]
ca: put'country [name: "Canada"]
nolan: put'person [name: "Christopher Nolan" birthday: 1970 sex: "m"]
pearce: put'person [name: "Guy Pearce" birthday: 1967 sex: "m"]
hanson: put'person [name: "Curtis Hanson" birthday: 1945 sex: "m"]
spacey: put'person [name: "Kevin Spacey" birthday: 1959 sex: "m"]
dicaprio: put'person [name: "Leonardo DiCaprio" birthday: 1974 sex: "m"]
moss: put'person [name: "Carrie-Ann Moss" birthday: 1967 sex: "f"]
wach1: put'person [name: "Lana Wachowski" birthday: 1965 sex: "f"]
wach2: put'person [name: "Lilly Wachowski" birthday: 1967 sex: "f"]
memento: put'movie [title: "Memento" year: 2000]
inception: put'movie [title: "Inception" year: 2010]
laconfidential: put'movie [title: "L.A. Confidential" year: 1997]
matrix: put'movie [title: "The Matrix" year: 1999]
;---------------------------------------------
; Define the relationships
; between our nodes
;---------------------------------------------
link'isFrom nolan uk
link'isFrom pearce au
link'isFrom @[hanson spacey dicaprio wach1 wach2] us
link'isFrom moss ca
link'directed nolan @[memento inception]
link'directed hanson laconfidential
link'directed @[wach1 wach2] matrix
link'actedIn pearce @[memento laconfidential]
link'actedIn spacey laconfidential
link'actedIn dicaprio inception
link'actedIn moss @[memento matrix]
;---------------------------------------------
; Fetch every "person" &
; open the Desktop app for visualization
;---------------------------------------------
preview fetch 'person ø
]
]